]> git.sesse.net Git - vlc/blobdiff - configure.ac
More updates, partially Mac-specific
[vlc] / configure.ac
index f0cef7897e657b6cdc2be6906356ed8bc6f601fb..5d1ffdd3a70d92cc35c78c4c8a5e5c461e103e1e 100644 (file)
@@ -346,6 +346,7 @@ case "${host_os}" in
 esac
 AM_CONDITIONAL(HAVE_BEOS, test "${SYS}" = "beos")
 AM_CONDITIONAL(HAVE_DARWIN, test "${SYS}" = "darwin")
+AM_CONDITIONAL(HAVE_LINUX, [test "${SYS}" = "linux"])
 AM_CONDITIONAL(HAVE_WIN32, test "${SYS}" = "mingw32")
 AM_CONDITIONAL(HAVE_WINCE, test "${SYS}" = "mingwce")
 
@@ -464,7 +465,7 @@ dnl Check for system libs needed
 need_libc=false
 
 dnl Check for usual libc functions
-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 strdup strndup strnlen atof lldiv posix_fadvise posix_madvise])
+AC_CHECK_FUNCS([gettimeofday strtod strtol strtof strtoll strtoull strsep isatty vasprintf asprintf swab sigrelse getpwuid_r memalign posix_memalign if_nametoindex atoll getenv putenv setenv gmtime_r ctime_r localtime_r lrintf daemon scandir fork bsearch lstat strlcpy strdup strndup strnlen atof lldiv posix_fadvise posix_madvise])
 AC_CHECK_FUNCS(strcasecmp,,[AC_CHECK_FUNCS(stricmp)])
 AC_CHECK_FUNCS(strncasecmp,,[AC_CHECK_FUNCS(strnicmp)])
 AC_CHECK_FUNCS(strcasestr,,[AC_CHECK_FUNCS(stristr)])
@@ -474,10 +475,6 @@ AH_BOTTOM([#include <vlc_fixups.h>])
 
 AC_CHECK_FUNCS(mmap, [VLC_ADD_PLUGIN([access_mmap])])
 
-AS_IF([test "${SYS}" = "linux"], [
-  AC_CHECK_FUNCS(tee)
-])
-
 dnl Check for setlocal and langinfo
 AC_CHECK_FUNCS(setlocale)
 AC_CHECK_HEADERS(langinfo.h)
@@ -641,6 +638,9 @@ AC_CHECK_LIB(m,ceil,[
 AC_CHECK_LIB(m,exp,[
   VLC_ADD_LIBS([gaussianblur],[-lm])
 ])
+AC_CHECK_LIB(m,round,[
+  VLC_ADD_LIBS([dbus],[-lm])
+])
 AC_CHECK_LIB(mx,sqrtf,[
   VLC_ADD_LIBS([x264],[-lmx])
 ])
@@ -1770,7 +1770,6 @@ then
     ])
   if test "x${have_lua}" = "xyes" ;  then
      AC_DEFINE(HAVE_LUA, 1, [Define if you have the lua library])
-     VLC_ADD_PLUGIN([lua])
      VLC_ADD_LIBS([lua],[$LUA_LIBS])
      VLC_ADD_CFLAGS([lua],[$LUA_CFLAGS])
   fi
@@ -1919,7 +1918,7 @@ if test "${enable_live555}" != "no"; then
       ], [
         AC_CHECK_LIB(liveMedia, main, [
           # We only have -lliveMedia, do builtins
-          VLC_ADD_BUILTINS([live555])
+          VLC_ADD_PLUGIN([live555])
           VLC_ADD_LIBS([live555], [-lliveMedia -lgroupsock -lBasicUsageEnvironment -lUsageEnvironment])
         ])
       ])
@@ -1941,7 +1940,7 @@ if test "${enable_live555}" != "no"; then
     if test -f "${real_live555_tree}/liveMedia/libliveMedia.a"; then
       AC_MSG_RESULT(${real_live555_tree}/liveMedia/libliveMedia.a)
 
-      VLC_ADD_BUILTINS([live555])
+      VLC_ADD_PLUGIN([live555])
 
       if test "${SYS}" = "mingw32"; then
         # add ws2_32 for closesocket, select, recv
@@ -3203,17 +3202,9 @@ dnl Trying with pkg-config
      CPPFLAGS="${CPPFLAGS} ${POSTPROC_CFLAGS}"
      CFLAGS="${CFLAGS} ${POSTPROC_CFLAGS}"
      AC_CHECK_HEADERS(postproc/postprocess.h)
-     if test "${SYS}" = "darwin"; then
-        VLC_ADD_BUILTINS([ffmpeg])
-     else
-        VLC_ADD_PLUGIN([ffmpeg])
-     fi
+     VLC_ADD_PLUGIN([ffmpeg])
      if test "${enable_sout}" != "no" -a "${enable_switcher}" = "yes"; then
-        if test "${SYS}" = "darwin"; then
-            VLC_ADD_BUILTINS([stream_out_switcher])
-        else
-            VLC_ADD_PLUGIN([stream_out_switcher])
-        fi
+        VLC_ADD_PLUGIN([stream_out_switcher])
      fi
      VLC_ADD_CFLAGS([ffmpeg stream_out_switcher],[${FFMPEG_CFLAGS}])
      VLC_ADD_LIBS([ffmpeg stream_out_switcher],[${FFMPEG_LIBS}])
@@ -3417,7 +3408,7 @@ then
     VLC_ADD_BUILTINS([quicktime])
   else
   AC_CHECK_HEADERS(QuickTime/QuickTime.h,
-    [ VLC_ADD_BUILTINS([quicktime])
+    [ VLC_ADD_PLUGIN([quicktime])
       VLC_ADD_LDFLAGS([quicktime],[-Wl,-framework,QuickTime,-framework,Carbon])
     ], [ AC_MSG_ERROR([cannot find QuickTime headers]) ])
   fi
@@ -4009,33 +4000,29 @@ dnl  kate decoder plugin
 dnl
 AC_ARG_ENABLE(kate,
 [  --enable-kate           kate codec (default enabled)])
-if test "${enable_kate}" != "no"; then
+AS_IF([test "${enable_kate}" != "no"], [
   PKG_CHECK_MODULES(KATE,[kate >= 0.1.1], [
-      VLC_ADD_PLUGINS([kate])
+      VLC_ADD_PLUGIN([kate])
       VLC_ADD_CFLAGS([kate],[$KATE_CFLAGS])
       VLC_ADD_LIBS([kate],[$KATE_LIBS]) ],[
         AC_CHECK_HEADERS(kate/kate.h, [
           AC_CHECK_LIB(kate, kate_decode_init, [
-            if test "${SYS}" = "mingw32"; then
-              VLC_ADD_PLUGINS([kate])
-            else
-              VLC_ADD_BUILTINS([kate])
-            fi
+            VLC_ADD_PLUGIN([kate])
             kate_libs="-lkate -logg"
             VLC_ADD_LDFLAGS([kate],[${kate_libs}]) ],[
-            if test "${enable_kate}" == "yes"; then
+            AS_IF([test "x${enable_kate}" != "x"], [
               AC_MSG_ERROR([libkate doesn't appear to be installed on your system.
               You also need to check that you have a libogg posterior to the 1.0 release.])
-            fi],
-            [-lkate -logg])
+            ])
+         ], [-lkate -logg])
         ],[
-          if test "${enable_kate}" == "yes"; then
+          AS_IF([test "x${enable_kate}" != "x"], [
             AC_MSG_ERROR([libkate headers do not appear to be installed on your system.
             You also need to check that you have a libogg posterior to the 1.0 release.])
-          fi
+          ])
         ])
   ])
-fi
+])
 
 
 dnl
@@ -5531,7 +5518,9 @@ then
  
   ORIGCFLAGS=$CFLAGS
   CFLAGS="$CFLAGS -x objective-c"
-  AC_CHECK_HEADER(QuartzCore/CALayer.h, [VLC_ADD_BUILTINS([opengllayer])])
+  AC_CHECK_HEADER(QuartzCore/CALayer.h, 
+  [VLC_ADD_PLUGIN([opengllayer])
+  VLC_ADD_OBJCFLAGS([opengllayer], [-isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5])])
   CFLAGS=$ORIGCFLAGS
 fi
 
@@ -6145,20 +6134,16 @@ AC_LANG_POP(C++)
 AM_CONDITIONAL(BUILD_MOZILLA,${mozilla})
 
 dnl Tests for Osso and Xsp
-if test "${enable_x11}" != "no" &&
-  (test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce" ||
-   test "${enable_x11}" = "yes"); then
-   AC_CHECK_LIB(osso, osso_display_blanking_pause,[
-      PKG_CHECK_MODULES(GLIB2, glib-2.0, [                                               
-          VLC_ADD_CPPFLAGS([x11],[-DHAVE_OSSO ${DBUS_CFLAGS} ${GLIB2_CFLAGS}])
-          VLC_ADD_LIBS([x11],[-losso])
-      ])
-   ])
-   AC_CHECK_LIB(Xsp, XSPSetPixelDoubling,[
-      VLC_ADD_CPPFLAGS([x11],[-DHAVE_XSP])
-      VLC_ADD_LIBS([x11],[-lXsp])
-   ])
-fi
+AC_CHECK_LIB(osso, osso_display_blanking_pause, [
+  PKG_CHECK_MODULES(GLIB2, glib-2.0, [
+    VLC_ADD_CPPFLAGS([x11 xvideo xvmc glx],[-DHAVE_OSSO ${DBUS_CFLAGS} ${GLIB2_CFLAGS}])
+    VLC_ADD_LIBS([x11 xvideo xvmc glx],[-losso])
+ ])
+])
+AC_CHECK_LIB(Xsp, XSPSetPixelDoubling,[
+  VLC_ADD_CPPFLAGS([x11 xvideo xvmc glx],[-DHAVE_XSP])
+  VLC_ADD_LIBS([x11 xvideo xvmc glx],[-lXsp])
+])
 
 dnl
 dnl  Mediacontrol Python bindings
@@ -6302,8 +6287,8 @@ dnl
 dnl Pic and shared libvlc stuff
 dnl
 AS_IF([test "${SYS}" = "mingw32"], [
+  FILE_LIBVLCCORE_DLL="!define LIBVLCCORE_DLL libvlccore.dll"
   FILE_LIBVLC_DLL="!define LIBVLC_DLL libvlc.dll"
-  FILE_LIBVLC_CONTROL_DLL="!define LIBVLC_CONTROL_DLL libvlc-control.dll"
 ])
 
 dnl
@@ -6363,8 +6348,8 @@ AC_SUBST(WINE_SDK_PATH)
 AC_SUBST(LIBEXT)
 AC_SUBST(AM_CPPFLAGS)
 AC_SUBST(MACOSX_DEPLOYMENT_TARGET)
+AC_SUBST(FILE_LIBVLCCORE_DLL)
 AC_SUBST(FILE_LIBVLC_DLL)
-AC_SUBST(FILE_LIBVLC_CONTROL_DLL)
 
 dnl Create vlc-config.in
 VLC_OUTPUT_VLC_CONFIG_IN
@@ -6374,7 +6359,6 @@ AC_CONFIG_FILES([
   Makefile
   projects/activex/Makefile
   projects/activex/axvlc.inf
-  bindings/Makefile
   bindings/python/Makefile
   doc/Makefile
   extras/package/ipkg/Makefile