]> git.sesse.net Git - vlc/blobdiff - configure.ac
python-ctypes: implement basic unit tests
[vlc] / configure.ac
index 82b7076afeb0c23d9dec758fec55e7ab68bcf35f..6f0b053d9edd3e32c31b855b9c22c5dadea300ac 100644 (file)
@@ -343,7 +343,7 @@ case "${host_os}" in
             [#ifdef WIN32
              yes
              #endif],
-            SYS=mingw32, SYS=cygwin)
+            SYS=mingw32, AC_MSG_ERROR([VLC requires -mno-cygwin]))
         ;;
     esac
 
@@ -479,7 +479,7 @@ if test "${SYS}" = "mingw32"
 then
     AC_CHECK_LIB(mingwex,opendir,
         AC_CHECK_LIB(mingw32,opendir,,
-            [VLC_ADD_LIBS([libvlccore gtk],[-lmingwex])])
+            [VLC_ADD_LIBS([libvlccore],[-lmingwex])])
     )
 fi
 
@@ -762,7 +762,7 @@ fi
 
 # Win32 style
 if test "${ac_cv_have_plugins}" = "no"; then
-  if test "${SYS}" = "mingw32" -o "${SYS}" = "cygwin"; then
+  if test "${SYS}" = "mingw32" ; then
     AC_CHECK_LIB(kernel32, main,
      [VLC_ADD_LIBS([libvlccore],[-lkernel32])
       AC_DEFINE(HAVE_DL_WINDOWS, 1, [Define if you have Windows' LoadLibrary])
@@ -987,12 +987,6 @@ fi
 ;;
 esac
 
-dnl Build the gtk_main plugins?
-NEED_GTK_MAIN=no
-NEED_GNOME_MAIN=no
-NEED_GTK2_MAIN=no
-NEED_GNOME2_MAIN=no
-
 dnl build the qte plugin ?
 NEED_QTE_MAIN=no
 
@@ -2064,7 +2058,7 @@ AC_ARG_ENABLE(dshow,
   [  --enable-dshow          Win32 DirectShow support (default enabled on Win32)])
 if test "${enable_dshow}" != "no"
 then
-  if test "${SYS}" = "mingw32" -o "${SYS}" = "cygwin"
+  if test "${SYS}" = "mingw32"
   then
     AC_LANG_PUSH(C++)
       AC_CHECK_HEADERS(dshow.h,
@@ -2083,7 +2077,7 @@ AC_ARG_ENABLE(bda,
                  enabled on Win32)]))
 if test "${enable_bda}" != "no"
 then
-  if test "${SYS}" = "mingw32" -o "${SYS}" = "cygwin"
+  if test "${SYS}" = "mingw32"
   then
       AC_CHECK_HEADERS(dshow.h,
       [ VLC_ADD_PLUGIN([bda])
@@ -2102,7 +2096,7 @@ if test "${enable_opencv}" = "yes" -a "${CXX}" != "";
 then
   AC_ARG_WITH(opencv-tree,
   [    --with-opencv-tree=PATH opencv tree for linking])
-    if test "${SYS}" = "mingw32" -o "${SYS}" = "cygwin"
+    if test "${SYS}" = "mingw32"
     then
       test -z "${with_opencv_tree}" && AC_MSG_ERROR([You have to specify --with-opencv-tree])
       AC_MSG_CHECKING(for opencv in ${with_opencv_tree})
@@ -3549,6 +3543,7 @@ AS_IF([test "${enable_xcb}" != "no"], [
   PKG_CHECK_MODULES(XCB_SHM, [xcb-shm])
   VLC_ADD_PLUGIN([xcb_x11])
   VLC_ADD_PLUGIN([xcb_screen])
+  VLC_SET_CFLAGS_WERROR([xcb_screen], [-Wno-error=uninitialized]) # some gcc report a warning which doesn't reveal an error
 
   AS_IF([test "${enable_xvideo}" != "no"], [
     PKG_CHECK_MODULES(XCB_XV, [xcb-xv >= 1.1.90.1], [
@@ -3617,81 +3612,41 @@ then
       then
         SDL_PATH="${with_sdl_config_path}:${PATH}"
       fi ])
-  AC_PATH_PROG(SDL12_CONFIG, sdl12-config, no, ${SDL_PATH})
-  SDL_CONFIG="${SDL12_CONFIG}"
-  SDL_HEADER="SDL12/SDL.h"
-  SDL_IMAGE="SDL12/SDL_image.h"
-  if test "${SDL_CONFIG}" = "no"
-  then
-    AC_PATH_PROG(SDL11_CONFIG, sdl11-config, no, ${SDL_PATH})
-    SDL_CONFIG=${SDL11_CONFIG}
-    SDL_HEADER="SDL11/SDL.h"
-    SDL_IMAGE="SDL11/SDL_image.h"
-  fi
-  if test "${SDL_CONFIG}" = "no"
-  then
-    AC_PATH_PROG(SDL_CONFIG, sdl-config, no, ${SDL_PATH})
-    SDL_HEADER="SDL/SDL.h"
-    SDL_IMAGE="SDL/SDL_image.h"
-  fi
-  # check for cross-compiling
-  SDL_PREFIX=
-  AC_ARG_WITH(sdl-prefix,
-    [    --with-sdl-prefix=PATH path to libsdl (needed for cross-compiling),
-                               e.g use as:
-                               --with-sdl-prefix=/usr/local/arm/2.95.3/arm-linux/usr)],[],[])
-  if test "${with_sdl_prefix}" != "no" -a -n "${with_sdl_prefix}"
-  then
-    SDL_PREFIX="--prefix=${with_sdl_prefix}"
-  fi
-  if test "${SDL_CONFIG}" != "no"
-  then
-    # SDL on Darwin is heavily patched and can only run SDL_image
-    if test "${SYS}" != "darwin"; then
-      VLC_ADD_PLUGIN([vout_sdl])
-      VLC_ADD_PLUGIN([aout_sdl])
-    fi
-    VLC_ADD_CFLAGS([vout_sdl aout_sdl sdl_image],[`${SDL_CONFIG} ${SDL_PREFIX} --cflags | sed 's,SDL,,'`])
-    VLC_ADD_LIBS([vout_sdl aout_sdl sdl_image],[`${SDL_CONFIG} ${SDL_PREFIX} --libs | sed 's,-rdynamic,,'`])
-    CPPFLAGS="${CPPFLAGS_save} ${CFLAGS_vout_sdl}"
-    AC_CHECK_HEADERS(${SDL_HEADER}, AC_DEFINE_UNQUOTED(SDL_INCLUDE_FILE,
-      <${SDL_HEADER}>, Indicate whether we should use SDL/SDL.h or SDL11/SDL.h),
-      [ AC_CHECK_HEADERS(SDL.h, AC_DEFINE(SDL_INCLUDE_FILE, <SDL.h>,
-          As a last resort we also test for SDL.h presence),
-      [ AC_MSG_ERROR([The development package for SDL is not installed.
-Please install it and try again. Alternatively you can also configure with
---disable-sdl.])
-      ])])
-    AS_IF([ test "${enable_sdl_image}" != "no"],[
-      AC_CHECK_HEADERS(${SDL_IMAGE}, [AC_DEFINE_UNQUOTED(SDL_IMAGE_INCLUDE_FILE,
-        <${SDL_IMAGE}>, Indicate the path of SDL_image.h)
-        VLC_ADD_PLUGIN([sdl_image])
-        AC_CHECK_LIB(png, png_set_rows,
-          [VLC_ADD_LIBS([sdl_image],[-lpng -lz])],[],[-lz])
-        AC_CHECK_LIB(jpeg, jpeg_start_decompress,
-          [VLC_ADD_LIBS([sdl_image],[-ljpeg])])
-        AC_CHECK_LIB(tiff, TIFFClientOpen,
-          [VLC_ADD_LIBS([sdl_image],[-ltiff])])
-        VLC_ADD_LIBS([sdl_image], [-lSDL_image])],
-        [ AC_CHECK_HEADERS(SDL_image.h, AC_DEFINE(SDL_IMAGE_INCLUDE_FILE, <SDL_image.h>,
-            As a last resort we also test for SDL_image.h presence),
-        [ AC_MSG_WARN([The development package for SDL_image is not installed.
-  You should install it alongside your SDL package.])
-        ])])
-    ])
-    CPPFLAGS="${CPPFLAGS_save}"
-    if expr 1.1.5 \> `${SDL_CONFIG} --version` >/dev/null
-    then
-      AC_MSG_ERROR([The development package for SDL is not installed.
-Please install it and try again. Alternatively you can also configure with
---disable-sdl.])
-    fi
-
-  elif test "${enable_sdl}" =  "yes"
-  then
-    AC_MSG_ERROR([I couldn't find the SDL package. You can download libSDL
+  AC_PATH_PROG(SDL_CONFIG, sdl-config, no, ${SDL_PATH})
+  SDL_HEADER="SDL/SDL.h"
+  SDL_IMAGE="SDL/SDL_image.h"
+
+  if test "${SDL_CONFIG}" != "no";  then
+     PKG_CHECK_MODULES(SDL, [sdl >= 1.2.10], [
+        # SDL on Darwin is heavily patched and can only run SDL_image
+        if test "${SYS}" != "darwin"; then
+          VLC_ADD_PLUGIN([vout_sdl])
+          VLC_ADD_PLUGIN([aout_sdl])
+        fi
+        VLC_ADD_CFLAGS([vout_sdl aout_sdl sdl_image],[`${SDL_CONFIG} --cflags | sed 's,SDL,,'`])
+        VLC_ADD_LIBS([vout_sdl aout_sdl sdl_image],[`${SDL_CONFIG} --libs | sed 's,-rdynamic,,'`])
+
+        # SDL_image
+        AS_IF([ test "${enable_sdl_image}" != "no"],[
+          AC_CHECK_HEADERS("SDL/SDL_image.h", [
+            VLC_ADD_PLUGIN([sdl_image])
+            AC_CHECK_LIB(png, png_set_rows, [VLC_ADD_LIBS([sdl_image],[-lpng -lz])],[],[-lz])
+            AC_CHECK_LIB(jpeg, jpeg_start_decompress, [VLC_ADD_LIBS([sdl_image],[-ljpeg])])
+            AC_CHECK_LIB(tiff, TIFFClientOpen, [VLC_ADD_LIBS([sdl_image],[-ltiff])])
+            VLC_ADD_LIBS([sdl_image], [-lSDL_image])],
+            [ AC_MSG_WARN([The development package for SDL_image is not installed.
+      You should install it alongside your SDL package.])
+            ])
+        ])
+     ],[
+       AC_MSG_ERROR([The development package for SDL is too old. You need 1.2.10.
+                    Alternatively you can also configure with --disable-sdl.])
+     ])
+  else if test "${enable_sdl}" =  "yes"; then
+    AC_MSG_ERROR([I could not find the SDL package. You can download libSDL
 from http://www.libsdl.org/, or configure with --disable-sdl. Have a nice day.
     ])
+      fi
   fi
 fi
 
@@ -3819,7 +3774,7 @@ dnl
 dnl  Windows DirectX module
 dnl
 
-if test "${SYS}" = "mingw32" -o "${SYS}" = "mingwce" -o "${SYS}" = "cygwin"
+if test "${SYS}" = "mingw32" -o "${SYS}" = "mingwce"
 then
   VLC_ADD_PLUGIN([panoramix])
 fi
@@ -3828,7 +3783,7 @@ AC_ARG_ENABLE(directx,
   [  --enable-directx        Win32 DirectX support (default enabled on Win32)])
 if test "${enable_directx}" != "no"
 then
-  if test "${SYS}" = "mingw32" -o "${SYS}" = "mingwce" -o "${SYS}" = "cygwin"
+  if test "${SYS}" = "mingw32" -o "${SYS}" = "mingwce"
   then
     AC_ARG_WITH(directx,
     [    --with-directx=PATH   Win32 DirectX headers])
@@ -4029,7 +3984,7 @@ dnl
 AC_ARG_ENABLE(wingdi,
   [  --enable-wingdi         Win32 GDI module (default enabled on Win32)])
 if test "${enable_wingdi}" != "no"; then
-  if test "${SYS}" = "mingw32" -o "${SYS}" = "cygwin"; then
+  if test "${SYS}" = "mingw32"; then
     VLC_ADD_PLUGIN([wingdi])
     VLC_ADD_LIBS([wingdi],[-lgdi32])
   fi
@@ -4086,7 +4041,7 @@ dnl
 AC_ARG_ENABLE(waveout,
   [  --enable-waveout        Win32 waveOut module (default enabled on Win32)])
 if test "${enable_waveout}" != "no"; then
-  if test "${SYS}" = "mingw32" -o "${SYS}" = "cygwin"; then
+  if test "${SYS}" = "mingw32"; then
     VLC_ADD_PLUGIN([waveout])
     VLC_ADD_LIBS([waveout],[-lwinmm])
   fi
@@ -4243,7 +4198,7 @@ if test "${enable_skins2}" = "yes" ||
     fi
   fi
 
-  if test "${skins2_missing_lib}" = "no" && (test "${SYS}" = "mingw32" -o "${SYS}" = "cygwin"); then
+  if test "${skins2_missing_lib}" = "no" && (test "${SYS}" = "mingw32"); then
     VLC_ADD_PLUGIN([skins2])
     ALIASES="${ALIASES} svlc"
     VLC_ADD_CPPFLAGS([skins2],[-U_OFF_T_ -U_off_t -Imodules/gui/skins2 -DWIN32_SKINS])
@@ -4269,28 +4224,6 @@ AM_CONDITIONAL(BUILD_SKINS, [test "${enable_skins2}" = "yes" ||
         (test "${SYS}" != "darwin" && test "${SYS}" != "beos" &&
          test "${SYS}" != "mingwce" && test "${enable_skins2}" != "no")])
 
-dnl
-dnl  PDA Gtk+2 module
-dnl
-AC_ARG_ENABLE(pda,
-  [  --enable-pda            PDA interface needs Gtk2 support (default disabled)])
-if test "${enable_pda}" = "yes"
-then
-  PKG_CHECK_MODULES(GTK2, [gtk+-2.0 >= 2.0.0, gthread-2.0])
-  VLC_ADD_CFLAGS([gtk2],[${GTK2_CFLAGS}])
-  VLC_ADD_LIBS([gtk2],[${GTK2_LIBS}])
-  VLC_ADD_CFLAGS([pda],[${GTK2_CFLAGS} ${CFLAGS_pda}])
-  VLC_ADD_LIBS([pda],[${LDFLAGS_pda}])
-  VLC_ADD_LIBS([pda],[${GTK2_LIBS}])
-  VLC_ADD_PLUGIN([pda])
-  if test "${SYS}" != "mingw32"; then
-    NEED_GTK2_MAIN=yes
-    VLC_ADD_CFLAGS([gtk2_main],[$GTK2_CFLAGS])
-    VLC_ADD_LIBS([gtk2_main],[$GTK2_LIBS])
-  fi
-fi
-AM_CONDITIONAL(BUILD_PDA, [test "${enable_pda}" = "yes"])
-
 dnl
 dnl Maemo
 dnl
@@ -4326,7 +4259,7 @@ AS_IF([test "${enable_qt4}" != "no"], [
     VLC_ADD_PLUGIN([qt4])
     AC_DEFINE([HAVE_QT4], 1, [Define to 1 if you have QT4 library.])
     ALIASES="${ALIASES} qvlc"
-    AS_IF([test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce" -a "${SYS}" != "cygwin" -a "${SYS}" != "darwin"], [
+    AS_IF([test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce" -a "${SYS}" != "darwin"], [
         VLC_ADD_LIBS([qt4],[$QT4_LIBS -lX11])
     ], [
         VLC_ADD_LIBS([qt4],[$QT4_LIBS -lole32])
@@ -4729,7 +4662,7 @@ AC_ARG_WITH(wine-sdk-path,
   [    --with-wine-sdk-path=PATH path to wine sdk])
 if test "${enable_activex}" != "no"
 then
-  if test "${SYS}" = "mingw32" -o "${SYS}" = "cygwin"
+  if test "${SYS}" = "mingw32"
   then
     AC_CHECK_PROGS(MIDL, [midl], no)
     if test "${with_wine_sdk_path}" != ""
@@ -4972,39 +4905,6 @@ then
   VLC_ADD_PLUGIN([test4])
 fi
 
-dnl
-dnl  gtk_main plugin
-dnl
-if test "${NEED_GTK_MAIN}" != "no"
-then
-    VLC_ADD_PLUGIN([gtk_main])
-    VLC_ADD_CFLAGS([gtk_main],[${CFLAGS_gtk}])
-    VLC_ADD_LDFLAGS([gtk_main],[${LDFLAGS_gtk}])
-fi
-
-if test "${NEED_GNOME_MAIN}" != "no"
-then
-    VLC_ADD_PLUGIN([gnome_main])
-    VLC_ADD_CFLAGS([gnome_main],[${CFLAGS_gtk} ${CFLAGS_gnome}])
-    VLC_ADD_LDFLAGS([gnome_main],[${LDFLAGS_gtk} ${LDFLAGS_gnome}])
-fi
-
-if test "${NEED_GTK2_MAIN}" != "no"
-then
-    VLC_ADD_PLUGIN([gtk2_main])
-    VLC_ADD_CFLAGS([gtk2],[-DNEED_GTK2_MAIN])
-    VLC_ADD_CFLAGS([pda],[-DNEED_GTK2_MAIN])
-    VLC_ADD_CFLAGS([gtk2_main],[${CFLAGS_gtk2} ${CFLAGS_pda}])
-    VLC_ADD_LDFLAGS([gtk2_main],[${LDFLAGS_gtk2} ${LDFLAGS_pda}])
-fi
-
-if test "${NEED_GNOME2_MAIN}" != "no"
-then
-    VLC_ADD_PLUGIN([gnome2_main])
-    VLC_ADD_CFLAGS([gnome2_main],[${CFLAGS_gtk2} ${CFLAGS_gnome2}])
-    VLC_ADD_LDFLAGS([gnome2_main],[${LDFLAGS_gtk2} ${LDFLAGS_gnome2}])
-fi
-
 dnl
 dnl  qte_main plugin
 dnl
@@ -5194,7 +5094,6 @@ AC_CONFIG_FILES([
   modules/demux/playlist/Makefile
   modules/gui/Makefile
   modules/gui/beos/Makefile
-  modules/gui/pda/Makefile
   modules/gui/macosx/Makefile
   modules/gui/maemo/Makefile
   modules/gui/minimal_macosx/Makefile