+# --- compiler options -------------------------------------------------
+
+DEFCFLAGS="-g -W -Wall -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -Wno-unused-parameter"
+
+if [ -n "${CFLAGS}" ]; then
+ COMP="${CC} ${CFLAGS} -Wno-unused -Werror"
+else
+ COMP="${CC} ${DEFCFLAGS} -Wno-unused -Werror"
+fi
+echo -n "tested ${CC} -W: " 1>&2
+echo -n "testing ${CC} -W: " 1>&3
+runtest noop WFLAG || true
+
+if [ -n "${CFLAGS}" ]; then
+ echo "CFLAGS specified manually:" 1>&3
+elif [ ${HAVE_WFLAG} -eq 0 ]; then
+ CFLAGS="-g"
+else
+ CFLAGS="${DEFCFLAGS}"
+fi
+echo "selected CFLAGS=\"${CFLAGS}\"" 1>&2
+echo "selected CFLAGS=\"${CFLAGS}\"" 1>&3
+echo 1>&3
+
+COMP="${CC} ${CFLAGS}"
+[ ${HAVE_WFLAG} -eq 0 ] || COMP="${COMP} -Wno-unused -Werror"
+
+if [ -n "${STATIC}" ]; then
+ echo "selected STATIC=\"${STATIC}\" (manual)" 1>&2
+ echo "selected STATIC=\"${STATIC}\" (manual)" 1>&3
+ echo 1>&3
+else
+ runtest noop STATIC -static || true
+ [ ${HAVE_STATIC} -eq 0 ] || STATIC="-static"
+ echo "selected STATIC=\"${STATIC}\"" 1>&2
+ echo "selected STATIC=\"${STATIC}\"" 1>&3
+ echo 1>&3
+fi
+
+# --- tests for config.h ----------------------------------------------