[PHP-DEV] NetBSD-1.3.x diffs From: Michael Graff (explorer <email protected>)
Date: 05/27/98

Here is a cleaner diff for NetBSD 1.3. It will, I hope, do things better,
and not break gd support for other OSs.

? ktrace.out
Index: configure.in
===================================================================
RCS file: /repository/php3/configure.in,v
retrieving revision 1.208
diff -u -r1.208 configure.in
--- configure.in 1998/05/26 20:03:19 1.208
+++ configure.in 1998/05/27 19:22:11
@@ -33,11 +33,20 @@
 dnl Haven't quite figured out how to make libtool go yet
 dnl AM_PROG_LIBTOOL
 dnl AC_PROG_INSTALL
-AC_PATH_PROG(PROG_SENDMAIL, sendmail, /usr/lib/sendmail, $PATH:/usr/bin:/usr/sbin:/usr/etc:etc)
+AC_PATH_PROG(PROG_SENDMAIL, sendmail, /var/qmail/bin/sendmail, $PATH:/usr/bin:/usr/sbin:/usr/etc:etc)
 if test -n "$PROG_SENDMAIL"; then
   AC_DEFINE(HAVE_SENDMAIL)
 fi
 
+dnl
+dnl Check for /usr/pkg/{lib,include} which is where NetBSD puts binary
+dnl and source packages. This should be harmless on other OSs.
+dnl
+if test -d /usr/pkg/include -a -d /usr/pkg/lib ; then
+ CFLAGS="$CFLAGS -I/usr/pkg/include"
+ LDFLAGS="$LDFLAGS -L/usr/pkg/lib"
+fi
+
 AC_PREFERRED_DB_LIB
 
 AC_CHECK_LIB(c, socket, [:], [
@@ -75,8 +84,12 @@
                 AC_CHECK_HEADER(/usr/local/include/gdbm.h, [ GDBM_INCLUDE="-I/usr/local/include" ],[
                         AC_MSG_RESULT("Try /opt/local/include/gdbm.h");
                         AC_CHECK_HEADER(/opt/local/include/gdbm.h, [ GDBM_INCLUDE="-I/opt/local/include" ],[
+ dnl if in /usr/pkg/include, don't add anything. See above.
+ AC_MSG_RESULT("Try /usr/pkg/include/gdbm.h");
+ AC_CHECK_HEADER(/usr/pkg/include/gdbm.h, [ GDBM_INCLUDE="" ],[
                                 AC_MSG_RESULT("Giving up - You need to install gdbm.h somewhere");
                                 exit
+ ])
                         ])
                 ])
         ])
@@ -368,6 +381,9 @@
   AC_CHECK_LIB(gd, gdImageString16, [ AC_DEFINE(HAVE_LIBGD13) ])
 ])
 AC_SUBST(GD_LIBS)
+if test -f /usr/pkg/include/gd/gd.h -a -z "$GD_INCLUDE" ; then
+ GD_INCLUDE="-I/usr/pkg/include/gd"
+fi
 AC_SUBST(GD_INCLUDE)
 if test "$ac_cv_lib_gd_gdImageLine" = "yes"; then
   AC_CHECK_LIB(ttf, TT_Open_Face)
@@ -1184,7 +1200,7 @@
 ])
 
 dnl If we're using gcc and the user hasn't specified CFLAGS, add -O2.
-test -n "$auto_cflags" && test -n "$GCC" && CFLAGS="-O2"
+test -n "$auto_cflags" && test -n "$GCC" && CFLAGS="$CFLAGS -O2"
 
 dnl *** Commented out - generates slow code and consumes a lot of
 dnl *** resources during compilation - we need to figure out how