]> granicus.if.org Git - php/commitdiff
- Prevent compiling shared extensions when --enable-versioning is used
authorfoobar <sniper@php.net>
Sat, 26 Mar 2005 03:09:09 +0000 (03:09 +0000)
committerfoobar <sniper@php.net>
Sat, 26 Mar 2005 03:09:09 +0000 (03:09 +0000)
- 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

build/libtool.m4
configure.in

index 41adb2b9e7407c74ac2a67fc674c8e50b326f9fd..8dccd5160a012099570c1e069c16edd4805066b7 100644 (file)
@@ -1403,6 +1403,23 @@ EOF
     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'
index 6007a3ab6529a6adf7af1d86d064fff7ed290f05..e1f19ade2acd84bae019848e094b4bf2b9d4e976 100644 (file)
@@ -808,6 +808,9 @@ dnl Extensions post-config
 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"