X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=configure.ac;h=73049462a764147c9e6265c5c3499d07ee07a38b;hb=db1e6a133d1e29d3eb5bf8d526b76423d523d6a9;hp=0e67950565982d4026843475c7a52aff75108118;hpb=2cb15bea96c595250ec403acdf256579898198b4;p=vlc diff --git a/configure.ac b/configure.ac index 0e67950565..73049462a7 100644 --- a/configure.ac +++ b/configure.ac @@ -21,12 +21,18 @@ AC_CONFIG_MACRO_DIR(m4) AC_CONFIG_LIBOBJ_DIR(compat) AC_CANONICAL_BUILD AC_CANONICAL_HOST +AC_PRESERVE_HELP_ORDER AM_INIT_AUTOMAKE(tar-ustar) AM_CONFIG_HEADER(config.h) # Disable with "./configure --disable-silent-rules" or "make V=1" -m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) +m4_ifdef([AM_SILENT_RULES], [ + AM_SILENT_RULES([yes]) +], [ + AM_DEFAULT_VERBOSITY=1 + AC_SUBST(AM_DEFAULT_VERBOSITY) +]) dnl Too many people are not aware of maintainer mode: @@ -83,6 +89,9 @@ AC_C_CONST AC_C_INLINE AC_C_RESTRICT +dnl Extend the --help string at the current spot. +AC_DEFUN([EXTEND_HELP_STRING], [m4_divert_once([HELP_ENABLE], [$1])]) + dnl Allow binary package maintainer to pass a custom string to avoid dnl cache problem AC_ARG_WITH(binary-version, @@ -171,7 +180,7 @@ case "${host_os}" in bsdi*) SYS=bsdi CFLAGS_save="${CFLAGS_save} -pthread"; CFLAGS="${CFLAGS_save}" - VLC_ADD_LIBS([dvd dvdcss vcd cdda vcdx],[-ldvd]) + VLC_ADD_LIBS([vcd cdda vcdx],[-ldvd]) ;; *bsd*) SYS="${host_os}" @@ -272,28 +281,6 @@ case "${host_os}" in export MACOSX_DEPLOYMENT_TARGET fi ;; - darwin9*) - if test "${host_cpu}" = "i386"; then - dnl Due to a ld(64) bug in 10.5 we cannot use our mmx code - dnl without hacking it a lot, we disable mmx and sse. - dnl (that bug is about ld being unable to handle - dnl text relocation) - save_cflags="$CFLAGS" - CFLAGS="$CFLAGS -dynamiclib -single_module -read_only_relocs suppress" - AC_TRY_LINK( - [int a;], [asm("movq _a,%mm0\n");], - ac_ld_does_not_support_text_reloc=no, - ac_ld_does_not_support_text_reloc=yes) - CFLAGS="$save_cflags" - - if test "x$ac_ld_does_not_support_text_reloc" = "xyes"; then - enable_mmx="no" - echo " Assuming --disable-mmx (due to a bug in ld)" - enable_sse="no" - echo " Assuming --disable-sse (due to a bug in ld)" - fi - fi - ;; *mingw32* | *cygwin* | *wince* | *mingwce*) AC_CHECK_TOOL(WINDRES, windres, :) AC_CHECK_TOOL(OBJCOPY, objcopy, :) @@ -324,7 +311,7 @@ case "${host_os}" in # add ws2_32 for closesocket, select, recv VLC_ADD_LIBS([libvlccore],[-lws2_32 -lnetapi32 -lwinmm]) VLC_ADD_LDFLAGS([vlc],[-mwindows]) - VLC_ADD_LIBS([activex mozilla],[-lgdi32]) + VLC_ADD_LIBS([activex mozilla win32text],[-lgdi32]) VLC_ADD_LIBS([cdda vcdx sdl_image aout_sdl vout_sdl],[-lwinmm]) VLC_ADD_LIBS([access_http access_mms access_udp access_tcp access_ftp access_rtmp access_output_udp access_output_shout access_output_rtmp sap slp oldhttp stream_out_standard stream_out_rtp stream_out_raop vod_rtsp access_realrtsp rtp oldtelnet oldrc netsync gnutls growl_udp flac ts audioscrobbler lua remoteosd zvbi audiobargraph_a netsync],[-lws2_32]) VLC_ADD_LIBS([filesystem], [-lshlwapi]) @@ -548,7 +535,7 @@ AC_CHECK_FUNCS(fdatasync,, ]) dnl Check for non-standard system calls -AC_CHECK_FUNCS([accept4 eventfd fstatfs vmsplice]) +AC_CHECK_FUNCS([accept4 dup3 eventfd fstatfs vmsplice]) AH_BOTTOM([#include ]) @@ -1157,8 +1144,7 @@ fi dnl dnl Accelerated modules dnl -AC_ARG_WITH(,[]) -AC_ARG_WITH(,[Optimization options:]) +EXTEND_HELP_STRING([Optimization options:]) dnl Check for fully working MMX intrinsics dnl We need support for -mmmx, we need , and we also need a @@ -1586,13 +1572,6 @@ AS_IF([test "${enable_coverage}" != "no"], [ LDFLAGS_save="${LDFLAGS}" ]) -dnl -dnl Enable release-specific flags -dnl -AC_ARG_ENABLE(release, -[ --enable-release activate extra optimizations (default disabled)]) -test "${enable_release}" != "yes" && enable_release="no" - dnl dnl Stream output dnl @@ -1627,9 +1606,6 @@ then AC_CHECK_LIB( lua , luaL_newstate, [LUA_LIBS="-llua"], [ have_lua=no - AS_IF([test "x${enable_lua}" = "xyes"], - [AC_MSG_ERROR([lua >= 5.1 not found!])], - [AC_MSG_WARN([lua >= 5.1 not found!])]) ], [-lm]) ) ) @@ -1641,6 +1617,7 @@ then else AC_MSG_ERROR([Could not find lua. Lua is needed for some interfaces (rc, telnet, http) as well as many other custom scripts. Use --disable-lua to ignore this error.]) fi + AC_PATH_PROG(LUAC, luac) fi AM_CONDITIONAL(BUILD_LUA, [test "${have_lua}" = "yes"]) @@ -1727,7 +1704,7 @@ dnl dnl Input plugins dnl -AC_ARG_WITH(,[Input plugins:]) +EXTEND_HELP_STRING([Input plugins:]) dnl live555 input dnl @@ -1743,7 +1720,11 @@ if test "${enable_live555}" != "no"; then if test -z "${with_live555_tree}" -a "${CXX}" != ""; then AC_LANG_PUSH(C++) CPPFLAGS_save="${CPPFLAGS}" - CPPFLAGS_live555="-I/usr/include/liveMedia -I/usr/include/groupsock -I/usr/include/BasicUsageEnvironment -I/usr/include/UsageEnvironment" + if test -z "${CONTRIB_DIR}"; then + CPPFLAGS_live555="-I/usr/include/liveMedia -I/usr/include/groupsock -I/usr/include/BasicUsageEnvironment -I/usr/include/UsageEnvironment" + else + CPPFLAGS_live555="-I${CONTRIB_DIR}/include/liveMedia -I${CONTRIB_DIR}/include/groupsock -I${CONTRIB_DIR}/include/BasicUsageEnvironment -I${CONTRIB_DIR}/include/UsageEnvironment" + fi if test "${SYS}" = "solaris"; then CPPFLAGS_live555="${CPPFLAGS_live555} -DSOLARIS" fi @@ -1867,10 +1848,8 @@ then AC_ARG_WITH(dvdread-tree, [ --with-dvdread-tree=PATH libdvdread tree for static linking]) - dnl Temporary hack (yeah, sure ;) - if test "${SYS}" = "mingw32" || test "${SYS}" = "darwin" || test "${SYS}" = "beos" ; then - VLC_ADD_LIBS([dvdread],[-ldvdcss]) - fi + dnl prepend -ldvdcss on OS that need it + AS_CASE(["${SYS}"], [mingw32|darwin|beos], [VLC_ADD_LIBS([dvdread], [-ldvdcss])]) if test -z "${with_dvdread}" then @@ -1878,11 +1857,11 @@ then then AC_CHECK_HEADERS(dvdread/dvd_reader.h, [ VLC_ADD_PLUGIN([dvdread]) - VLC_ADD_LIBS([dvdread],[-ldvdread ${LIBS_dvdcss}]) + VLC_ADD_LIBS([dvdread],[-ldvdread]) ],[ AC_CHECK_HEADERS(libdvdread/dvd_reader.h, [ VLC_ADD_PLUGIN([dvdread]) - VLC_ADD_LIBS([dvdread],[-ldvdread ${LIBS_dvdcss}]) + VLC_ADD_LIBS([dvdread],[-ldvdread]) ],[ if test -n "${enable_dvdread}" then @@ -1904,7 +1883,7 @@ then dnl Use a custom libdvdread AC_MSG_RESULT(${real_dvdread_tree}/dvdread/.libs/libdvdread.a) VLC_ADD_PLUGIN([dvdread]) - VLC_ADD_LIBS([dvdread],[-L${real_dvdread_tree}/dvdread/.libs -ldvdread ${LIBS_dvdcss}]) + VLC_ADD_LIBS([dvdread],[-L${real_dvdread_tree}/dvdread/.libs -ldvdread]) VLC_ADD_CPPFLAGS([dvdread],[-I${real_dvdread_tree}]) else dnl The given libdvdread wasn't built @@ -1919,7 +1898,7 @@ then dnl Use ${with_dvdread}/include/dvdread/dvd_reader.h AC_MSG_RESULT(yes) VLC_ADD_PLUGIN([dvdread]) - VLC_ADD_LIBS([dvdread],[-L${with_dvdread}/lib -ldvdread ${LIBS_dvdcss}]) + VLC_ADD_LIBS([dvdread],[-L${with_dvdread}/lib -ldvdread]) VLC_ADD_CPPFLAGS([dvdread],[-I${with_dvdread}/include]) else dnl No libdvdread could be found, sorry @@ -1927,6 +1906,9 @@ then AC_MSG_ERROR([cannot find ${with_dvdread}/include/dvdread/dvd_reader.h]) fi fi + + dnl append -ldvd on OS that need it + AS_CASE(["${SYS}"], [bsdi], [VLC_ADD_LIBS([dvdread], [-ldvd])]) fi dnl @@ -1936,10 +1918,8 @@ AC_ARG_ENABLE(dvdnav, [ --enable-dvdnav dvdnav input module (default enabled)]) if test "${enable_dvdnav}" != "no" then - dnl Same hack than dvdread - if test "${SYS}" = "mingw32" || test "${SYS}" = "darwin" || test "${SYS}" = "beos" ; then - VLC_ADD_LIBS([dvdnav],[-ldvdcss]) - fi + dnl prepend -ldvdcss on OS that need it + AS_CASE(["${SYS}"], [mingw32|darwin|beos], [VLC_ADD_LIBS([dvdnav], [-ldvdcss])]) DVDNAV_PATH="${PATH}" AC_ARG_WITH(dvdnav-config-path, @@ -2591,7 +2571,7 @@ dnl dnl Codec plugins dnl -AC_ARG_WITH(,[Codec plugins:]) +EXTEND_HELP_STRING([Codec plugins:]) dnl dnl wmafixed plugin @@ -2613,6 +2593,17 @@ then VLC_ADD_PLUGIN([shine]) fi +dnl +dnl openmax il codec plugin +dnl +AC_ARG_ENABLE(omxil, + [ --enable-omxil openmax il codec module (default disabled)]) +if test "${enable_omxil}" = "yes" +then + VLC_ADD_PLUGIN([omxil]) + VLC_ADD_LIBS([omxil], [-ldl]) +fi + dnl dnl mad plugin dnl @@ -2963,15 +2954,6 @@ if test "${enable_realrtsp}" = "yes"; then VLC_ADD_PLUGIN([access_realrtsp]) fi -AC_ARG_ENABLE(libsysfs, - [ --enable-libsysfs Get user key from firewire connected iPod via libsysfs (default enabled)]) - -AS_IF([test "${enable_libsysfs}" != "no"],[ - AC_CHECK_HEADERS(sysfs/libsysfs.h, [ - VLC_ADD_LIBS([mp4 mkv],[-lsysfs]) - ] ) -]) - dnl dnl skins2 module dnl @@ -3332,7 +3314,7 @@ dnl dnl Video plugins dnl -AC_ARG_WITH(,[Video plugins:]) +EXTEND_HELP_STRING([Video plugins:]) dnl dnl Xlib @@ -3786,7 +3768,7 @@ dnl dnl Audio plugins dnl -AC_ARG_WITH(,[Audio plugins:]) +EXTEND_HELP_STRING([Audio plugins:]) dnl dnl OSS /dev/dsp module (enabled by default except on win32) @@ -3952,7 +3934,7 @@ dnl dnl Interface plugins dnl -AC_ARG_WITH(,[Interface plugins:]) +EXTEND_HELP_STRING([Interface plugins:]) dnl dnl Skins2 module @@ -4008,9 +3990,15 @@ dnl 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([hildon],[${HILDON_CFLAGS}]) - VLC_ADD_LIBS([hildon],[${HILDON_LIBS}]) + PKG_CHECK_MODULES(HILDON, [hildon-1], [ + PKG_CHECK_MODULES(HILDON_FM, hildon-fm-2, [ + VLC_ADD_CFLAGS([hildon],[${HILDON_FM_CFLAGS} -IHAVE_HILDON_FM]) + VLC_ADD_LIBS([hildon],[${HILDON_FM_LIBS}]) + ], [ + AC_MSG_WARN(hildon-fm-2 not found) + ]) + VLC_ADD_CFLAGS([hildon],[${HILDON_CFLAGS} ${X_CFLAGS}]) + VLC_ADD_LIBS([hildon],[${HILDON_LIBS} ${X_LIBS} ${X_PRE_LIBS} -lX11]) VLC_ADD_PLUGIN([hildon]) ALIASES="${ALIASES} mvlc" need_xid_provider="no" @@ -4034,15 +4022,16 @@ AS_IF([test "${enable_qt4}" != "no"], [ PKG_CHECK_MODULES(QT4, [QtCore QtGui >= 4.4.0], [ VLC_ADD_PLUGIN([qt4]) ALIASES="${ALIASES} qvlc" + QT4LOCALEDIR="$(eval $PKG_CONFIG --variable=prefix QtCore)/share/qt4/translations/" + AC_SUBST(QT4LOCALEDIR) AS_IF([test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce" -a "${SYS}" != "darwin"], [ - VLC_ADD_LIBS([qt4],[$QT4_LIBS -lX11]) + VLC_ADD_LIBS([qt4],[$QT4_LIBS ${X_LIBS} ${X_PRE_LIBS} -lX11]) need_xid_provider="no" + VLC_ADD_CXXFLAGS([qt4],[$QT4_CFLAGS ${X_CFLAGS} -DQT4LOCALEDIR=\\\\\\\"${QT4LOCALEDIR}\\\\\\\"]) ], [ VLC_ADD_LIBS([qt4],[$QT4_LIBS -lole32]) + VLC_ADD_CXXFLAGS([qt4],[$QT4_CFLAGS -DQT4LOCALEDIR=\\\\\\\"${QT4LOCALEDIR}\\\\\\\"]) ]) - 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,`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) @@ -4230,7 +4219,23 @@ PKG_ENABLE_MODULES_VLC([GOOM], [], [libgoom2], [goom visualization plugin], [aut dnl dnl libprojectM visualization plugin dnl -PKG_ENABLE_MODULES_VLC([PROJECTM], [], [libprojectM], [projectM visualization plugin], [auto]) +AC_ARG_ENABLE(projectm, + [ --enable-projectm projectM visualization plugin (default enabled)]) +AS_IF([test "${enable_projectm}" != "no"], + [ + PKG_CHECK_MODULES(PROJECTM, libprojectM, + [ + VLC_ADD_PLUGIN([projectm]) + VLC_ADD_CXXFLAGS([projectm],[$PROJECTM_CFLAGS]) + VLC_ADD_LIBS([projectm],[$PROJECTM_LIBS]) + PKG_CHECK_MODULES(PROJECTM2, [libprojectM >= 2.0.0], + [ AC_DEFINE([HAVE_PROJECTM2], 1, [Define to 1 if using libprojectM 2.x]) ], + [ AC_MSG_WARN( [Using libprojectM version 1] ) + ]) + ],[ + AC_MSG_WARN([libprojectM library not found]) + ]) + ]) dnl dnl AtmoLight (homemade Philips Ambilight clone) @@ -4273,8 +4278,7 @@ then fi fi - -AC_ARG_WITH(,[Misc options:]) +EXTEND_HELP_STRING([Misc options:]) dnl dnl libgcrypt @@ -4460,7 +4464,7 @@ AS_IF([test "${enable_loader}" = "yes"], VLC_ADD_LIBS([dmo quicktime], [-lpthread]) ]) -AC_ARG_WITH(,[Components:]) +EXTEND_HELP_STRING([Components:]) dnl dnl the VLC binary @@ -4690,24 +4694,6 @@ fi AC_LANG_POP(C++) AM_CONDITIONAL(BUILD_MOZILLA,${mozilla}) -dnl -dnl test plugins -dnl -AC_ARG_ENABLE(testsuite, - [ --enable-testsuite build test modules (default disabled)]) -if test "${enable_testsuite}" = "yes" -then - TESTS="test1 test2 test3 test4" - - dnl we define those so that bootstrap sets the right linker - VLC_ADD_CXXFLAGS([test2],[]) - VLC_ADD_OBJCFLAGS([test3],[]) - dnl this one is needed until automake knows what to do - VLC_ADD_LIBS([test3],[-lobjc]) - - VLC_ADD_PLUGIN([test1 test2 test3 test4]) -fi - dnl dnl Plugin and builtin checks dnl @@ -4860,6 +4846,7 @@ AC_CONFIG_FILES([ modules/codec/Makefile modules/codec/avcodec/Makefile modules/codec/dmo/Makefile + modules/codec/omxil/Makefile modules/codec/shine/Makefile modules/codec/subtitles/Makefile modules/codec/spudec/Makefile @@ -4887,7 +4874,6 @@ AC_CONFIG_FILES([ modules/misc/dummy/Makefile modules/misc/lua/Makefile modules/misc/notify/Makefile - modules/misc/testsuite/Makefile modules/misc/playlist/Makefile modules/misc/osd/Makefile modules/misc/stats/Makefile @@ -4954,7 +4940,6 @@ test "${enable_debug}" = "yes" && printf "debug " test "${enable_cprof}" = "yes" && printf "cprof " test "${enable_gprof}" = "yes" && printf "gprof " test "${enable_optimizations}" = "yes" && printf "optim " -test "${enable_release}" = "yes" && printf "release " || printf "devel " echo "" if test "${enable_vlc}" != "no"; then echo "vlc aliases :${ALIASES}"