]> git.sesse.net Git - vlc/blobdiff - configure.ac
- added support for 64 bit version of mozilla SDK, thanks to thresh for the patch
[vlc] / configure.ac
index c923138d5e816e1e3e5a1fdeb045614d5b07a4ea..704fcedaa4ce6ca97f886c6668800686d3597c57 100644 (file)
@@ -404,7 +404,7 @@ CPPFLAGS_save="${CPPFLAGS_save} -DSYS_`echo ${SYS} | sed -e 's/-.*//' | tr 'abcd
 dnl Check for system libs needed
 need_libc=false
 
-AC_CHECK_FUNCS(gettimeofday select strerror strtod strtol strtof strtoll strtoull strsep isatty vasprintf asprintf swab sigrelse getpwuid memalign posix_memalign if_nametoindex atoll getenv putenv setenv gmtime_r ctime_r localtime_r lrintf daemon scandir fork bsearch lstat)
+AC_CHECK_FUNCS(gettimeofday strtod strtol strtof strtoll strtoull strsep isatty vasprintf asprintf swab sigrelse getpwuid memalign posix_memalign if_nametoindex atoll getenv putenv setenv gmtime_r ctime_r localtime_r lrintf daemon scandir fork bsearch lstat strlcpy)
 
 dnl Check for usual libc functions
 AC_CHECK_FUNCS(strdup strndup atof)
@@ -817,6 +817,27 @@ then
   )
 fi
 
+dnl Check for dbus
+AC_ARG_ENABLE(dbus,
+  [  --enable-dbus            Linux D-BUS message bus system (default enabled)])
+if test "${enable_dbus}" != "no" -a "${SYS}" = "linux"
+then
+  PKG_CHECK_MODULES(DBUS, dbus-1 >= 0.30,
+    [ AC_DEFINE( HAVE_DBUS_1, 1, [Define if you have the new D-BUS library API])
+      AC_DEFINE( HAVE_DBUS, 1, [Define if you have the D-BUS library] )
+      VLC_ADD_LDFLAGS([screensaver],[$DBUS_LIBS])
+      VLC_ADD_CFLAGS([screensaver],[$DBUS_CFLAGS])],   
+    dnl older dbus
+    [ PKG_CHECK_MODULES( DBUS, dbus-1, 
+       [AC_DEFINE(HAVE_DBUS, 1, [Define if you have the D-BUS library])
+        VLC_ADD_LDFLAGS([screensaver],[$DBUS_LIBS])
+        VLC_ADD_CFLAGS([screensaver],[$DBUS_CFLAGS])],
+       [AC_MSG_WARN(DBUS library not found)])
+    ]
+  )
+fi
+
 dnl Build the gtk_main plugins?
 NEED_GTK_MAIN=no
 NEED_GNOME_MAIN=no
@@ -2336,6 +2357,43 @@ then
     VLC_ADD_LDFLAGS([mpc],[-lmpcdec])])
 fi
 
+dnl
+dnl  game music emu demux plugin
+dnl
+AC_ARG_ENABLE(gme,
+  [  --enable-gme            Game Music Emu demux support (default enabled)])
+if test "${enable_gme}" != "no" -a "${CXX}" != "";
+then
+  AC_LANG_PUSH(C++)
+  AC_ARG_WITH(gme-tree,
+  [    --with-gme-tree=PATH gme tree for static linking])
+  if test -n "${with_gme_tree}"
+  then
+    AC_MSG_CHECKING(for libgme.a in ${with_mod_tree})
+    real_gme_tree="`cd ${with_gme_tree} 2>/dev/null && pwd`"
+    if test -z "${real_gme_tree}"
+    then
+      dnl  The given directory can't be found
+      AC_MSG_RESULT(no)
+      AC_MSG_ERROR([cannot cd to ${with_gme_tree}])
+    fi
+    if test -f "${real_gme_tree}/gme/libgme.a"
+    then
+      dnl  Use a custom gme
+      AC_MSG_RESULT(${real_gme_tree}/gme/libgme.a)
+      VLC_ADD_PLUGINS([gme])
+      VLC_ADD_LDFLAGS([gme],[${real_gme_tree}/gme/libgme.a])
+      VLC_ADD_CXXFLAGS([gme],[-I${real_gme_tree}/gme])
+    else
+      dnl  The given gme wasn't built
+      AC_MSG_RESULT(no)
+      AC_MSG_ERROR([cannot find ${real_mod_tree}/gme/libgme.a, make sure you compiled gme in ${with_gme_tree}])
+    fi
+  else
+      AC_MSG_WARN([only static linking is available, you must provide a gme-tree])
+  fi
+  AC_LANG_POP(C++)
+fi
 
 dnl
 dnl  Codec plugins
@@ -2814,7 +2872,7 @@ dnl
 dnl MP4 module
 dnl
 AC_CHECK_HEADERS(zlib.h, [
-  VLC_ADD_LDFLAGS([mp4 skins2 sap mkv],[-lz])
+  VLC_ADD_LDFLAGS([mp4 skins2 sap mkv gme],[-lz])
 ] )
 
 AC_CHECK_HEADERS(sysfs/libsysfs.h, [
@@ -5073,7 +5131,7 @@ then
   if test "${mozilla}" != "false"
   then
     build_pic=yes
-    AC_PATH_PROG(XPIDL, xpidl, no, ${xpidl_path} /usr/lib/mozilla)
+    AC_PATH_PROG(XPIDL, xpidl, no, ${xpidl_path}:/usr/lib/mozilla:/usr/lib64/mozilla)
     if test "${XPIDL}" = "no"; then
       AC_MSG_ERROR([Please install the Mozilla development tools, xpidl was not found.])
     fi
@@ -5130,7 +5188,7 @@ dnl
 if test "${SYS}" = "mingw32" -o "${SYS}" = "cygwin"
 then
     AC_CHECK_LIB(unicows, LoadUnicowsSymbol, [
-        VLC_ADD_LDFLAGS([vlc],[-lunicows])
+        VLC_ADD_LDFLAGS([vlc],[-Wl,--exclude-libs,libunicows.a -lunicows])
     ])
 fi
 
@@ -5234,7 +5292,7 @@ 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"], [
   AC_DEFINE(HAVE_SHARED_LIBVLC, 1, [Define to 1 if libvlc is built as a shared library.])
-  FILE_LIBVLC_DLL="File libvlc.dll"],
+  FILE_LIBVLC_DLL="!insertmacro InstallFile libvlc.dll"],
   FILE_LIBVLC_DLL="" )
 
 pic=no