]> git.sesse.net Git - vlc/blobdiff - configure.ac
libvlc vlm init fix Don't test p_vlm twice if it wasn't NULL the first time Don't...
[vlc] / configure.ac
index dd9aa110bb5794535c44d850acf3130037c842b0..c4ccb785cf58c64888263bfcdab307697c4af7aa 100644 (file)
@@ -265,6 +265,8 @@ case "${host_os}" in
         echo "  Assuming --disable-skins2"
         enable_x11="no"
         echo "  Assuming --disable-x11"
+        enable_xcb="no"
+        echo "  Assuming --disable-xcb"
         enable_glx="no"
         echo "  Assuming --disable-glx"
         enable_xvideo="no"
@@ -333,12 +335,12 @@ case "${host_os}" in
         fi
     fi
     ;;
-  *mingw32* | *cygwin* | *wince* | *mingwce* | *pe*)
+  *mingw32* | *cygwin* | *wince* | *mingwce*)
     AC_CHECK_TOOL(WINDRES, windres, :)
     AC_CHECK_TOOL(OBJCOPY, objcopy, :)
 
     case "${host_os}" in
-      *wince* | *mingwce* | *mingw32ce* | *pe*)
+      *wince* | *mingwce* | *mingw32ce*)
         SYS=mingwce
         dnl Sadly CeGCC still needs non-wince macros
         AC_DEFINE([_WIN32_WINNT], 0x0501, [Define to '0x0500' for Windows 2000 APIs.])
@@ -578,7 +580,7 @@ dnl Check for usual libc functions
 AC_CHECK_FUNCS([gettimeofday isatty sigrelse getpwuid_r memalign posix_memalign if_nametoindex getenv putenv setenv ctime_r lrintf daemon fork lstat posix_fadvise posix_madvise uselocale])
 AC_FUNC_ALLOCA
 AC_CHECK_FUNCS(fcntl)
-AC_REPLACE_FUNCS([asprintf atof atoll gmtime_r lldiv localtime_r rewind strcasecmp strcasestr strdup strlcpy strncasecmp strndup strnlen strsep strtof strtoll vasprintf swab])
+AC_REPLACE_FUNCS([asprintf atof atoll getcwd gmtime_r lldiv localtime_r rewind strcasecmp strcasestr strdup strlcpy strncasecmp strndup strnlen strsep strtof strtoll vasprintf swab])
 AC_CHECK_FUNCS([stricmp strnicmp])
 AC_CHECK_FUNCS(fdatasync,,
   [AC_DEFINE(fdatasync, fsync, [Alias fdatasync() to fsync() if missing.])
@@ -837,6 +839,9 @@ fi
 if test "${THREAD_LIB}" = "error"; then
   AC_CHECK_LIB(c_r,main,THREAD_LIB="-lc_r")
 fi
+if test "${THREAD_LIB}" = "error"; then
+  AC_CHECK_LIB(pthread,main,THREAD_LIB="-pthread")
+fi
 if test "${THREAD_LIB}" = "error"; then
   AC_CHECK_FUNCS(pthread_mutex_lock)
   THREAD_LIB=""
@@ -1620,7 +1625,7 @@ if test -n "${with_tuning}"; then
     fi
 else
     if test "${SYS}" = "darwin" -a "${host_cpu}" != "powerpc"; then
-        CFLAGS_TUNING="-march=pentium-m -mtune=prescott"
+        CFLAGS_TUNING="-march=prescott -mtune=generic"
     elif test "${host_cpu}" = "i686" -o "${host_cpu}" = "i586" -o "${host_cpu}" = "i486" -o "${host_cpu}" = "i386"; then
         CFLAGS_TUNING="-mtune=pentium2"
     elif test "${host_cpu}" = "x86_64"; then
@@ -2858,9 +2863,12 @@ AC_ARG_ENABLE(mpc,
   [  --enable-mpc            Mpc demux support (default enabled)])
 if test "${enable_mpc}" != "no"
 then
-  AC_CHECK_HEADERS(mpcdec/mpcdec.h, [
+  AC_CHECK_HEADERS([mpc/mpcdec.h], [
+    VLC_ADD_PLUGIN([mpc])
+    VLC_ADD_LIBS([mpc],[-lmpcdec])],
+    [AC_CHECK_HEADERS([mpcdec/mpcdec.h], [
     VLC_ADD_PLUGIN([mpc])
-    VLC_ADD_LIBS([mpc],[-lmpcdec])])
+    VLC_ADD_LIBS([mpc],[-lmpcdec])])])
 fi
 
 dnl
@@ -3910,14 +3918,6 @@ CPPFLAGS="${CPPFLAGS_save} ${X_CFLAGS}"
 
 AS_IF([test "${enable_x11}" != "no"], [
   AC_CHECK_HEADERS(X11/Xlib.h, [
-    VLC_ADD_PLUGIN([x11_screen])
-    VLC_ADD_CPPFLAGS([x11_screen],[${X_CFLAGS}])
-    VLC_ADD_LIBS([x11_screen],[${X_LIBS} ${X_PRE_LIBS} -lX11])
-
-    VLC_ADD_PLUGIN([panoramix])
-    VLC_ADD_LIBS([panoramix],[${X_LIBS} ${X_PRE_LIBS} -lX11])
-    VLC_ADD_CPPFLAGS([panoramix],[${X_CFLAGS}])
-
     VLC_ADD_PLUGIN([x11])
     VLC_ADD_LIBS([x11],[${X_LIBS} ${X_PRE_LIBS} -lX11])
     VLC_ADD_CPPFLAGS([x11],[${X_CFLAGS}])
@@ -4084,13 +4084,25 @@ AS_IF([test "${enable_xcb}" != "no"], [
   PKG_CHECK_MODULES(XCB, [xcb])
   PKG_CHECK_MODULES(XCB_SHM, [xcb-shm])
   VLC_ADD_PLUGIN([xcb])
+  VLC_ADD_PLUGIN([xcb_screen])
 
   AS_IF([test "${enable_xvideo}" != "no"], [
     PKG_CHECK_MODULES(XCB_XV, [xcb-xv >= 1.1.90.1], [
       VLC_ADD_PLUGIN([xcb_xv])
+    ], [
+      PKG_CHECK_MODULES(XCB_XV, [xcb-xv], [
+        VLC_ADD_PLUGIN([xcb_xv])
+        VLC_ADD_CFLAGS([xcb_xv], [-DXCB_XV_OLD])
+      ])
     ])
   ])
 
+  PKG_CHECK_MODULES(XCB_RANDR, [xcb-randr], [
+    VLC_ADD_PLUGIN([panoramix])
+    VLC_ADD_LIBS([panoramix],[${XCB_RANDR_LIBS} ${XCB_LIBS}])
+    VLC_ADD_CFLAGS([panoramix],[${XCB_RANDR_CFLAGS} ${XCB_CFLAGS}])
+  ], [true])
+
   dnl xcb-utils
   PKG_CHECK_MODULES(XCB_KEYSYMS, [xcb-keysyms])
 
@@ -4960,7 +4972,7 @@ AC_ARG_ENABLE(qt4,
   AS_IF([test "${SYS}" = "darwin"], [enable_qt4=no])
 ])
 AS_IF([test "${enable_qt4}" != "no"], [
-  PKG_CHECK_MODULES(QT4, [QtCore QtGui >= 4.4.2], [
+  PKG_CHECK_MODULES(QT4, [QtCore QtGui >= 4.4.0], [
     VLC_ADD_PLUGIN([qt4])
     AC_DEFINE([HAVE_QT4], 1, [Define to 1 if you have QT4 library.])
     ALIASES="${ALIASES} qvlc"
@@ -5555,8 +5567,8 @@ then
           [
             AC_PATH_PROGS(MOZILLA_CONFIG,
            [mozilla-config seamonkey-config xulrunner-config],
-            AC_MSG_ERROR([Please install the Mozilla development tools. mozilla-config was not found.])
-                 )
+        [no])
+            test "${MOZILLA_CONFIG}" = "no" && AC_MSG_ERROR([Please install the Mozilla development tools. mozilla-config was not found.])
           ]
         )
     dnl pkg-config failed but we might have found a mozilla-config