better debugging

NEW error.h

configure:
	new checks

debug.h:
	changed macro to inline function

error.h:
	err.h->error.h
	changed macro to inline function

main.c:
	more debug() calls