* bootstrap: remove a -shared flag as ./configure already adds it for
authorEric Petit <titer@videolan.org>
Sun, 25 May 2003 22:36:33 +0000 (22:36 +0000)
committerEric Petit <titer@videolan.org>
Sun, 25 May 2003 22:36:33 +0000 (22:36 +0000)
   platforms which need it
 * configure.ac.in: don't use -shared on BeOS

bootstrap
configure.ac.in

index 133f563..e2f085c 100755 (executable)
--- a/bootstrap
+++ b/bootstrap
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 ##  bootstrap file for the VLC media player
-##  $Id: bootstrap,v 1.47 2003/03/25 23:13:58 sam Exp $
+##  $Id: bootstrap,v 1.48 2003/05/25 22:36:33 titer Exp $
 ##
 ##  Authors: Samuel Hocevar <sam@zoy.org>
 
@@ -157,7 +157,7 @@ lib${mod}_DATA = \$(D_${mod}_p)
 lib${mod}dir = \$(libdir)/vlc/${topdir}
 ${PRIVATE}noinst_LIBRARIES += \$(L_${mod}_p)
 ${PRIVATE}${dir}/lib${mod}_plugin\$(LIBEXT): \$(${sym}_lib${mod}_plugin_a_OBJECTS)
-${PRIVATE}     \$(${LINKER}) \$(${sym}_lib${mod}_plugin_a_OBJECTS) -shared \$(LDFLAGS_plugins) \$(LDFLAGS_${mod})
+${PRIVATE}     \$(${LINKER}) \$(${sym}_lib${mod}_plugin_a_OBJECTS) \$(LDFLAGS_plugins) \$(LDFLAGS_${mod})
 
 
 EOF
index 172281a..02ed3eb 100644 (file)
@@ -151,17 +151,16 @@ case "x${target_os}" in
     ;;
   xbeos)
     SYS=beos
-    CFLAGS_save="${CFLAGS_save} -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual"; CFLAGS="${CFLAGS_save}"
-    CXXFLAGS_save="${CXXFLAGS_save} -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual"; CXXFLAGS="${CXXFLAGS_save}"
+    CFLAGS_save="${CFLAGS_save} -Wno-multichar"; CFLAGS="${CFLAGS_save}"
+    CXXFLAGS_save="${CXXFLAGS_save} -Wno-multichar"; CXXFLAGS="${CXXFLAGS_save}"
     LDFLAGS_vlc="${LDFLAGS_vlc} -lbe"
-    LDFLAGS_plugins="${LDFLAGS_plugins} -nostart"
-    LDFLAGS_beos="${LDFLAGS_beos} -lbe -lmedia -lroot -ltracker -lstdc++.r4 -ltranslation -lgame"
-    dnl BONE or not BONE ? only BONE has libbind.so
-    AC_CHECK_LIB( bind, inet_ntoa,
-        [ LDFLAGS_access_mms="${LDFLAGS_access_mms} -lsocket -lbind"
-          LDFLAGS_ipv4="${LDFLAGS_ipv4} -lsocket -lbind"
-          LDFLAGS_httpd="${LDFLAGS_httpd} -lsocket -lbind"],
-        [])
+    LDFLAGS_beos="${LDFLAGS_beos} -lbe -lmedia -ltranslation -ltracker -lgame -lstdc++.r4"
+    dnl Check if we have BONE (old net_server doesn't have libsocket.so)
+    AC_CHECK_LIB( socket, connect,
+        LDFLAGS_vlc="${LDFLAGS_vlc} -lsocket -lbind" 
+        LDFLAGS_access_mms="${LDFLAGS_access_mms} -lsocket -lbind"
+        LDFLAGS_ipv4="${LDFLAGS_ipv4} -lsocket -lbind"
+        LDFLAGS_httpd="${LDFLAGS_httpd} -lsocket -lbind" )
     ;;
   x*)
     SYS="${target_os}"
@@ -717,12 +716,17 @@ if test "x${ac_cv_ld_darwin}" != "xno"; then
 fi
 
 dnl Check for standard plugin linking flags
-AC_CACHE_CHECK([if \$CC accepts -shared],
-    [ac_cv_ld_plugins],
-    [CFLAGS="${CFLAGS_save} -shared"
-     AC_TRY_COMPILE([],, ac_cv_ld_plugins=yes, ac_cv_ld_plugins=no)])
-if test "x${ac_cv_ld_plugins}" != "xno"; then
-    LDFLAGS_plugins="${LDFLAGS_plugins} -shared"
+dnl BeOS' gcc needs -nostart instead of -shared, even if -shared isn't harmful (just a warning)
+if test "x${SYS}" = "xbeos"; then
+    LDFLAGS_plugins="${LDFLAGS_plugins} -nostart"
+else
+    AC_CACHE_CHECK([if \$CC accepts -shared],
+        [ac_cv_ld_plugins],
+        [CFLAGS="${CFLAGS_save} -shared"
+         AC_TRY_COMPILE([],, ac_cv_ld_plugins=yes, ac_cv_ld_plugins=no)])
+    if test "x${ac_cv_ld_plugins}" != "xno"; then
+        LDFLAGS_plugins="${LDFLAGS_plugins} -shared"
+    fi
 fi
 
 dnl Check for variadic macros