Index: /trunk/psphot/configure.ac
===================================================================
--- /trunk/psphot/configure.ac	(revision 10422)
+++ /trunk/psphot/configure.ac	(revision 10423)
@@ -8,4 +8,10 @@
 AM_CONFIG_HEADER([src/config.h])
 AM_MAINTAINER_MODE
+
+dnl otherise AC_PROG_CC will default CFLAGS to "-g -02"
+if test -z ${CFLAGS} ; then
+  CFLAGS=""
+fi
+AC_SUBST([CFLAGS])
 
 AC_LANG(C)
@@ -17,4 +23,6 @@
 dnl enable largefile supports
 AC_SYS_LARGEFILE
+
+echo "CFLAGS: $CFLAGS"
 
 dnl handle debug building
