[xiph-commits] r16027 - branches/theora-thusnelda

giles at svn.xiph.org giles at svn.xiph.org
Sun May 24 10:08:38 PDT 2009


Author: giles
Date: 2009-05-24 10:08:37 -0700 (Sun, 24 May 2009)
New Revision: 16027

Modified:
   branches/theora-thusnelda/configure.ac
Log:
Check for non-GNU ld on Darwin, and apply -exported_symbols_list
to control the library API.

Without this, symbol collisions prevent building on MacOS X at all,
since some source files are shared internally between libtheoraenc
and libtheoradec.


Modified: branches/theora-thusnelda/configure.ac
===================================================================
--- branches/theora-thusnelda/configure.ac	2009-05-24 17:06:26 UTC (rev 16026)
+++ branches/theora-thusnelda/configure.ac	2009-05-24 17:08:37 UTC (rev 16027)
@@ -207,7 +207,7 @@
 # Test whenever ld supports -version-script
 AC_PROG_LD
 AC_PROG_LD_GNU
-AC_MSG_CHECKING([library versioning support])
+AC_MSG_CHECKING([how to control symbol export])
 
 THDEC_VERSION_ARG=""
 THENC_VERSION_ARG=""
@@ -220,19 +220,32 @@
     THENC_VERSION_ARG="-export-symbols \$(top_srcdir)/win32/xmingw32/libtheoraenc-all.def"
     THENC_VERSION_ARG="$THENC_VERSION_ARG -ltheoradec"
     THC_VERSION_ARG="-export-symbols \$(top_srcdir)/win32/libtheora.def"
-    AC_MSG_RESULT([no])
+    AC_MSG_RESULT([-export-symbols])
     ;;
   linux* | solaris* )
     THDEC_VERSION_ARG='-Wl,--version-script=$(srcdir)/Version_script-dec'
     THENC_VERSION_ARG='-Wl,--version-script=$(srcdir)/Version_script-enc'
     TH_VERSION_ARG='-Wl,--version-script=$(srcdir)/Version_script'
-    AC_MSG_RESULT([yes])
+    AC_MSG_RESULT([--version-script])
     ;;
   *)
     # build without versioning
     AC_MSG_RESULT([no])
     ;;
  esac
+else
+ case "$target_os" in
+  darwin*)
+    THDEC_VERSION_ARG='-Wl,-exported_symbols_list,$(srcdir)/theoradec.exp'
+    THENC_VERSION_ARG='-Wl,-exported_symbols_list,$(srcdir)/theoraenc.exp'
+    TH_VERSION_ARG='-Wl,-exported_symbols_list,$(srcdir)/theora.exp'
+    AC_MSG_RESULT([-exported_symbols_list])
+    ;;
+  *)
+    # build without versioning
+    AC_MSG_RESULT([no])
+    ;;
+ esac
 fi
  
 THEORADEC_LDFLAGS="$THEORA_LDFLAGS $THDEC_VERSION_ARG"



More information about the commits mailing list