]> git.sesse.net Git - vlc/blobdiff - configure.ac
Fix help string
[vlc] / configure.ac
index dfb2cfd07904b74cf67daea098817ee93f18b3a6..29b2d3bb35eddae76c23653a2c4816f271d2e6d1 100644 (file)
@@ -450,6 +450,9 @@ m4_defun([AC_DEPLIBS_CHECK_METHOD],[])
 
 lt_cv_deplibs_check_method=pass_all
 
+AS_IF([test "${enable_shared}" = "no"], [
+  AC_MSG_ERROR([VLC is based on plugins. Shared libraries cannot be disabled.])
+])
 
 dnl
 dnl Gettext stuff
@@ -733,7 +736,7 @@ AC_CHECK_LIB(m,sqrt,[
   VLC_ADD_LIBS([headphone_channel_mixer normvol speex mono colorthres extract],[-lm])
 ])
 AC_CHECK_LIB(m,ceil,[
-  VLC_ADD_LIBS([hotkeys mosaic],[-lm])
+  VLC_ADD_LIBS([hotkeys mosaic swscale_omap],[-lm])
 ])
 AC_CHECK_LIB(m,exp,[
   VLC_ADD_LIBS([gaussianblur],[-lm])
@@ -932,6 +935,12 @@ AC_ARG_VAR(PKG_CONFIG_PATH,
           [Paths where to find .pc not at the default location])
 PKG_PROG_PKG_CONFIG()
 
+dnl On some OS we need static linking 
+AS_IF([test "${SYS}" = "mingw32" -o "${SYS}" = "mingwce" -o "${SYS}" = "darwin" ],[
+       PKG_CONFIG="${PKG_CONFIG} --static"
+    ])
+
+
 dnl
 dnl Check for zlib.h and -lz along with system -lminizip if available
 dnl 
@@ -969,8 +978,8 @@ then
   dnl api stable dbus
   PKG_CHECK_MODULES(DBUS, dbus-1 >= 1.0.0,
     [ AC_DEFINE( HAVE_DBUS, 1, [Define if you have the D-BUS library] )
-      VLC_ADD_LIBS([screensaver libvlccore],[$DBUS_LIBS])
-      VLC_ADD_CFLAGS([screensaver libvlccore],[$DBUS_CFLAGS])
+      VLC_ADD_LIBS([libvlccore],[$DBUS_LIBS])
+      VLC_ADD_CFLAGS([libvlccore],[$DBUS_CFLAGS])
       dnl Check for dbus control interface
         AC_ARG_ENABLE(dbus-control, [  --disable-dbus-control  D-BUS control interface (default enabled)])
         if test "${enable_dbus_control}" != "no"
@@ -1017,7 +1026,7 @@ RDC_PROG_CC_WFLAGS([all extra sign-compare undef pointer-arith bad-function-cast
 RDC_PROG_CC_FLAGS([-pipe])
 
 AC_ARG_ENABLE(warnings-as-error,
-      AS_HELP_STRING([--enable-warnings-as-error],[Treat acceptable warnings as error (default in debug)]),, [enable_warnings_as_error="$enable_debug"])
+      AS_HELP_STRING([--enable-warnings-as-error],[Treat acceptable warnings as error (default disabled)]),, [enable_warnings_as_error="no"])
 AS_IF([test "${enable_warnings_as_error}" = "yes"], [
     RDC_PROG_CC_WERRORFLAGS([unused-function unused-label unused-value unused-parameter unused-variable unused \
      missing-braces nonnull parentheses uninitialized address enum-compare undef comment switch \
@@ -2207,6 +2216,19 @@ if test "${enable_smb}" != "no"; then
      fi ])
 fi
 
+
+dnl
+dnl sftp access support
+dnl
+AC_ARG_ENABLE(sftp,
+  [  --enable-sftp           sftp input access module (default disable)])
+if test "${enable_sftp}" = "yes"; then
+  AC_CHECK_HEADERS(libssh2.h, [
+    VLC_ADD_PLUGIN([access_sftp])
+    VLC_ADD_LIBS([access_sftp], [-lssh2])
+  ])
+fi
+
 dnl
 dnl  libdvbpsi ts demux/mux
 dnl
@@ -2414,7 +2436,7 @@ AC_ARG_ENABLE(libcdio,
   [  --enable-libcdio        CD input and control library support (default enabled)])
 
 AC_ARG_ENABLE(vcdinfo,
-  [  --enable-libvcdinfo     VCD information library support (default enabled)])
+  [  --enable-vcdinfo        VCD information library support (default enabled)])
 
 have_libcdio=no
 have_libvcdinfo=no
@@ -3447,17 +3469,13 @@ AC_ARG_ENABLE(libass,
 AS_IF( [test "${enable_libass}" = "yes"], [
   PKG_CHECK_MODULES(LIBASS, libass >= 0.9.6,
       [
-        VLC_ADD_LDFLAGS([libass],[$LIBASS_LIBS])
+        VLC_ADD_LIBS([libass],[$LIBASS_LIBS])
         VLC_ADD_CFLAGS([libass],[$LIBASS_CFLAGS])
         VLC_ADD_PLUGIN([libass])
 
         AC_CHECK_HEADERS(fontconfig/fontconfig.h,
           [VLC_ADD_CPPFLAGS([libass],[-DHAVE_FONTCONFIG])
-        if test "${SYS}" = "mingw32"; then
-           VLC_ADD_LIBS([libass],[-lfontconfig -lfreetype -liconv -lz])
-        else
            VLC_ADD_LIBS([libass],[-lfontconfig])
-        fi
        ])
       ],[
         AC_MSG_WARN([LIBASS library not found])
@@ -3633,14 +3651,14 @@ AC_ARG_ENABLE(xvideo,
     enable_xvideo="$enable_xcb"
 ])
 
+need_xid_provider="no"
 AS_IF([test "${enable_xcb}" != "no"], [
-  PKG_CHECK_MODULES(XPROTO, [xproto])
-
   dnl libxcb
   PKG_CHECK_MODULES(XCB, [xcb])
   PKG_CHECK_MODULES(XCB_SHM, [xcb-shm])
   VLC_ADD_PLUGIN([xcb_x11])
   VLC_ADD_PLUGIN([xcb_screen])
+  VLC_ADD_PLUGIN([xcb_apps])
   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"], [
@@ -3661,16 +3679,25 @@ AS_IF([test "${enable_xcb}" != "no"], [
   ], [true])
 
   dnl xcb-utils
-  PKG_CHECK_MODULES(XCB_KEYSYMS, [xcb-keysyms >= 0.3.4],
-    [true],
-    [PKG_CHECK_MODULES(XCB_KEYSYMS, [xcb-keysyms])
-    VLC_ADD_CFLAGS([globalhotkeys], [-DXCB_KEYSYM_OLD_API])]
-  )
+  PKG_CHECK_MODULES(XCB_KEYSYMS, [xcb-keysyms >= 0.3.4], [
+    have_xcb_keysyms="yes"
+  ], [
+    PKG_CHECK_MODULES(XCB_KEYSYMS, [xcb-keysyms], [
+      have_xcb_keysyms="yes"
+      VLC_ADD_CFLAGS([globalhotkeys], [-DXCB_KEYSYM_OLD_API])
+    ], [
+      have_xcb_keysyms="no"
+      need_xid_provider="yes"
+    ])
+  ])
 
-  VLC_ADD_PLUGIN([xcb_window])
-  VLC_ADD_PLUGIN([globalhotkeys])
-  VLC_ADD_CFLAGS([globalhotkeys],[${XCB_KEYSYMS_CFLAGS} ${XCB_CFLAGS}] )
-  VLC_ADD_LIBS([globalhotkeys],[${XCB_KEYSYMS_LIBS} ${XCB_LIBS}] )
+  AS_IF([test "${have_xcb_keysyms}" = "yes"], [
+    PKG_CHECK_MODULES(XPROTO, [xproto])
+    VLC_ADD_PLUGIN([xcb_window])
+    VLC_ADD_PLUGIN([globalhotkeys])
+    VLC_ADD_CFLAGS([globalhotkeys], [${XCB_KEYSYMS_CFLAGS} ${XCB_CFLAGS}])
+    VLC_ADD_LIBS([globalhotkeys], [${XCB_KEYSYMS_LIBS} ${XCB_LIBS}])
+  ])
   VLC_ADD_PLUGIN([xdg_screensaver])
 ])
 
@@ -3959,6 +3986,7 @@ AC_ARG_ENABLE(omapfb,
         AC_CHECK_HEADERS(X11/Xlib.h, [
           VLC_ADD_LIBS([omapfb],[${X_LIBS} ${X_PRE_LIBS} -lX11]) ])
       ])
+      VLC_ADD_PLUGIN([swscale_omap])
     fi
 
 dnl
@@ -4306,6 +4334,7 @@ if test "${enable_skins2}" = "yes" ||
     VLC_ADD_CPPFLAGS([skins2],[-Imodules/gui/skins2 ${X_CFLAGS} -DX11_SKINS])
     VLC_ADD_CXXFLAGS([skins2],[-O2 -fno-rtti])
     VLC_ADD_LIBS([skins2],[${X_LIBS} ${X_PRE_LIBS} -lXext -lX11])
+    need_xid_provider="no"
   fi fi fi
 fi
 AM_CONDITIONAL(BUILD_SKINS, [test "${enable_skins2}" = "yes" ||
@@ -4313,26 +4342,25 @@ AM_CONDITIONAL(BUILD_SKINS, [test "${enable_skins2}" = "yes" ||
          test "${SYS}" != "mingwce" && test "${enable_skins2}" != "no")])
 
 dnl
-dnl Maemo
+dnl Hildon UI
 dnl
-AC_ARG_ENABLE(maemo,
-  [  --enable-maemo          Internet tablets based on Maemo SDK (default disabled)])
-if test "${enable_maemo}" = "yes"
-then
+AC_ARG_ENABLE(hildon,
+  [  --enable-hildon         Hildon touchscreen UI (default disabled)])
+AS_IF([test "${enable_hildon}" = "yes"], [
   PKG_CHECK_MODULES(HILDON, [hildon-1 hildon-fm-2], [
-    VLC_ADD_CFLAGS([maemo],[${HILDON_CFLAGS}])
-    VLC_ADD_LIBS([maemo],[${HILDON_LIBS}])
-    VLC_ADD_PLUGIN([maemo])
-    VLC_ADD_PLUGIN([swscale_maemo])
+    VLC_ADD_CFLAGS([hildon],[${HILDON_CFLAGS}])
+    VLC_ADD_LIBS([hildon],[${HILDON_LIBS}])
+    VLC_ADD_PLUGIN([hildon])
     ALIASES="${ALIASES} mvlc"
+    need_xid_provider="no"
   ], [
-    AS_IF([test "${enable_maemo}" = "yes"],[
+    AS_IF([test "${enable_hildon}" = "yes"],[
       AC_MSG_ERROR([Hildon libraries not found])
     ])
-    enable_maemo="no"
+    enable_hildon="no"
   ])
-fi
-AM_CONDITIONAL(BUILD_MAEMO, [test "${enable_maemo}" = "yes"])
+])
+AM_CONDITIONAL(BUILD_HILDON, [test "${enable_hildon}" = "yes"])
 
 dnl
 dnl QT 4
@@ -4347,15 +4375,16 @@ AS_IF([test "${enable_qt4}" != "no"], [
     ALIASES="${ALIASES} qvlc"
     AS_IF([test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce" -a "${SYS}" != "darwin"], [
         VLC_ADD_LIBS([qt4],[$QT4_LIBS -lX11])
+        need_xid_provider="no"
     ], [
         VLC_ADD_LIBS([qt4],[$QT4_LIBS -lole32])
     ])
-    QT4LOCALEDIR="$($PKG_CONFIG --variable=prefix QtCore)/share/qt4/translations/"
+    QT4LOCALEDIR="$(eval $PKG_CONFIG --variable=prefix QtCore)/share/qt4/translations/"
     AC_SUBST(QT4LOCALEDIR)
     VLC_ADD_CXXFLAGS([qt4],[$QT4_CFLAGS -DQT4LOCALEDIR=\\\\\\\"${QT4LOCALEDIR}\\\\\\\"])
-    AC_PATH_PROGS(MOC, [moc-qt4 moc], moc,`$PKG_CONFIG --variable=exec_prefix QtCore`/bin)
-    AC_PATH_PROG(RCC, rcc, rcc,`$PKG_CONFIG --variable=exec_prefix QtCore`/bin)
-    AC_PATH_PROGS(UIC, [uic-qt4 uic], uic,`$PKG_CONFIG --variable=exec_prefix QtCore`/bin)
+    AC_PATH_PROGS(MOC, [moc-qt4 moc], moc,`eval $PKG_CONFIG --variable=exec_prefix QtCore`/bin)
+    AC_PATH_PROG(RCC, rcc, rcc,`eval $PKG_CONFIG --variable=exec_prefix QtCore`/bin)
+    AC_PATH_PROGS(UIC, [uic-qt4 uic], uic,`eval $PKG_CONFIG --variable=exec_prefix QtCore`/bin)
   ], [
     AS_IF([test "${enable_qt4}" = "yes"],[
       AC_MSG_ERROR([Qt 4 library not found])
@@ -4540,6 +4569,13 @@ then
  ])
 fi
 
+dnl
+dnl Post-interface configuration checks
+dnl
+AS_IF([test "$need_xid_provider" = "yes"], [
+  AC_MSG_ERROR([X11 video outputs need a window provider (Qt4, Skins2, Hildon or xcb-utils), but none were found. Please install xcb-keysyms.])
+])
+
 dnl
 dnl Visualisation plugin
 dnl
@@ -4701,6 +4737,11 @@ dnl OSSO (Maemo screen blanking) plugin
 dnl
 PKG_ENABLE_MODULES_VLC([OSSO], [], [libosso], [Maemo support], [auto])
 
+AS_IF([test -f "/etc/maemo_version"], [
+  AC_DEFINE([HAVE_MAEMO], 1, [Define to 1 if building for the Maemo platform.])
+])
+
+
 dnl
 dnl update checking system
 dnl
@@ -4845,8 +4886,8 @@ then
             echo "Using $i.pc files." >&5
             echo "Using $i.pc files." >&6
            found=1
-           MOZILLA_CFLAGS=$( $PKG_CONFIG --cflags "$i" )
-           MOZILLA_LIBS=$( $PKG_CONFIG --libs "$i" )
+           MOZILLA_CFLAGS=$(eval $PKG_CONFIG --cflags "$i" )
+           MOZILLA_LIBS=$(eval $PKG_CONFIG --libs "$i" )
            break
          fi
        done
@@ -4979,13 +5020,7 @@ fi
 AC_LANG_POP(C++)
 AM_CONDITIONAL(BUILD_MOZILLA,${mozilla})
 
-dnl Tests for Osso and Xsp
-AC_CHECK_LIB(osso, osso_display_blanking_pause, [
-  PKG_CHECK_MODULES(GLIB2, glib-2.0, [
-    VLC_ADD_CPPFLAGS([xvmc glx],[-DHAVE_OSSO ${DBUS_CFLAGS} ${GLIB2_CFLAGS}])
-    VLC_ADD_LIBS([xvmc glx],[-losso])
- ])
-])
+dnl Tests for Xsp
 AC_CHECK_LIB(Xsp, XSPSetPixelDoubling,[
   VLC_ADD_CPPFLAGS([xvmc glx],[-DHAVE_XSP])
   VLC_ADD_LIBS([xvmc glx],[-lXsp])
@@ -5202,7 +5237,7 @@ AC_CONFIG_FILES([
   modules/gui/Makefile
   modules/gui/beos/Makefile
   modules/gui/macosx/Makefile
-  modules/gui/maemo/Makefile
+  modules/gui/hildon/Makefile
   modules/gui/minimal_macosx/Makefile
   modules/gui/qnx/Makefile
   modules/gui/qt4/Makefile