[DVDnav-discuss] r895 - in trunk/libdvdnav: Makefile configure2

nicodvb subversion at mplayerhq.hu
Sun Apr 22 00:43:02 CEST 2007


Author: nicodvb
Date: Sun Apr 22 00:43:02 2007
New Revision: 895

Modified:
   trunk/libdvdnav/Makefile
   trunk/libdvdnav/configure2

Log:
fix compilation in OSX: -shared is replaced by a bunch of other options

Modified: trunk/libdvdnav/Makefile
==============================================================================
--- trunk/libdvdnav/Makefile	(original)
+++ trunk/libdvdnav/Makefile	Sun Apr 22 00:43:02 2007
@@ -41,8 +41,6 @@ else
 CFLAGS += -I$(DVDREAD_DIR)
 endif
 
-SHLDFLAGS += -shared
-
 LIBS_INSTALL = $(CURDIR)/../lib
 INCLUDES_INSTALL = $(CURDIR)/../include/libhts
 

Modified: trunk/libdvdnav/configure2
==============================================================================
--- trunk/libdvdnav/configure2	(original)
+++ trunk/libdvdnav/configure2	Sun Apr 22 00:43:02 2007
@@ -113,6 +113,16 @@ if [ "$DVDREAD" != "internal" ] ; then
 fi
 
 
+targetos=`uname -s`
+case $targetos in
+  Darwin)
+    SHLDFLAGS="-dynamiclib -Wl,-single_module -Wl,-read_only_relocs,suppress"
+  ;;
+  *)
+    SHLDFLAGS="-shared"
+  ;;
+esac
+
 cat > config.mak << EOF 
 # Automatically generated by configure, do not edit
 PREFIX=$PREFIX
@@ -127,6 +137,7 @@ CC=$cc
 MAKE=$make
 CFLAGS=$optimizations $cflags
 LDFLAGS=$ldflags
+SHLDFLAGS=$SHLDFLAGS
 INSTALLSTRIP=$INSTALLSTRIP
 USEDEBUG=$USEDEBUG
 DVDREAD=$DVDREAD



More information about the DVDnav-discuss mailing list