php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #513 linking with libgd + one -L fix
Submitted: 1998-07-06 00:46 UTC Modified: 1998-07-06 06:08 UTC
From: charles at comm dot polymtl dot ca Assigned:
Status: Closed Package: Compile Failure
PHP Version: 3.0 Final Release OS: SunOS 4.1.4
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: charles at comm dot polymtl dot ca
New email:
PHP Version: OS:

 

 [1998-07-06 00:46 UTC] charles at comm dot polymtl dot ca
apache 1.3.0 and ssl 1.18
php 3.0

I will describe two simple problems in one bug report because they
both affect configure.in and I made a patch which fixes both.

First, the simpler one:  wherever there is

       -Lmodules/php3 -L../modules/php3

for the later purpose of the apache compilation process, there needs
to be

       -Lmodules/php3 -L../modules/php3 -L../../modules/php3

This is needed when compiling in the apache directory src/modules/ssl,
even though nothing ends up being taken from the php3 library for what
is built there; linking just won't proceed if the library can't be
found.

The other problem has to do with building php with GD support.  First,
libphp3.module.in seems to lack @GD_LIBS@, a simple omission.  This
only has an effect later when apache is built.  Second, at least for
the distribution of GD I have (which may be an old one, I don't know,
but it's out there), there is no "make install" so one has the choice
to put the provided include files directly in .../include/ or in
.../include/gd/ .  I'm probably not the only one to have chosen the
latter, since configure.in already includes the following lines:

	if test -f /usr/pkg/include/gd/gd.h -a -z "$GD_INCLUDE" ; then
		GD_INCLUDE="-I/usr/pkg/include/gd"
	fi

So, in that spirit, I changed a few lines in configure.in to support
both possibilities (that's earlier in the file where whether to
support GD is tested).



--- libphp3.module.in.orig-3.0	Mon Jun  1 05:58:27 1998
+++ libphp3.module.in	Fri Jul  3 14:59:39 1998
@@ -2,6 +2,6 @@
 ConfigStart
 	RULE_WANTHSREGEX=@HSREGEX@
 	SUBVERSION="$SUBVERSION PHP/@PHP_VERSION@"
-	LIBS="$LIBS @PHP_LIBS@ @DBM_LIB@ @LIBS@ @ORACLE_LFLAGS@ @ORACLE_LIBS@ @IODBC_LFLAGS@ @IODBC_LIBS@ @SYBASE_LFLAGS@ @SYBASE_LIBS@ @SYBASE_CT_LFLAGS@ @SYBASE_CT_LIBS@ @MYSQL_LFLAGS@ @MYSQL_LIBS@ @MSQL_LFLAGS@ @MSQL_LIBS@ @ADA_LFLAGS@ @ADA_LIBS@ @SOLID_LIBS@ @PGSQL_LFLAGS@ @PGSQL_LIBS@ @LDAP_LFLAGS@ @LDAP_LIBS@ @VELOCIS_LIBS@ @ZLIB_LIBS@"
+	LIBS="$LIBS @PHP_LIBS@ @DBM_LIB@ @LIBS@ @GD_LIBS@ @ORACLE_LFLAGS@ @ORACLE_LIBS@ @IODBC_LFLAGS@ @IODBC_LIBS@ @SYBASE_LFLAGS@ @SYBASE_LIBS@ @SYBASE_CT_LFLAGS@ @SYBASE_CT_LIBS@ @MYSQL_LFLAGS@ @MYSQL_LIBS@ @MSQL_LFLAGS@ @MSQL_LIBS@ @ADA_LFLAGS@ @ADA_LIBS@ @SOLID_LIBS@ @PGSQL_LFLAGS@ @PGSQL_LIBS@ @LDAP_LFLAGS@ @LDAP_LIBS@ @VELOCIS_LIBS@ @ZLIB_LIBS@"
 	RULE_HIDE=yes
 ConfigEnd
--- configure.in.orig-3.0	Sat Jun  6 09:46:51 1998
+++ configure.in	Fri Jul  3 15:12:59 1998
@@ -277,10 +277,10 @@
 	    BINNAME=libmodphp3.a
 	    if test "$with_dbase" = "yes"; then
 	      INSTALL_IT="cp $BINNAME mod_php3.* php_version.h libphp3.module dbase/libdbf.a $APACHE_TARGET; cp apMakefile.tmpl $APACHE_TARGET/Makefile.tmpl; cp apMakefile.libdir $APACHE_TARGET/Makefile.libdir"
-	      PHP_LIBS="-Lmodules/php3 -L../modules/php3 -lmodphp3 -ldbf"
+	      PHP_LIBS="-Lmodules/php3 -L../modules/php3 -L../../modules/php3 -lmodphp3 -ldbf"
 	    else
 	      INSTALL_IT="cp $BINNAME mod_php3.* php_version.h libphp3.module $APACHE_TARGET; cp apMakefile.tmpl $APACHE_TARGET/Makefile.tmpl; cp apMakefile.libdir $APACHE_TARGET/Makefile.libdir"
-	      PHP_LIBS="-Lmodules/php3 -L../modules/php3 -lmodphp3"
+	      PHP_LIBS="-Lmodules/php3 -L../modules/php3 -L../../modules/php3 -lmodphp3"
 		fi
 	    AC_DEFINE(APACHE)
 	    AC_MSG_RESULT(yes - Apache 1.3.x)
@@ -300,10 +300,10 @@
 		fi
 	    BINNAME=libmodphp3.a
 	    if test "$with_dbase" = "yes"; then
-	      PHP_LIBS="-Lmodules/php3 -L../modules/php3 -lmodphp3 -ldbf"
+	      PHP_LIBS="-Lmodules/php3 -L../modules/php3 -L../../modules/php3 -lmodphp3 -ldbf"
 	      INSTALL_IT="cp $BINNAME mod_php3.* php_version.h dbase/libdbf.a $APACHE_TARGET; cp apMakefile.tmpl $APACHE_TARGET/Makefile.tmpl; cp apMakefile.libdir $APACHE_TARGET/Makefile.libdir; cp libphp3.module $APACHE_TARGET"
 	    else
-	      PHP_LIBS="-Lmodules/php3 -L../modules/php3 -lmodphp3"
+	      PHP_LIBS="-Lmodules/php3 -L../modules/php3 -L../../modules/php3 -lmodphp3"
 	      INSTALL_IT="cp $BINNAME mod_php3.* php_version.h $APACHE_TARGET; cp apMakefile.tmpl $APACHE_TARGET/Makefile.tmpl; cp apMakefile.libdir $APACHE_TARGET/Makefile.libdir; cp libphp3.module $APACHE_TARGET"
 	    fi
 	    AC_DEFINE(APACHE)
@@ -321,10 +321,10 @@
 	    APACHE_TARGET=$withval/apache
 	    BINNAME=libmodphp3.a
 	    if test "$with_dbase" = "yes"; then
-	      PHP_LIBS="-Lmodules/php3 -L../modules/php3 -lmodphp3 -ldbf"
+	      PHP_LIBS="-Lmodules/php3 -L../modules/php3 -L../../modules/php3 -lmodphp3 -ldbf"
 	      INSTALL_IT="cp $BINNAME mod_php3.* php_version.h libphp3.module dbase/libdbf.a $APACHE_TARGET"
 	    else
-	      PHP_LIBS="-Lmodules/php3 -L../modules/php3 -lmodphp3"
+	      PHP_LIBS="-Lmodules/php3 -L../modules/php3 -L../../modules/php3 -lmodphp3"
 	      INSTALL_IT="cp $BINNAME mod_php3.* php_version.h libphp3.module $APACHE_TARGET"
 	    fi
 		STRONGHOLD=-DSTRONGHOLD=1
@@ -406,11 +406,14 @@
       ac_cv_lib_gd_gdImageLine=yes
       AC_MSG_RESULT(yes) ;;
     *)
-      GD_LIBS="-L$withval/lib -lgd"
-      GD_INCLUDE="-I$withval/include"
-      AC_DEFINE(HAVE_LIBGD)
-      AC_CHECK_LIB(gd, gdImageString16, [ AC_DEFINE(HAVE_LIBGD13) ])
-      AC_MSG_RESULT(yes) ;;
+      test -f $withval/include/gd/gd.h && GD_INCLUDE="-I$withval/include/gd"
+      test -f $withval/include/gd.h && GD_INCLUDE="-I$withval/include"
+      if test -n "$GD_INCLUDE" ; then
+          GD_LIBS="-L$withval/lib -lgd"
+          AC_DEFINE(HAVE_LIBGD)
+          AC_CHECK_LIB(gd, gdImageString16, [ AC_DEFINE(HAVE_LIBGD13) ])
+          AC_MSG_RESULT(yes)
+      fi ;;
   esac
 ],[
   AC_CHECK_LIB(gd, gdImageLine)


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1998-07-06 06:08 UTC] ssb
(Some of this was already done in 3.0.1.)  I applied
the rest of your fixes, they will be part of 3.0.2.
Thanks.

 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Jul 01 16:01:38 2025 UTC