cvs: /php4 ltconfig ltmain.sh /php4/ext/gd config.m4
| From: | Rasmus Lerdorf | Date: | Tue, 04 Jan 2000 02:42:58 +0000 |
| Subject: | cvs: /php4 ltconfig ltmain.sh /php4/ext/gd config.m4 | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-8881@lists.php.net to get a copy of this message | ||
rasmus Mon Jan 3 21:42:58 2000 EDT
Modified files:
/php4 ltconfig ltmain.sh
/php4/ext/gd config.m4
Log:
@ Don't assume libz and libpng are installed for the GD checks (Rasmus)
Index: php4/ltconfig
diff -u php4/ltconfig:1.10 php4/ltconfig:1.11
--- php4/ltconfig:1.10 Wed Dec 22 15:24:30 1999
+++ php4/ltconfig Mon Jan 3 21:42:10 2000
@@ -1188,8 +1188,8 @@
netbsd*)
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
- archive_cmds='$CC -shared $compile_rpath $libobjs $deplibs $linkopts ${wl}-soname
$wl$soname -o $lib'
- archive_expsym_cmds='$CC -shared $compile_rpath $libobjs $deplibs $linkopts ${wl}-soname
$wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o
$lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname
${wl}-retain-symbols-file $wl$export_symbols -o $lib'
else
archive_cmds='$LD -Bshareable $libobjs $deplibs $linkopts -o $lib'
# can we support soname and/or expsyms with a.out? -oliva
@@ -1210,8 +1210,8 @@
EOF
elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
- archive_cmds='$CC -shared $compile_rpath $libobjs $deplibs $linkopts ${wl}-soname
$wl$soname -o $lib'
- archive_expsym_cmds='$CC -shared $compile_rpath $libobjs $deplibs $linkopts ${wl}-soname
$wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o
$lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname
${wl}-retain-symbols-file $wl$export_symbols -o $lib'
else
ld_shlibs=no
fi
@@ -1226,8 +1226,8 @@
*)
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
- archive_cmds='$CC -shared $compile_rpath $libobjs $deplibs $linkopts ${wl}-soname
$wl$soname -o $lib'
- archive_expsym_cmds='$CC -shared $compile_rpath $libobjs $deplibs $linkopts ${wl}-soname
$wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o
$lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname
${wl}-retain-symbols-file $wl$export_symbols -o $lib'
else
ld_shlibs=no
fi
@@ -1428,9 +1428,9 @@
no_undefined_flag=' -z text'
# $CC -shared without GNU ld will not create a library from C++
# object files and a static libstdc++, better avoid it by now
- archive_cmds='$LD $compile_rpath -G${allow_undefined_flag} -h $soname -o $lib $libobjs
$deplibs $linkopts'
+ archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs
$linkopts'
archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed
-e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
- $LD $compile_rpath -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs
$linkopts~$rm $lib.exp'
+ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linkopts~$rm
$lib.exp'
hardcode_libdir_flag_spec='-R$libdir'
hardcode_shlibpath_var=no
case "$host_os" in
Index: php4/ltmain.sh
diff -u php4/ltmain.sh:1.10 php4/ltmain.sh:1.11
--- php4/ltmain.sh:1.10 Wed Dec 22 15:24:30 1999
+++ php4/ltmain.sh Mon Jan 3 21:42:10 2000
@@ -1162,7 +1162,7 @@
*.o | *.obj | *.a | *.lib)
# A standard object.
- libobjs="$libobjs $arg"
+ objs="$objs $arg"
;;
*.lo)
@@ -1796,94 +1796,6 @@
esac
fi
- if test -n "$rpath$xrpath"; then
- # If the user specified any rpath flags, then add them.
- for libdir in $rpath $xrpath; do
- # This is the magic to use -rpath.
- case "$compile_rpath " in
- *" $libdir "*) ;;
- *) compile_rpath="$compile_rpath $libdir" ;;
- esac
- case "$finalize_rpath " in
- *" $libdir "*) ;;
- *) finalize_rpath="$finalize_rpath $libdir" ;;
- esac
- done
- fi
-
- # Now hardcode the library paths
- rpath=
- hardcode_libdirs=
- for libdir in $compile_rpath; do
- if test -n "$hardcode_libdir_flag_spec"; then
- if test -n "$hardcode_libdir_separator"; then
- if test -z "$hardcode_libdirs"; then
- hardcode_libdirs="$libdir"
- else
- # Just accumulate the unique libdirs.
- case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
- *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
- ;;
- *)
- hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
- ;;
- esac
- fi
- else
- eval flag=\"$hardcode_libdir_flag_spec\"
- rpath="$rpath $flag"
- fi
- elif test -n "$runpath_var"; then
- case "$perm_rpath " in
- *" $libdir "*) ;;
- *) perm_rpath="$perm_rpath $libdir" ;;
- esac
- fi
- done
- # Substitute the hardcoded libdirs into the rpath.
- if test -n "$hardcode_libdir_separator" &&
- test -n "$hardcode_libdirs"; then
- libdir="$hardcode_libdirs"
- eval rpath=\" $hardcode_libdir_flag_spec\"
- fi
- compile_rpath="$rpath"
-
- rpath=
- hardcode_libdirs=
- for libdir in $finalize_rpath; do
- if test -n "$hardcode_libdir_flag_spec"; then
- if test -n "$hardcode_libdir_separator"; then
- if test -z "$hardcode_libdirs"; then
- hardcode_libdirs="$libdir"
- else
- # Just accumulate the unique libdirs.
- case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
- *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
- ;;
- *)
- hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
- ;;
- esac
- fi
- else
- eval flag=\"$hardcode_libdir_flag_spec\"
- rpath="$rpath $flag"
- fi
- elif test -n "$runpath_var"; then
- case "$finalize_perm_rpath " in
- *" $libdir "*) ;;
- *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
- esac
- fi
- done
- # Substitute the hardcoded libdirs into the rpath.
- if test -n "$hardcode_libdir_separator" &&
- test -n "$hardcode_libdirs"; then
- libdir="$hardcode_libdirs"
- eval rpath=\" $hardcode_libdir_flag_spec\"
- fi
- finalize_rpath="$rpath"
-
# Create the output directory, or remove our outputs if we need to.
if test -d $output_objdir; then
$show "${rm}r $output_objdir/$outputname $output_objdir/$libname.*
$output_objdir/${libname}${release}.*"
@@ -2043,7 +1955,6 @@
done
done
if test -n "$a_deplib" ; then
- newdeplibs="$newdeplibs $a_deplib"
droppeddeps=yes
echo
echo "*** Warning: This library needs some functionality provided by $a_deplib."
Index: php4/ext/gd/config.m4
diff -u php4/ext/gd/config.m4:1.22 php4/ext/gd/config.m4:1.23
--- php4/ext/gd/config.m4:1.22 Wed Dec 29 23:52:01 1999
+++ php4/ext/gd/config.m4 Mon Jan 3 21:42:27 2000
@@ -23,7 +23,8 @@
old_LDFLAGS=$LDFLAGS
old_LIBS=$LIBS
AC_CHECK_LIB(gd, gdImageString16, [ AC_DEFINE(HAVE_LIBGD13,1,[ ]) ])
- LIBS="$LIBS -lpng -lz"
+ AC_CHECK_LIB(z,compress, LIBS="$LIBS -lz",,)
+ AC_CHECK_LIB(png,png_info_init, LIBS="$LIBS -lpng",,)
AC_CHECK_LIB(gd, gdImageColorResolve, [AC_DEFINE(HAVE_GDIMAGECOLORRESOLVE,1,[ ])])
dnl Some versions of GD support both PNG and GIF. Check for both.
AC_CHECK_LIB(gd, gdImageCreateFromPng, [AC_DEFINE(HAVE_GD_PNG, 1, [ ])])
@@ -73,7 +74,8 @@
LDFLAGS="$LDFLAGS -L$GD_LIB"
old_LIBS=$LIBS
AC_CHECK_LIB(gd, gdImageString16, [ AC_DEFINE(HAVE_LIBGD13,1, [ ]) ])
- LIBS="$LIBS -lpng -lz"
+ AC_CHECK_LIB(z,compress, LIBS="$LIBS -lz",,)
+ AC_CHECK_LIB(png,png_info_init, LIBS="$LIBS -lpng",,)
AC_CHECK_LIB(gd, gdImageColorResolve, [AC_DEFINE(HAVE_GDIMAGECOLORRESOLVE,1,[ ])])
AC_CHECK_LIB(gd, gdImageCreateFromPng, [AC_DEFINE(HAVE_GD_PNG, 1, [ ])])
AC_CHECK_LIB(gd, gdImageCreateFromGif, [AC_DEFINE(HAVE_GD_GIF, 1, [ ])])
@@ -95,7 +97,8 @@
if test "$ac_cv_lib_gd_gdImageLine" = "yes"; then
old_LIBS=$LIBS
AC_CHECK_LIB(gd, gdImageString16, [ AC_DEFINE(HAVE_LIBGD13,1, [ ]) ])
- LIBS="$LIBS -lpng -lz"
+ AC_CHECK_LIB(z,compress, LIBS="$LIBS -lz",,)
+ AC_CHECK_LIB(png,png_info_init, LIBS="$LIBS -lpng",,)
AC_CHECK_LIB(gd, gdImageColorResolve, [AC_DEFINE(HAVE_GDIMAGECOLORRESOLVE,1, [ ])])
AC_CHECK_LIB(gd, gdImageCreateFromPng, [AC_DEFINE(HAVE_GD_PNG, 1, [ ])])
AC_CHECK_LIB(gd, gdImageCreateFromGif, [AC_DEFINE(HAVE_GD_GIF, 1, [ ])])