cvs: php4 /ext/gd config.m4
| From: | Stanislav Malyshev | Date: | Mon, 04 Dec 2000 15:10:59 +0000 |
| Subject: | cvs: php4 /ext/gd config.m4 | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-2927@lists.php.net to get a copy of this message | ||
stas Mon Dec 4 07:10:59 2000 EDT
Modified files:
/php4/ext/gd config.m4
Log:
GD shared build fixes - should fix problem with gd.so not being linked
with right libraries
Index: php4/ext/gd/config.m4
diff -u php4/ext/gd/config.m4:1.49 php4/ext/gd/config.m4:1.50
--- php4/ext/gd/config.m4:1.49 Tue Nov 28 00:06:30 2000
+++ php4/ext/gd/config.m4 Mon Dec 4 07:10:58 2000
@@ -6,11 +6,16 @@
if test "$withval" = "yes"; then
withval="/usr/local"
fi
- old_LIBS=$LIBS
+ jold_LIBS=$LIBS
LIBS="$LIBS -L$withval/lib"
AC_CHECK_LIB(jpeg,jpeg_read_header, [LIBS="$LIBS -ljpeg"],[AC_MSG_RESULT(no)],)
- LIBS=$old_LIBS
- AC_ADD_LIBRARY_WITH_PATH(jpeg, $withval/lib)
+ LIBS=$jold_LIBS
+ if test "$shared" = "yes"; then
+ GD_LIBS="$GD_LIBS -ljpeg"
+ GD_LFLAGS="$GD_LFLAGS -L$withval/lib"
+ else
+ AC_ADD_LIBRARY_WITH_PATH(jpeg, $withval/lib)
+ fi
LIBS="$LIBS -L$withval/lib -ljpeg"
],[
AC_MSG_RESULT(no)
@@ -93,7 +98,7 @@
AC_DEFINE(HAVE_LIBGD,1,[ ])
if test "$shared" = "yes"; then
AC_MSG_RESULT(yes (shared))
- GD_LIBS="-lgd"
+ GD_LIBS="-lgd $GD_LIBS"
else
AC_MSG_RESULT(yes (static))
AC_ADD_LIBRARY(gd)
@@ -110,6 +115,9 @@
if test "$ac_cv_lib_gd_gdImageCreateFromPng" = "yes"; then
AC_ADD_LIBRARY(png)
AC_ADD_LIBRARY(z)
+ if test "$shared" = "yes"; then
+ GD_LIBS="$GD_LIBS -lpng -lz"
+ fi
fi
ac_cv_lib_gd_gdImageLine=yes
@@ -142,8 +150,8 @@
AC_DEFINE(HAVE_LIBGD,1,[ ])
if test "$shared" = "yes"; then
AC_MSG_RESULT(yes (shared))
- GD_LIBS="-lgd"
- GD_LFLAGS="-L$GD_LIB"
+ GD_LIBS="-lgd $GD_LIBS"
+ GD_LFLAGS="-L$GD_LIB $GD_LFLAGS"
else
AC_MSG_RESULT(yes (static))
AC_ADD_LIBRARY_WITH_PATH(gd, $GD_LIB)
@@ -160,6 +168,9 @@
if test "$ac_cv_lib_gd_gdImageCreateFromPng" = "yes"; then
AC_ADD_LIBRARY(z)
AC_ADD_LIBRARY(png)
+ if test "$shared" = "yes"; then
+ GD_LIBS="$GD_LIBS -lpng -lz"
+ fi
fi
ac_cv_lib_gd_gdImageLine=yes
@@ -222,18 +233,30 @@
if test "$withval" = "yes"; then
for i in /usr/local /usr; do
if test -f "$i/include/t1lib.h"; then
- AC_ADD_LIBRARY_WITH_PATH(t1, "$i/lib")
- AC_ADD_INCLUDE("$i/include")
+ T1_DIR="$i"
fi
done
else
if test -f "$withval/include/t1lib.h"; then
- AC_ADD_LIBRARY_WITH_PATH(t1, "$withval/lib")
- AC_ADD_INCLUDE("$withval/include")
+ T1_DIR="$withval"
fi
fi
+
+ told_LIBS="$LIBS"
+ if test "$T1_DIR" != "no"; then
+ AC_ADD_INCLUDE("$T1_DIR/include")
+ if test "$shared" = "yes"; then
+ GD_LIBS="$GD_LIBS -lt1"
+ GD_LFLAGS="$GD_LFLAGS -L$T1_DIR/lib"
+ else
+ AC_ADD_LIBRARY_WITH_PATH(t1, "$T1_DIR/lib")
+ fi
+ LIBS="$LIBS -L$T1_DIR/lib -lt1"
+ fi
+
AC_MSG_RESULT(yes)
AC_CHECK_LIB(t1, T1_GetExtend, [AC_DEFINE(HAVE_LIBT1,1,[ ])])
+ LIBS="$told_LIBS"
else
AC_MSG_RESULT(no)
fi