sniper          Fri Mar 25 22:09:10 2005 EDT

  Modified files:              
    /php-src    configure.in 
    /php-src/build      libtool.m4 
  Log:
  - Prevent compiling shared extensions when --enable-versioning is used
  - Fix -export-symbols in Linux in the bundled libtool.m4:
    o http://lists.gnu.org/archive/html/libtool/2002-07/msg00029.html
  # more about this: 
  # http://marc.theaimsgroup.com/?l=php-dev&m=106629582813118&w=2
  
  
http://cvs.php.net/diff.php/php-src/configure.in?r1=1.545&r2=1.546&ty=u
Index: php-src/configure.in
diff -u php-src/configure.in:1.545 php-src/configure.in:1.546
--- php-src/configure.in:1.545  Thu Mar 17 03:15:50 2005
+++ php-src/configure.in        Fri Mar 25 22:09:09 2005
@@ -1,4 +1,4 @@
-dnl ## $Id: configure.in,v 1.545 2005/03/17 08:15:50 sniper Exp $ -*- autoconf 
-*-
+dnl ## $Id: configure.in,v 1.546 2005/03/26 03:09:09 sniper Exp $ -*- autoconf 
-*-
 dnl ## Process this file with autoconf to produce a configure script.
 
 divert(1)
@@ -808,6 +808,9 @@
 dnl -------------------------------------------------------------------------
 
 if test "$PHP_VERSIONING" = "yes"; then
+  if test -n "$PHP_MODULES"; then
+    AC_MSG_ERROR([--enable-versioning cannot be used with shared modules])
+  fi
   test -z "$PHP_SYM_FILE" && PHP_SYM_FILE="$abs_srcdir/sapi/$PHP_SAPI/php.sym"
   if test -f "$PHP_SYM_FILE"; then
     EXTRA_LDFLAGS="-export-symbols $PHP_SYM_FILE $EXTRA_LDFLAGS"
http://cvs.php.net/diff.php/php-src/build/libtool.m4?r1=1.2&r2=1.3&ty=u
Index: php-src/build/libtool.m4
diff -u php-src/build/libtool.m4:1.2 php-src/build/libtool.m4:1.3
--- php-src/build/libtool.m4:1.2        Tue Feb 15 03:51:10 2005
+++ php-src/build/libtool.m4    Fri Mar 25 22:09:09 2005
@@ -1403,6 +1403,23 @@
     hardcode_shlibpath_var=no
     ;;
 
+  linux*)
+    if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
+      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname 
$wl$soname -o $lib'
+      archive_expsym_cmds='echo "{" > $output_objdir/$libname.ver;
+        echo "global:" >> $output_objdir/$libname.ver;
+       cat $export_symbols | while read symbol; do
+         echo "  \$symbol;" >> $output_objdir/$libname.ver;
+       done;
+        echo "local: *;" >> $output_objdir/$libname.ver;
+        echo "};" >> $output_objdir/$libname.ver~
+        $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname 
${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib~
+        rm -f $output_objdir/$libname.ver'
+    else
+      ld_shlibs=no
+    fi
+    ;;
+
   *)
     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname 
$wl$soname -o $lib'

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to