X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=configure.ac;h=50b8bff2c59d5a3082510cdca91480bd6553c41b;hb=e560aff75a63b222bea9c92e6150bc7b6f669be3;hp=0ccf886682f8d7481811e2ffbfac568f8dd53b14;hpb=da70bf94823d32dce1a40597c95aa130c545f50f;p=vlc diff --git a/configure.ac b/configure.ac index 0ccf886682..50b8bff2c5 100644 --- a/configure.ac +++ b/configure.ac @@ -9,13 +9,13 @@ VERSION_EXTRA="svn" CONFIGURE_LINE="`echo "$0 $ac_configure_args" | sed -e 's/\\\/\\\\\\\/g'`" CODENAME="Grishenko" -AC_PREREQ(2.59) +AC_PREREQ(2.59) dnl this really should be 2.59c AC_CONFIG_SRCDIR(src/libvlc.c) AC_CONFIG_AUX_DIR(autotools) AC_CANONICAL_BUILD AC_CANONICAL_HOST -AM_INIT_AUTOMAKE([1.7 check-news dist-bzip2]) +AM_INIT_AUTOMAKE([1.9 check-news dist-bzip2 no-dist-gzip -Wall]) AM_CONFIG_HEADER(config.h) dnl Too many people are not aware of maintainer mode: @@ -26,8 +26,6 @@ dnl can't expect you to enable it manually. AS_IF([test "x${enable_maintainer_mode}" != "xno"], [enable_maintainer_mode="yes"]) - -dnl HA! HA! AM_MAINTAINER_MODE dnl @@ -40,6 +38,7 @@ dnl Check for tools dnl AC_PROG_CC_C99 AC_USE_SYSTEM_EXTENSIONS +AC_DEFINE([_FORTIFY_SOURCE], 2, [Define to `2' to get glibc warnings.]) AM_PROG_CC_C_O AC_PROG_CXX AC_PROG_CPP @@ -213,7 +212,7 @@ case "${host_os}" in CPPFLAGS_save="${CPPFLAGS_save} -D_OFF_T_ -D_off_t=long"; CPPFLAGS="${CPPFLAGS_save}" VLC_ADD_LDFLAGS([libvlc],[-lws2_32 -lnetapi32 -lwinmm -mwindows]) VLC_ADD_LDFLAGS([cdda vcdx cddax],[-lwinmm]) - VLC_ADD_LDFLAGS([access_http access_mms access_udp access_tcp access_ftp access_output_udp sap slp http stream_out_standard stream_out_rtp vod_rtsp telnet netsync growl flac],[-lws2_32]) + VLC_ADD_LDFLAGS([access_http access_mms access_udp access_tcp access_ftp access_output_udp sap slp http stream_out_standard stream_out_rtp vod_rtsp access_realrtsp telnet rc netsync growl flac ts audioscrobbler],[-lws2_32]) fi if test "${SYS}" = "mingwce"; then # add ws2 for closesocket, select, recv @@ -844,8 +843,9 @@ 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" +case "${SYS}" in + linux*|*bsd*) +if test "${enable_dbus}" != "no" then dnl api stable dbus PKG_CHECK_MODULES(DBUS, dbus-1 >= 1.0.0, @@ -908,6 +908,8 @@ then fi ) fi +;; +esac dnl Build the gtk_main plugins? NEED_GTK_MAIN=no @@ -1157,7 +1159,7 @@ dnl dnl default modules dnl VLC_ADD_PLUGINS([dummy logger memcpy]) -VLC_ADD_PLUGINS([mpgv mpga m4v m4a h264 ps pva avi asf mp4 rawdv nsv real aiff mjpeg demuxdump flacsys tta]) +VLC_ADD_PLUGINS([mpgv mpga m4v m4a h264 vc1 ps pva avi asf mp4 rawdv nsv real aiff mjpeg demuxdump flacsys tta]) VLC_ADD_PLUGINS([cvdsub svcdsub spudec telx subsdec dvbsub mpeg_audio lpcm a52 dts cinepak flac]) VLC_ADD_PLUGINS([deinterlace invert adjust transform wave ripple psychedelic gradient motionblur rv32 rotate noise extract sharpen]) VLC_ADD_PLUGINS([converter_fixed mono]) @@ -1170,12 +1172,13 @@ VLC_ADD_PLUGINS([access_directory access_file access_udp access_tcp]) VLC_ADD_PLUGINS([access_http access_mms access_ftp]) VLC_ADD_PLUGINS([packetizer_mpegvideo packetizer_h264]) VLC_ADD_PLUGINS([packetizer_mpeg4video packetizer_mpeg4audio]) +VLC_ADD_PLUGINS([packetizer_vc1]) if test "${SYS}" != "mingwce"; then VLC_ADD_PLUGINS([access_fake access_filter_timeshift access_filter_record access_filter_dump]) VLC_ADD_PLUGINS([gestures rc telnet hotkeys netsync showintf marq podcast shout sap fake folder]) - VLC_ADD_PLUGINS([rss mosaic wall motiondetect clone crop]) + VLC_ADD_PLUGINS([rss mosaic wall motiondetect clone crop erase]) VLC_ADD_PLUGINS([i420_yuy2 i422_yuy2 i420_ymga]) VLC_ADD_PLUGINS([aout_file linear_resampler bandlimited_resampler]) VLC_ADD_PLUGINS([float32_mixer spdif_mixer simple_channel_mixer]) @@ -1360,18 +1363,24 @@ AC_CACHE_CHECK([if \$CC groks AltiVec C extensions], if test "${ac_cv_c_altivec}" != "no"; then CPPFLAGS="${CPPFLAGS_save} ${ac_cv_c_altivec}" fi -AC_CHECK_HEADERS(altivec.h) -CPPFLAGS="${CPPFLAGS_save}" -if test "${ac_cv_c_altivec}" != "no"; then - AC_DEFINE(CAN_COMPILE_C_ALTIVEC, 1, Define if your compiler groks C AltiVec extensions.) - VLC_ADD_CFLAGS([libvlc],[${ac_cv_c_altivec}]) - VLC_ADD_CFLAGS([idctaltivec motionaltivec],[${ac_cv_c_altivec}]) - VLC_ADD_CFLAGS([i420_yuy2_altivec memcpyaltivec deinterlace],[${ac_cv_c_altivec} ${ac_cv_c_altivec_abi}]) - if test "${ac_cv_altivec_inline}" = "no"; then - ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}" +AS_IF( test "${enable_altivec}" != "no", +[ + AC_CHECK_HEADERS(altivec.h) + CPPFLAGS="${CPPFLAGS_save}" + + if test "${ac_cv_c_altivec}" != "no"; then + AC_DEFINE(CAN_COMPILE_C_ALTIVEC, 1, Define if your compiler groks C AltiVec extensions.) + VLC_ADD_CFLAGS([libvlc],[${ac_cv_c_altivec}]) + VLC_ADD_CFLAGS([idctaltivec motionaltivec],[${ac_cv_c_altivec}]) + VLC_ADD_CFLAGS([i420_yuy2_altivec memcpyaltivec deinterlace],[${ac_cv_c_altivec} ${ac_cv_c_altivec_abi}]) + if test "${ac_cv_altivec_inline}" = "no"; then + ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}" + fi fi -fi +],[ + CPPFLAGS="${CPPFLAGS_save}" +]) AC_CACHE_CHECK([if linker needs -framework vecLib], [ac_cv_ld_altivec], @@ -2907,7 +2916,6 @@ dnl Trying with pkg-config LDFLAGS="${LDFLAGS_save} ${LDFLAGS_ffmpeg}" AC_CHECK_HEADERS(ffmpeg/avcodec.h, [], [AC_MSG_ERROR([Missing header file ffmpeg/avcodec.h.])] ) AC_CHECK_HEADERS(ffmpeg/avformat.h) - AC_CHECK_HEADERS(ffmpeg/swscale.h) AC_CHECK_HEADERS(ffmpeg/avutil.h) AC_CHECK_HEADERS(postproc/postprocess.h, [], [AC_MSG_ERROR([Missing header file postproc/postprocess.h.])] ) @@ -2935,6 +2943,7 @@ dnl Trying with pkg-config CPPFLAGS="${CPPFLAGS_save}" AC_CHECK_LIB(swscale, sws_getContext, [ + AC_CHECK_HEADERS(ffmpeg/swscale.h) VLC_ADD_LDFLAGS([ffmpeg],[-lswscale]) ], [], [-lavcodec $LDAVUTIL]) LDFLAGS="${LDFLAGS_save}" CPPFLAGS="${CPPFLAGS_save}" @@ -3052,17 +3061,17 @@ then AC_MSG_RESULT(no) AC_MSG_ERROR([cannot cd to ${with_twolame_tree}]) fi - if test -f "${real_twolame_tree}/src/libtwolame/.libs/libtwolame.a" + if test -f "${real_twolame_tree}/libtwolame/.libs/libtwolame.a" then dnl Use a custom twolame - AC_MSG_RESULT(${real_twolame_tree}/src/libtwolame/.libs/libtwolame.a) + AC_MSG_RESULT(${real_twolame_tree}/libtwolame/.libs/libtwolame.a) VLC_ADD_BUILTINS([twolame]) - VLC_ADD_LDFLAGS([twolame],[${real_twolame_tree}/src/libtwolame/.libs/libtwolame.a]) - VLC_ADD_CPPFLAGS([twolame],[-I${real_twolame_tree}/src/libtwolame -DLIBTWOLAME_STATIC]) + VLC_ADD_LDFLAGS([twolame],[${real_twolame_tree}/libtwolame/.libs/libtwolame.a]) + VLC_ADD_CPPFLAGS([twolame],[-I${real_twolame_tree}/libtwolame -DLIBTWOLAME_STATIC]) else dnl The given libtwolame wasn't built AC_MSG_RESULT(no) - AC_MSG_ERROR([cannot find ${real_twolame_tree}/src/libtwolame/.libs/libtwolame.a, make sure you compiled libtwolame in ${with_twolame_tree}]) + AC_MSG_ERROR([cannot find ${real_twolame_tree}/libtwolame/.libs/libtwolame.a, make sure you compiled libtwolame in ${with_twolame_tree}]) fi else CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_twolame} -DLIBTWOLAME_STATIC" @@ -3525,7 +3534,7 @@ dnl AC_ARG_ENABLE(dirac, [ --enable-dirac experimental dirac codec (default disabled)]) if test "${enable_dirac}" = "yes"; then - PKG_CHECK_MODULES(DIRAC,dirac, [ + PKG_CHECK_MODULES(DIRAC,[dirac >= 0.6.0], [ VLC_ADD_PLUGINS([dirac]) VLC_ADD_CFLAGS([dirac],[$DIRAC_CFLAGS]) VLC_ADD_LDFLAGS([dirac],[$DIRAC_LIBS -lstdc++]) ],[ @@ -3943,6 +3952,9 @@ then VLC_ADD_PLUGINS([freetype]) VLC_ADD_CFLAGS([freetype],[`${FREETYPE_CONFIG} --cflags`]) VLC_ADD_LDFLAGS([freetype],[`${FREETYPE_CONFIG} --libs`]) + AC_CHECK_HEADERS(fontconfig/fontconfig.h, + [VLC_ADD_CFLAGS([freetype],[-DHAVE_FONTCONFIG]) + VLC_ADD_LDFLAGS([freetype],[-lfontconfig])]) AC_CHECK_HEADERS(Carbon/Carbon.h, [VLC_ADD_LDFLAGS([freetype],[-framework Carbon])]) elif test "${enable_freetype}" = "yes" @@ -4619,13 +4631,20 @@ if test "${enable_skins2}" = "yes" || VLC_ADD_CXXFLAGS([skins2],[-O2 -fno-rtti]) VLC_ADD_LDFLAGS([skins2],[-loleaut32 -lwinspool -lwinmm -lshell32 -lctl3d32 -ladvapi32 -lwsock32 -lgdi32 -lcomdlg32 -lole32 -luuid -lcomctl32]) + else if test "${skins2_missing_lib}" = "no" && (test "${SYS}" = "darwin"); then + VLC_ADD_PLUGINS([skins2]) + ALIASES="${ALIASES} svlc" + VLC_ADD_CPPFLAGS([skins2],[-Imodules/gui/skins2 -DMACOSX_SKINS]) + VLC_ADD_CXXFLAGS([skins2],[-O2 -fno-rtti]) + VLC_ADD_LDFLAGS([skins2],[-framework Carbon]) + else if test "${skins2_missing_lib}" = "no"; then VLC_ADD_PLUGINS([skins2]) ALIASES="${ALIASES} svlc" VLC_ADD_CPPFLAGS([skins2],[-Imodules/gui/skins2 ${X_CFLAGS} -DX11_SKINS]) VLC_ADD_CXXFLAGS([skins2],[-O2 -fno-rtti]) VLC_ADD_LDFLAGS([skins2],[${X_LIBS} ${X_PRE_LIBS} -lXext -lX11]) - fi fi + fi fi fi fi @@ -4770,18 +4789,11 @@ dnl dnl wxWidgets module dnl AC_ARG_ENABLE(wxwidgets, - [ --enable-wxwidgets wxWidgets support (default enabled)]) -if test "${enable_wxwindows}" -then - AC_MSG_WARN(--{en|dis}able-wxwindows is deprecated. Use --{en|dis}able-wxwidgets instead.) -fi + [ --enable-wxwidgets wxWidgets support (default disabled)]) -if test "${enable_wxwindows}" = "no" -then - enable_wxwidgets="no" -fi -if test "${enable_wxwidgets}" != "no" +if test "${enable_wxwidgets}" = "yes" then + AC_MSG_WARN([wxWidgets support is deprecated and will be removed. Consider using Qt4 instead.]) WXWIDGETS_PATH="${PATH}" AC_ARG_WITH(wx-config-path, [ --with-wx-config-path=PATH wx-config path (default search in \$PATH)], @@ -4802,7 +4814,7 @@ then then if expr 2.6.0 \> `${WX_CONFIG} --version` >/dev/null || expr 2.7.0 \<= `${WX_CONFIG} --version` >/dev/null then - AC_MSG_ERROR([You need wxWidgets of the 2.6 branch. Please upgrade and try again. Alternatively you can also configure with --disable-wxwidgets.]) + AC_MSG_ERROR([You need wxWidgets of the 2.6 branch. Please upgrade/downgrade and try again. Better yet, you can configure with --disable-wxwidgets.]) fi AC_LANG_PUSH(C++) # Turn this error: @@ -4836,7 +4848,7 @@ then # the following is required to compile for win32 VLC_ADD_CXXFLAGS([wxwidgets],[-D_UNICODE -DUNICODE]) else - AC_MSG_ERROR([You need a unicode build of wxWidgets. Please upgrade and try again. Alternatively you can also configure with --disable-wxwidgets.]) + AC_MSG_ERROR([You need a unicode build of wxWidgets. Please fix that and try again. Better yet, you can configure with --disable-wxwidgets.]) fi if test "$have_libcdio" = "yes" then @@ -4878,19 +4890,25 @@ dnl QT 4 dnl enableqt4=false AC_ARG_ENABLE(qt4, - [ --enable-qt4 QT 4 support (default disabled) ], - [if test "${enable_qt4}" = "yes"; then - PKG_CHECK_MODULES(QT4, QtCore QtGui, - [ VLC_ADD_PLUGINS([qt4]) - ALIASES="${ALIASES} qvlc" - enableqt4=true - VLC_ADD_LDFLAGS([qt4],[$QT4_LIBS]) - VLC_ADD_CXXFLAGS([qt4],[$QT4_CFLAGS]) - MOC=`$PKG_CONFIG --variable=exec_prefix QtCore`/bin/moc - RCC=`$PKG_CONFIG --variable=exec_prefix QtCore`/bin/rcc - UIC=`$PKG_CONFIG --variable=exec_prefix QtCore`/bin/uic], - [AC_MSG_WARN(QT4 library not found)]) - fi]) + [ --enable-qt4 QT 4 support (default enabled) ]) +AS_IF([test "${enable_qt4}" != "no" && + (test "${SYS}" != "darwin" || test "${enable_qt4}" = "yes")], [ + PKG_CHECK_MODULES(QT4, QtCore QtGui, + [ VLC_ADD_PLUGINS([qt4]) + ALIASES="${ALIASES} qvlc" + enableqt4=true + VLC_ADD_LDFLAGS([qt4],[$QT4_LIBS]) + VLC_ADD_CXXFLAGS([qt4],[$QT4_CFLAGS]) + MOC=`$PKG_CONFIG --variable=exec_prefix QtCore`/bin/moc + RCC=`$PKG_CONFIG --variable=exec_prefix QtCore`/bin/rcc + UIC=`$PKG_CONFIG --variable=exec_prefix QtCore`/bin/uic], + AS_IF([test "${enable_qt4}" = "yes"],[ + AC_MSG_ERROR(QT4 library not found) + ],[ + AC_MSG_WARN(QT4 library not found) + ]) + ) +]) AM_CONDITIONAL(ENABLE_QT4, test "$enableqt4" = "true") dnl @@ -5023,13 +5041,16 @@ AC_ARG_ENABLE(macosx, [ --enable-macosx MacOS X support (default enabled on MacOS X)], [if test "${enable_macosx}" = "yes" then - VLC_ADD_BUILTINS([macosx]) - VLC_ADD_LDFLAGS([macosx],[-framework IOKit -framework Cocoa -framework Carbon -framework QuickTime -lobjc -ObjC -framework OpenGL -framework AGL]) + VLC_ADD_PLUGINS([access_eyetv]) + VLC_ADD_LDFLAGS([access_eyetv], [-framework CoreFoundation]) + VLC_ADD_LDFLAGS([macosx],[-framework IOKit -framework Cocoa -framework Carbon -framework QuickTime -lobjc -ObjC -framework OpenGL -framework AGL -framework QTKit]) VLC_ADD_OBJCFLAGS( [macosx],[-fobjc-exceptions] ) fi], [AC_CHECK_HEADERS(Cocoa/Cocoa.h, + VLC_ADD_PLUGINS([access_eyetv]) + VLC_ADD_LDFLAGS([access_eyetv], [-framework CoreFoundation]) VLC_ADD_BUILTINS([macosx]) - VLC_ADD_LDFLAGS([macosx],[-framework IOKit -framework Cocoa -framework Carbon -framework QuickTime -lobjc -ObjC -framework OpenGL -framework AGL]) + VLC_ADD_LDFLAGS([macosx],[-framework IOKit -framework Cocoa -framework Carbon -framework QuickTime -lobjc -ObjC -framework OpenGL -framework AGL -framework QTKit]) VLC_ADD_OBJCFLAGS( [macosx],[-fobjc-exceptions] ) )]) CFLAGS=$ORIGCFLAGS @@ -5219,6 +5240,9 @@ AS_IF([test "${enable_gnutls}" != "no"], [ ]) ]) +AM_PATH_LIBGCRYPT([1:1.1.94], [have_libgcrypt="yes"], [have_libgcrypt="no"]) +AM_CONDITIONAL([HAVE_LIBGCRYPT], [test "${have_libgcrypt}" = "yes"]) + dnl dnl Endianness check, AC_C_BIGENDIAN doesn't work if we are cross-compiling @@ -5288,12 +5312,12 @@ AC_ARG_ENABLE(loader, AM_CONDITIONAL(LOADER, [test "${enable_loader}" = "yes"]) AS_IF([test "${enable_loader}" = "yes"], [ VLC_ADD_PLUGINS([dmo]) - VLC_ADD_CPPFLAGS([dmo],[-I../../../@top_srcdir@/loader]) - VLC_ADD_LDFLAGS([dmo],[../../../loader/libloader.la -lpthread]) - VLC_ADD_CPPFLAGS([quicktime],[-I../../@top_srcdir@/loader]) - VLC_ADD_LDFLAGS([quicktime],[../../loader/libloader.la -lpthread]) - VLC_ADD_CPPFLAGS([realaudio],[-I../../@top_srcdir@/loader -DLOADER]) - VLC_ADD_LDFLAGS([realaudio],[../../loader/libloader.la -ldl -lpthread]) + VLC_ADD_CPPFLAGS([dmo],[-I../../../@top_srcdir@/libs/loader]) + VLC_ADD_LDFLAGS([dmo],[../../../libs/loader/libloader.la -lpthread]) + VLC_ADD_CPPFLAGS([quicktime],[-I../../@top_srcdir@/libs/loader]) + VLC_ADD_LDFLAGS([quicktime],[../../libs/loader/libloader.la -lpthread]) + VLC_ADD_CPPFLAGS([realaudio],[-I../../@top_srcdir@/libs/loader -DLOADER]) + VLC_ADD_LDFLAGS([realaudio],[../../libs/loader/libloader.la -ldl -lpthread]) ]) dnl @@ -5365,18 +5389,22 @@ then dnl New firefox-1.5 SDK api PKG_CHECK_MODULES([FIREFOX], [firefox-plugin], [ - PKG_CHECK_MODULES([MOZILLA_NSPR], [mozilla-nspr], + PKG_CHECK_MODULES([FIREFOX_XPCOM], [firefox-xpcom], [], [ - PKG_CHECK_MODULES([NSPR], [nspr], + PKG_CHECK_MODULES([MOZILLA_NSPR], [mozilla-nspr], [], [ - AC_MSG_ERROR([Please install the nspr development tools.]) + PKG_CHECK_MODULES([NSPR], [nspr], + [], + [ + AC_MSG_ERROR([Please install the nspr development tools.]) + ] + ) ] ) - ] - ) - CPPFLAGS="${CPPFLAGS_save} ${FIREFOX_CFLAGS} ${MOZILLA_NSPR_CFLAGS} ${NSPR_CFLAGS} ${MOZILLA_CPPFLAGS}" + ]) + CPPFLAGS="${CPPFLAGS_save} ${FIREFOX_CFLAGS} ${FIREFOX_XPCOM_CFLAGS} ${MOZILLA_NSPR_CFLAGS} ${NSPR_CFLAGS} ${MOZILLA_CPPFLAGS}" MOZILLA_REQUIRED_HEADERS=1 AC_CHECK_HEADERS(mozilla-config.h,,MOZILLA_REQUIRED_HEADERS=0) AC_CHECK_HEADERS(npapi.h,,MOZILLA_REQUIRED_HEADERS=0) @@ -5402,7 +5430,7 @@ then VLC_ADD_LDFLAGS([mozilla], [${X_LIBS} ${X_PRE_LIBS} -lX11 -lXt]) fi VLC_ADD_CPPFLAGS([mozilla],[${CPPFLAGS}]) - VLC_ADD_LDFLAGS([mozilla],[${FIREFOX_LIBS} ${MOZILLA_NSPR_LIS} ${NSPR_LIBS} ${MOZILLA_LDFLAGS}]) + VLC_ADD_LDFLAGS([mozilla],[${FIREFOX_LIBS} ${MOZILLA_NSPR_LIBS} ${NSPR_LIBS} ${MOZILLA_LDFLAGS}]) VLC_ADD_PLUGINS([mozilla]) MOZILLA_CONFIG= CPPFLAGS="${CPPFLAGS_save}" @@ -5755,7 +5783,8 @@ AC_CONFIG_FILES([ doc/Makefile intl/Makefile ipkg/Makefile - loader/Makefile + libs/loader/Makefile + libs/srtp/Makefile modules/Makefile mozilla/Makefile m4/Makefile