Index: /trunk/psphot/autogen.sh
===================================================================
--- /trunk/psphot/autogen.sh	(revision 6145)
+++ /trunk/psphot/autogen.sh	(revision 6146)
@@ -17,5 +17,5 @@
 LIBTOOLIZE=libtoolize
 ACLOCAL=aclocal
-AUTOHEADER=autoheader
+# AUTOHEADER=autoheader
 AUTOMAKE=automake
 AUTOCONF=autoconf
@@ -37,10 +37,10 @@
 }
 
-($AUTOHEADER --version) < /dev/null > /dev/null 2>&1 || {
-        echo
-        echo "You must have $AUTOHEADER installed to compile $PROJECT."
-        echo "Download the appropriate package for your distribution,"
-        echo "or get the source tarball at http://ftp.gnu.org/gnu/autoconf/"
-        DIE=1
+# ($AUTOHEADER --version) < /dev/null > /dev/null 2>&1 || {
+#         echo
+#         echo "You must have $AUTOHEADER installed to compile $PROJECT."
+#         echo "Download the appropriate package for your distribution,"
+#         echo "or get the source tarball at http://ftp.gnu.org/gnu/autoconf/"
+#         DIE=1
 }
 
@@ -77,5 +77,5 @@
 $LIBTOOLIZE --copy --force || echo "$LIBTOOlIZE failed"
 $ACLOCAL || echo "$ACLOCAL failed"
-$AUTOHEADER || echo "$AUTOHEADER failed"
+# $AUTOHEADER || echo "$AUTOHEADER failed"
 $AUTOMAKE --add-missing --force-missing --copy || echo "$AUTOMAKE  failed"
 $AUTOCONF || echo "$AUTOCONF failed"
Index: /trunk/psphot/configure.ac
===================================================================
--- /trunk/psphot/configure.ac	(revision 6145)
+++ /trunk/psphot/configure.ac	(revision 6146)
@@ -24,9 +24,10 @@
 )
 
+AC_CHECK_LIB(jpeg,jpeg_CreateCompress,[],[AC_MSG_ERROR([jpeg library not found.])])
 PKG_CHECK_MODULES(PSLIB, pslib >= 0.9.0)
 PKG_CHECK_MODULES(PSMODULE, psmodule >= 0.0.0)
-AC_CHECK_LIB(jpeg,jpeg_CreateCompress,[],[AC_MSG_ERROR([jpeg library not found.])])
 
 dnl Set CFLAGS for build
+CFLAGS="${CFLAGS}"
 psphot_CFLAGS="-Wall -Werror -std=c99"
 AC_SUBST([psphot_CFLAGS])
