]> git.sesse.net Git - vlc/blobdiff - configure.ac
* motion_detect: use playlist_Control's "lock" argument
[vlc] / configure.ac
index 66c602b5aa29aef7889b6d35f5c7dd61c9ea6cad..569b6f4c44fa2cced2681cb5d4dc4408b03e75ab 100644 (file)
@@ -279,7 +279,7 @@ m4_defun([AC_PROG_F77],[])
 AC_PROG_LIBTOOL
 
 AC_ARG_ENABLE(libtool,
-    [  --enable-libtool        use libtool (default disabled)])
+    [  --enable-libtool        use libtool (default enabled)])
 AM_CONDITIONAL(USE_LIBTOOL, [test "x${enable_libtool}" != "xno"])
 
 
@@ -313,9 +313,9 @@ AS_IF([test "${nls_cv_force_use_gnu_gettext}" = "yes"], [
   ])
 ], [
   AS_IF([test "${enable_libtool}" != "no"], [
-    VLC_ADD_LDFLAGS([libvlc], [${LTLIBINTL}])
+    VLC_ADD_LDFLAGS([libvlc vlc], [${LTLIBINTL}])
   ], [
-    VLC_ADD_LDFLAGS([libvlc], [${LIBINTL}])
+    VLC_ADD_LDFLAGS([libvlc vlc], [${LIBINTL}])
   ])
 ])
 AC_SUBST(INCLUDED_LIBINTL)
@@ -330,9 +330,9 @@ AS_IF([test "$am_cv_func_iconv" != "yes"],
 fi
 VLC_ADD_CFLAGS([libvlc],[${INCICONV}])
 AS_IF([test "${enable_libtool}" != "no"], [
-  VLC_ADD_LDFLAGS([libvlc],[${LIBICONV}])
+  VLC_ADD_LDFLAGS([libvlc vlc],[${LIBICONV}])
 ],[
-  VLC_ADD_LDFLAGS([libvlc],[${LTLIBICONV}])
+  VLC_ADD_LDFLAGS([libvlc vlc],[${LTLIBICONV}])
 ])
 
 dnl Check for the need to include the mingwex lib for mingw32
@@ -934,9 +934,10 @@ RDC_PROG_CC_FLAGS_IFELSE([-pipe])
 
 dnl This helps detect broken plugins with undefined symbols
 dnl Better fail loudly at build-time than silenty at run-time.
-RDC_PROG_LINK_FLAGS_IFELSE([-Wl,-z,defs], [
-  VLC_ADD_LDFLAGS([plugin],[-Wl,-z,defs])
-])
+dnl Unfortunately, this sucks on FreeBSD (won't even link with -lc)
+dnl RDC_PROG_LINK_FLAGS_IFELSE([-Wl,-z,defs], [
+dnl   VLC_ADD_LDFLAGS([plugin],[-Wl,-z,defs])
+dnl ])
 
 dnl Check for various optimization flags
 AC_CACHE_CHECK([if \$CC accepts -Os],
@@ -1444,15 +1445,6 @@ AC_ARG_ENABLE(release,
 [  --enable-release        activate extra optimizations (default disabled)])
 test "${enable_release}" != "yes" && enable_release="no"
 
-dnl
-dnl  Is the shared libvlc forced ?
-dnl
-AC_ARG_ENABLE(shared-libvlc,
-  [  --enable-shared-libvlc  Win32 libvlc.dll build (default disabled)])
-AS_IF([test "${enable_libtool}" != "no" && test "${enable_shared_libvlc}"], [
-  AC_MSG_ERROR([--enable-shared-libvlc and --enable-libtool are mutually exclusive])
-])
-
 dnl
 dnl Stream output
 dnl
@@ -4101,7 +4093,7 @@ then
       ])
       AC_CHECK_HEADERS(d3d9.h,
       [ VLC_ADD_PLUGINS([direct3d])
-        VLC_ADD_LDFLAGS([direct3d],[-ld3d9 -lgdi32])
+        VLC_ADD_LDFLAGS([direct3d],[-lgdi32])
       ])
     else
       AC_MSG_CHECKING(for directX headers in ${with_directx})
@@ -4791,6 +4783,8 @@ then
       # wxwidgets should provide the following flags but does not
       # the following is required to compile for win32
       VLC_ADD_CXXFLAGS([wxwidgets],[-D_UNICODE -DUNICODE])
+    else
+      AC_MSG_ERROR([You need a unicode build of wxWidgets. Please upgrade and try again. Alternatively you can also configure with --disable-wxwidgets.])
     fi
     if test "$have_libcdio" = "yes"
     then 
@@ -5272,7 +5266,8 @@ then
     fi
     AC_LANG_PUSH(C++)
     AC_CHECK_HEADERS(ole2.h olectl.h,
-      [ VLC_ADD_CXXFLAGS([activex],[-fno-exceptions])
+      [ VLC_ADD_CPPFLAGS([activex],[-D_MIDL_USE_GUIDDEF_])
+        VLC_ADD_CXXFLAGS([activex],[-fno-exceptions])
         VLC_ADD_LDFLAGS([activex],[-lole32 -loleaut32 -luuid -lshlwapi]) 
         AC_CHECK_HEADERS(objsafe.h,
           VLC_ADD_CXXFLAGS([activex],[-DHAVE_OBJSAFE_HEADER]),,
@@ -5326,20 +5321,20 @@ then
         MOZILLA_CONFIG="${SEAMONKEY_CONFIG}"
       fi
     fi
-    
+
     if ${MOZILLA_CONFIG} --defines | grep -q 'MOZ_X11=1'; then
       LDFLAGS="${LDFLAGS_save} ${X_LIBS} ${X_PRE_LIBS}"
       AC_CHECK_LIB(Xt,XtStrings,
        [
          VLC_ADD_CPPFLAGS([mozilla],[${X_CFLAGS}])
          VLC_ADD_LDFLAGS([mozilla],[${X_LIBS} ${X_PRE_LIBS} -lXt -lX11 -lSM -lICE])
-],
+       ],
        [],
        [[${X_LIBS} ${X_PRE_LIBS} -lX11 -lSM -lICE]
       ])
       LDFLAGS="${LDFLAGS_save}"
     fi
-    
+
       mozilla=:
       dnl Workaround for http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=150490
       VLC_ADD_CPPFLAGS([mozilla],[[`${MOZILLA_CONFIG} --cflags plugin xpcom java | sed 's,-I\([^ ]*\)/mozilla/\([^ ]*\),-I\1/\2 -I\1/mozilla/\2,g' | xargs`]])
@@ -5375,7 +5370,7 @@ then
           mozilla_sdk_xpcom="/xpcom"
       fi
     fi
-  
+
     real_mozilla_sdk="`cd ${with_mozilla_sdk_path} 2>/dev/null && pwd`"
     CPPFLAGS="${CPPFLAGS_save} -I${real_mozilla_sdk} -I${real_mozilla_sdk}/include"
     MOZILLA_REQUIRED_HEADERS=1
@@ -5544,14 +5539,13 @@ AS_IF([${plugin_support}], [
 dnl
 dnl Pic and shared libvlc stuff
 dnl
-AS_IF([test "x${enable_shared_libvlc}" = "x"], [enable_shared_libvlc=no])
-AM_CONDITIONAL(BUILD_SHARED, [test "${enable_shared_libvlc}" != "no"])
-AS_IF([test "${enable_shared_libvlc}" != "no" || test "${enable_libtool}" != "no"], [
+AS_IF([test "${SYS}" = "mingw32" || test "${enable_libtool}" != "no"], [
   AC_DEFINE(HAVE_SHARED_LIBVLC, 1, [Define to 1 if libvlc is built as a shared library.])
   FILE_LIBVLC_DLL="!define LIBVLC_DLL libvlc.dll"
   VLC_ADD_PLUGINS([${BUILTINS}])
   BUILTINS=""
 ], [
+  LDFLAGS_vlc="${LDFLAGS_vlc} ${LDFLAGS_libvlc}"
   FILE_LIBVLC_DLL=""
 ])
 
@@ -5604,7 +5598,6 @@ dnl
 dnl  Create the vlc-config script
 dnl
 LDFLAGS_libvlc="${LDFLAGS_libvlc} ${LDFLAGS_builtin}"
-for i in `echo "${BUILTINS}" | sed -e 's@[^ ]*/@@g'` ; do LDFLAGS_libvlc="${LDFLAGS_libvlc} ${libdir}/vlc/${i}.a `eval echo '$'{LDFLAGS_${i}}`" ; done
 
 dnl
 dnl  Configuration is finished