X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=configure.ac;h=2aa53598011ac98cc24b76c8a745bb1fa8692380;hb=449e70599ee029f1b11155e4e9da3ee09e4108bb;hp=e8f9a868e2898a48f05f5d547ba89f98769208dd;hpb=3e1fea390e453b25f50d1e4308b80a4a962b8564;p=vlc diff --git a/configure.ac b/configure.ac index e8f9a868e2..2aa5359801 100644 --- a/configure.ac +++ b/configure.ac @@ -29,6 +29,24 @@ AS_IF([test "x${enable_maintainer_mode}" != "xno"], [enable_maintainer_mode="yes"]) AM_MAINTAINER_MODE +dnl +dnl Deprecated options +dnl to notify packagers that stuff has changed +dnl +AC_ARG_ENABLE(python-bindings, + [ --enable-python-bindings Always fails for historical reasons)],, + [enable_python_bindings="no"]) +AS_IF([test "${enable_python_bindings}" != "no"], [ + AC_MSG_ERROR([Python bindings are now built from a separate source package]) +]) + +AC_ARG_ENABLE(java-bindings, + [ --enable-java-bindings Always fails for historical reasons],, + [enable_java_bindings="no"]) +AS_IF([test "${enable_java_bindings}" != "no"], [ + AC_MSG_ERROR([Java bindings are now built from a separate source package]) +]) + dnl dnl Save *FLAGS dnl @@ -295,7 +313,7 @@ case "${host_os}" in VLC_ADD_LDFLAGS([vlc],[-mwindows]) VLC_ADD_LIBS([activex mozilla],[-lgdi32]) VLC_ADD_LIBS([cdda vcdx cddax sdl_image],[-lwinmm]) - VLC_ADD_LIBS([access_http access_mms access_udp access_tcp access_ftp access_rtmp access_output_udp access_output_shout sap slp http stream_out_standard stream_out_rtp vod_rtsp access_realrtsp telnet rc netsync gnutls growl_udp flac ts audioscrobbler lua],[-lws2_32]) + 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 http stream_out_standard stream_out_rtp vod_rtsp access_realrtsp telnet rc netsync gnutls growl_udp flac ts audioscrobbler lua],[-lws2_32]) fi if test "${SYS}" = "mingwce"; then # add ws2 for closesocket, select, recv @@ -465,7 +483,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_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([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 uselocale]) AC_CHECK_FUNCS(strcasecmp,,[AC_CHECK_FUNCS(stricmp)]) AC_CHECK_FUNCS(strncasecmp,,[AC_CHECK_FUNCS(strnicmp)]) AC_CHECK_FUNCS(strcasestr,,[AC_CHECK_FUNCS(stristr)]) @@ -500,7 +518,7 @@ AC_CHECK_FUNCS(connect,,[ AC_CHECK_FUNCS(send,,[ AC_CHECK_LIB(socket,send,[ - VLC_ADD_LIBS([access_http access_mms access_udp access_tcp access_ftp access_rtmp sap access_output_udp stream_out_standard growl_udp],[-lsocket]) + VLC_ADD_LIBS([access_http access_mms access_udp access_tcp access_ftp access_rtmp sap access_output_udp access_output_rtmp stream_out_standard growl_udp],[-lsocket]) ]) ]) @@ -1048,34 +1066,6 @@ if test "${ac_cv_c_omit_frame_pointer}" != "no"; then CFLAGS_OPTIM_NODEBUG="${CFLAGS_OPTIM_NODEBUG} -fomit-frame-pointer" fi -dnl Check for -fvisibility=hidden -dnl Don't test on mingw32, because it is going to work with just a warning -dnl even if it doesn't support it -if test "${SYS}" != "mingw32" -then -AC_CACHE_CHECK([if \$CC accepts -fvisibility=hidden], - [ac_cv_c_visibility_hidden], - [CFLAGS="${CFLAGS_save} -fvisibility=hidden" - AC_TRY_COMPILE([],,ac_cv_c_visibility_hidden=yes, ac_cv_c_visibility_hidden=no)]) -if test "${ac_cv_c_visibility_hidden}" != "no"; then - VLC_ADD_CFLAGS([libvlc plugin],[-fvisibility=hidden]) -fi -fi - -AM_CONDITIONAL(HAVE_COMPILER_EXPORT, [test "$SYS" = "mingw32" -o "${ac_cv_c_visibility_hidden}" != "no"]) - -dnl Check for -fvisibility-inlines-hidden (breaks x86_64 linkers) -dnl AC_LANG_PUSH(C++) -dnl AC_CACHE_CHECK([if \$CXX accepts -fvisibility-inlines-hidden], -dnl [ac_cv_c_visibility_inlines_hidden], -dnl [CXXFLAGS="${CXXFLAGS_save} -fvisibility-inlines-hidden" -dnl AC_TRY_COMPILE([],,ac_cv_c_visibility_inlines_hidden=yes, ac_cv_c_visibility_inlines_hidden=no)]) -dnl if test "${ac_cv_c_visibility_inlines_hidden}" != "no"; then -dnl VLC_ADD_CXXFLAGS([libvlc plugin],[-fvisibility-inlines-hidden]) -dnl fi -dnl CXXFLAGS="${CXXFLAGS_save}" -dnl AC_LANG_POP(C++) - dnl Check for -mdynamic-no-pic dnl AC_CACHE_CHECK([if \$CC accepts -mdynamic-no-pic], dnl [ac_cv_c_dynamic_no_pic], @@ -1125,19 +1115,6 @@ if test "${ac_cv_c_attribute_aligned}" != "0"; then [${ac_cv_c_attribute_aligned}],[Maximum supported data alignment]) fi -dnl Checks for __attribute__(format()) directive -AC_CACHE_CHECK([__attribute__ ((format ())) support with function pointers], - [ac_cv_c_attribute_format], - [ac_cv_c_attribute_format=no - CFLAGS="${CFLAGS_save} -Werror" - AC_TRY_COMPILE([], - [static void (*pf_printf)(const char *, ...) __attribute__ ((format(printf,1,2)));(void)pf_printf;], - [ac_cv_c_attribute_format=yes]) - CFLAGS="${CFLAGS_save}"]) -if test "${ac_cv_c_attribute_format}" != "no"; then - AC_DEFINE(HAVE_ATTRIBUTE_FORMAT, 1, Support for __attribute__((format())) with function pointers) -fi - dnl Check for __attribute__((packed)) AC_CACHE_CHECK([for __attribute__((packed))], [ac_cv_c_attribute_packed], @@ -1148,16 +1125,6 @@ if test "${ac_cv_c_attribute_packed}" != "no"; then AC_DEFINE(HAVE_ATTRIBUTE_PACKED, 1, Support for __attribute__((packed)) for structs) fi -dnl Check for __attribute__((visibility())) -AC_CACHE_CHECK([for __attribute__((visibility()))], - [ac_cv_c_attribute_visibility], - [ac_cv_c_attribute_visibility=no - AC_TRY_COMPILE(, [extern __attribute__((visibility("default"))) int foo(int);], - [ac_cv_c_attribute_visibility=yes])]) -if test "${ac_cv_c_attribute_visibility}" != "no"; then - AC_DEFINE(HAVE_ATTRIBUTE_VISIBILITY, 1, Support for __attribute__((visibility())) for exporting symbols) -fi - dnl dnl Check the CPU dnl @@ -1303,7 +1270,6 @@ AC_LANG_POP(C++) if test "${SYS}" != "mingwce"; then VLC_ADD_PLUGIN([gestures]) VLC_ADD_PLUGIN([rc]) - VLC_ADD_PLUGIN([telnet]) VLC_ADD_PLUGIN([hotkeys]) VLC_ADD_PLUGIN([showintf]) VLC_ADD_PLUGIN([marq]) @@ -1354,6 +1320,7 @@ if test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"; then VLC_ADD_PLUGIN([screensaver]) VLC_ADD_PLUGIN([motion]) VLC_ADD_PLUGIN([dynamicoverlay]) + VLC_ADD_PLUGIN([signals]) elif test "${SYS}" != "mingwce"; then VLC_ADD_PLUGIN([ntservice]) VLC_ADD_PLUGIN([access_smb]) @@ -1741,7 +1708,7 @@ fi dnl Lua modules AC_ARG_ENABLE(lua, - [ --enable-lua lua playlist and metafetcher plugins (default enabled)]) + [ --enable-lua lua playlist, metafetcher and interface plugins (default enabled)]) if test "${enable_lua}" != "no" then PKG_CHECK_MODULES(LUA, lua5.1, @@ -1792,11 +1759,15 @@ dnl dnl VideoLAN manager dnl AC_ARG_ENABLE(vlm, - [ --enable-vlm VideoLAN manager (default enabled)]) -if test "${enable_vlm}" != "no" -then - AC_DEFINE(ENABLE_VLM, 1, Define if you want the VideoLAN manager support) -fi + [ --enable-vlm VideoLAN manager (default enabled)],, + [enable_vlm="${enable_sout}"]) +AS_IF([test "${enable_vlm}" != "no"], [ + AS_IF([test "${enable_sout}" = "no"], [ + AC_MSG_ERROR([VLM requires the stream output. Do not use --disable-sout.]) + ]) + AC_DEFINE(ENABLE_VLM, 1, [Define if you want the VideoLAN manager support]) + VLC_ADD_PLUGIN([telnet]) +]) dnl dnl Growl notification plugin @@ -2264,10 +2235,9 @@ if test "${enable_opencv}" = "yes" -a "${CXX}" != ""; then AC_ARG_WITH(opencv-tree, [ --with-opencv-tree=PATH opencv tree for linking]) - if test -n "${with_opencv_tree}" - then if test "${SYS}" = "mingw32" -o "${SYS}" = "cygwin" 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}) if test -f ${with_opencv_tree}/cv/include/cv.h -a -f ${with_opencv_tree}/cxcore/include/cxcore.h \ -a -f ${with_opencv_tree}/cvaux/include/cvaux.h -a -f ${with_opencv_tree}/otherlibs/highgui/highgui.h @@ -2287,9 +2257,17 @@ then AC_MSG_ERROR([cannot find opencv in ${with_opencv_tree}]) fi else - AC_MSG_WARN([--enable-opencv currently only works on windows]) + PKG_CHECK_MODULES(OPENCV, opencv, + [ + VLC_ADD_PLUGIN([opencv_example]) + VLC_ADD_PLUGIN([opencv_wrapper]) + VLC_ADD_LIBS([opencv_example opencv_wrapper],[${OPENCV_LIBS}]) + VLC_ADD_CFLAGS([opencv_wrapper],[${OPENCV_CFLAGS}]) + VLC_ADD_CXXFLAGS([opencv_example],[${OPENCV_CFLAGS}]) + ], + [AC_MSG_ERROR([libopencv not found!])] + ) fi - fi fi @@ -3021,170 +2999,6 @@ AC_ARG_ENABLE(ffmpeg, if test "${enable_ffmpeg}" != "no" then -dnl Those options have to be here because the .pc can be bogus for ffmpeg previous nov 05 - - AC_ARG_WITH(ffmpeg-mp3lame, - [ --with-ffmpeg-mp3lame specify if ffmpeg has been compiled with mp3lame support], - [ - if test "$with_ffmpeg_mp3lame" = "yes"; then - VLC_ADD_LIBS([ffmpeg],[-lmp3lame]) - fi]) - - AC_ARG_WITH(ffmpeg-faac, - [ --with-ffmpeg-faac specify if ffmpeg has been compiled with faac support], - [ - if test "$with_ffmpeg_faac" = "yes"; then - VLC_ADD_LIBS([ffmpeg],[-lfaac]) - fi]) - - AC_ARG_WITH(ffmpeg-dts, - [ --with-ffmpeg-dts specify if ffmpeg has been compiled with dts support], - [ - if test "$with_ffmpeg_dts" = "yes"; then - LDFLAGS="${LDFLAGS_save} ${LDFLAGS_ffmpeg} ${LIBS_ffmpeg}" - AC_CHECK_LIB(dts_pic, dts_free, - [ VLC_ADD_LIBS([ffmpeg],[-ldts_pic]) ], - [ VLC_ADD_LIBS([ffmpeg],[-ldts]) ]) - LDFLAGS="${LDFLAGS_save}" - fi]) - - AC_ARG_WITH(ffmpeg-vorbis, - [ --with-ffmpeg-vorbis specify if ffmpeg has been compiled with vorbis support], - [ - if test "$with_ffmpeg_vorbis" = "yes"; then - VLC_ADD_LIBS([ffmpeg],[-lvorbisenc -lvorbis]) - fi]) - - AC_ARG_WITH(ffmpeg-theora, - [ --with-ffmpeg-theora specify if ffmpeg has been compiled with theora support], - [ - if test "$with_ffmpeg_theora" = "yes"; then - VLC_ADD_LIBS([ffmpeg],[-ltheora]) - fi]) - - AC_ARG_WITH(ffmpeg-ogg, - [ --with-ffmpeg-ogg specify if ffmpeg has been compiled with ogg support], - [ - if test "$with_ffmpeg_ogg" = "yes"; then - VLC_ADD_LIBS([ffmpeg],[-logg]) - fi]) - - AC_ARG_WITH(ffmpeg-zlib, - [ --with-ffmpeg-zlib specify if ffmpeg has been compiled with zlib support], - [ - if test "$with_ffmpeg_zlib" = "yes"; then - VLC_ADD_LIBS([ffmpeg],[-lz]) - fi]) - - AC_ARG_WITH(ffmpeg-amrnb, - [ --with-ffmpeg-amrnb specify if ffmpeg has been compiled with libamrnb support], - [ - if test "$with_ffmpeg_amrnb" = "yes"; then - VLC_ADD_LIBS([ffmpeg],[-lamrnb]) - fi]) - - AC_ARG_WITH(ffmpeg-amrwb, - [ --with-ffmpeg-amrwb specify if ffmpeg has been compiled with libamrwb support], - [ - if test "$with_ffmpeg_amrwb" = "yes"; then - VLC_ADD_LIBS([ffmpeg],[-lamrwb]) - fi]) - - AC_ARG_WITH(ffmpeg-x264, - [ --with-ffmpeg-x264 specify if ffmpeg has been compiled with libx264 support], - [ - if test "$with_ffmpeg_x264" = "yes"; then - VLC_ADD_LIBS([ffmpeg],[-lx264]) - fi]) - - AC_ARG_WITH(ffmpeg-a52, - [ --with-ffmpeg-a52 specify if ffmpeg has been compiled with liba52 support], - [ - if test "$with_ffmpeg_a52" = "yes"; then - VLC_ADD_LIBS([ffmpeg],[-la52]) - fi]) - - dnl - dnl test for --with-ffmpeg-tree - dnl - AC_ARG_WITH(ffmpeg-tree, - [ --with-ffmpeg-tree=PATH ffmpeg tree for static linking]) - - if test "${with_ffmpeg_tree}" != "no" -a -n "${with_ffmpeg_tree}"; then - AC_MSG_CHECKING(for libavcodec.a in ${with_ffmpeg_tree}) - real_ffmpeg_tree="`cd ${with_ffmpeg_tree} 2>/dev/null && pwd`" - if test -z "${real_ffmpeg_tree}"; then - dnl The given directory can't be found - AC_MSG_RESULT(no) - AC_MSG_ERROR([cannot cd to ${with_ffmpeg_tree}]) - fi - if ! test -f "${real_ffmpeg_tree}/libavcodec/libavcodec.a"; then - dnl The given libavcodec wasn't built - AC_MSG_RESULT(no) - AC_MSG_ERROR([cannot find ${real_ffmpeg_tree}/libavcodec/libavcodec.a, make sure you compiled libavcodec in ${with_ffmpeg_tree}]) - fi - if ! fgrep -s "pp_get_context" "${real_ffmpeg_tree}/libavcodec/libavcodec.a"; then - if test -f "${real_ffmpeg_tree}/libavcodec/libpostproc/libpostproc.a"; then - VLC_ADD_LIBS([ffmpeg],[-L${real_ffmpeg_tree}/libavcodec/libpostproc ${real_ffmpeg_tree}/libavcodec/libpostproc/libpostproc.a]) - elif test -f "${real_ffmpeg_tree}/libpostproc/libpostproc.a"; then - VLC_ADD_LIBS([ffmpeg],[-L${real_ffmpeg_tree}/libpostproc ${real_ffmpeg_tree}/libpostproc/libpostproc.a]) - VLC_ADD_CPPFLAGS([ffmpeg stream_out_switcher],[-I${real_ffmpeg_tree}]) - else - dnl The given libavcodec wasn't built with --enable-postproc - AC_MSG_RESULT(no) - AC_MSG_ERROR([cannot find libpostproc.a in ${real_ffmpeg_tree}/[libavcodec/]libpostproc/. Make sure you configured ffmpeg with --enable-postproc]) - fi - fi - dnl Use a custom libffmpeg - AC_MSG_RESULT(${real_ffmpeg_tree}/libavcodec/libavcodec.a) - - dnl Use pkg-config to look for the ldflags in libav*-uninstalled.pc - PKG_CONFIG_PATH_save="$PKG_CONFIG_PATH" - PKG_CONFIG_LIBDIR_save="$PKG_CONFIG_LIBDIR" - export PKG_CONFIG_PATH="" - export PKG_CONFIG_LIBDIR="${real_ffmpeg_tree}" - VLC_SAVE_FLAGS - - PKG_CHECK_MODULES( [FFMPEG],[libavformat libavcodec libpostproc], [ - VLC_ADD_CPPFLAGS([ffmpeg stream_out_switcher], ${FFMPEG_CFLAGS}) - VLC_ADD_LIBS([ffmpeg stream_out_switcher], ${FFMPEG_LIBS})] - AC_DEFINE(HAVE_LIBAVFORMAT_TREE, 1, [Define if you have ffmpeg's libavformat.]) - ) - AS_IF([ test -f "${real_ffmpeg_tree}/libswscale/libswscale.a"],[ - AC_DEFINE(HAVE_LIBSWSCALE_TREE, 1, [Define if you have ffmpeg's libswscale.]) - PKG_CHECK_MODULES( [SWSCALE],[libswscale], [ - VLC_ADD_LIBS([ffmpeg],[${SWSCALE_LIBS}]) - VLC_ADD_CPPFLAGS([ffmpeg stream_out_switcher],[${SWSCALE_CFLAGS}])]) - ]) - CPPFLAGS="${CPPFLAGS} ${FFMPEG_CFLAGS} ${SWSCALE_CFLAGS}" - CFLAGS="${CFLAGS} ${FFMPEG_CFLAGS} ${SWSCALE_CFLAGS}" - - AC_CHECK_HEADERS(ffmpeg/avcodec.h libavcodec/avcodec.h) - AC_CHECK_HEADERS(ffmpeg/avformat.h libavformat/avformat.h) - AC_CHECK_HEADERS(ffmpeg/avutil.h libavutil/avutil.h) - AC_CHECK_HEADERS([ffmpeg/swscale.h libswscale/swscale.h]) - - VLC_RESTORE_FLAGS - AS_IF([test -n "${PKG_CONFIG_PATH_save}"],[ - export PKG_CONFIG_PATH="${PKG_CONFIG_PATH_save}" - ],[ - unset PKG_CONFIG_PATH - ]) - AS_IF([test -n "${PKG_CONFIG_LIBDIR_save}"],[ - export PKG_CONFIG_LIBDIR="${PKG_CONFIG_LIBDIR_save}" - ],[ - unset PKG_CONFIG_LIBDIR - ]) - - VLC_ADD_BUILTINS([ffmpeg]) - if test "${enable_sout}" != "no" -a "${enable_switcher}" = "yes" ; then - VLC_ADD_BUILTINS([stream_out_switcher]) - fi - - -else - - dnl Trying with pkg-config PKG_CHECK_MODULES(FFMPEG,[libavcodec, libavformat], [ @@ -3198,7 +3012,7 @@ dnl Trying with pkg-config PKG_CHECK_MODULES(POSTPROC, libpostproc,[ VLC_ADD_CFLAGS([ffmpeg],[${POSTPROC_CFLAGS}]) VLC_ADD_LIBS([ffmpeg],[${POSTPROC_LIBS}]) - ],[ true ]) + ]) CPPFLAGS="${CPPFLAGS} ${POSTPROC_CFLAGS}" CFLAGS="${CFLAGS} ${POSTPROC_CFLAGS}" AC_CHECK_HEADERS(postproc/postprocess.h) @@ -3214,14 +3028,25 @@ dnl Trying with pkg-config VLC_ADD_CFLAGS([ffmpeg],[${SWSCALE_CFLAGS}]) VLC_ADD_LIBS([ffmpeg],[${SWSCALE_LIBS}]) AC_CHECK_LIB(swscale, sws_getContext, - [AC_CHECK_HEADERS([ffmpeg/swscale.h libswscale/swscale.h])],[],[-lavutil -lm]) - ],[ true ]) - VLC_RESTORE_FLAGS - ],[ + [AC_CHECK_HEADERS([ffmpeg/swscale.h libswscale/swscale.h])], + [AC_CHECK_LIB(avcodec,img_resample,[], + [AC_MSG_ERROR([Your FFmpeg library doesn't have the needed img_resample() function. You should rebuild it with software scaler disabled, or install the swscale headers.])], + [${FFMPEG_LIBS}]) + ], + [${SWSCALE_LIBS}]) + ],[AC_CHECK_LIB(avcodec,img_resample,[], + [AC_MSG_ERROR([Your FFmpeg library doesn't have the needed img_resample() function. You should rebuild it with software scaler disabled, or install the swscale headers.])], + [${FFMPEG_LIBS}]) + ] + ) + VLC_RESTORE_FLAGS + + ],[ dnl dnl last chance: at the default place dnl + VLC_SAVE_FLAGS CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_ffmpeg}" LDFLAGS="${LDFLAGS_save} ${LDFLAGS_ffmpeg} ${LIBS_ffmpeg}" AC_CHECK_HEADERS(ffmpeg/avcodec.h libavcodec/avcodec.h) @@ -3248,58 +3073,19 @@ dnl Trying with pkg-config AC_CHECK_LIB(avformat, av_open_input_stream, [ VLC_ADD_LIBS([ffmpeg],[-lavformat -lz]) ], [], [-lavcodec -lz $LDAVUTIL]) - LDFLAGS="${LDFLAGS_save}" - CPPFLAGS="${CPPFLAGS_save}" + VLC_RESTORE_FLAGS AC_CHECK_LIB(swscale, sws_getContext, [ AC_CHECK_HEADERS(ffmpeg/swscale.h libswscale/swscale.h) - VLC_ADD_LIBS([ffmpeg],[-lswscale]) ], [], [-lavcodec $LDAVUTIL]) - LDFLAGS="${LDFLAGS_save}" - CPPFLAGS="${CPPFLAGS_save}" - ]) - fi -fi + VLC_ADD_LIBS([ffmpeg],[-lswscale]) ], + [AC_CHECK_LIB(avcodec,img_resample,[], + [AC_MSG_ERROR([Your FFmpeg library doesn't have the needed img_resample() function. You should rebuild it with software scaler disabled, or install the swscale headers.])], + [-lavcodec $LDAVUTIL]) + ], + [${SWSCALE_LIBS}]) -dnl -dnl ffmpegaltivec plugin -dnl -AC_ARG_ENABLE(ffmpegaltivec, -[ --enable-ffmpegaltivec ffmpegaltivec codec (DO NOT USE)]) -if test "${enable_ffmpegaltivec}" = "yes" -then - if test "${with_ffmpeg_tree}" != "no" -a -n "${with_ffmpeg_tree}"; then - AC_MSG_CHECKING(for libavcodecaltivec.a in ${with_ffmpeg_tree}) - real_ffmpeg_tree="`cd ${with_ffmpeg_tree} 2>/dev/null && pwd`" - if test -z "${real_ffmpeg_tree}"; then - dnl The given directory can't be found - AC_MSG_RESULT(no) - AC_MSG_ERROR([cannot cd to ${with_ffmpeg_tree}]) - fi - if ! test -f "${real_ffmpeg_tree}/libavcodec/libavcodecaltivec.a"; then - dnl The given libavcodecaltivec wasn't built - AC_MSG_RESULT(no) - AC_MSG_ERROR([cannot find ${real_ffmpeg_tree}/libavcodec/libavcodecaltivec.a, make sure you compiled libavcodecaltivec in ${with_ffmpeg_tree}]) - fi - if ! fgrep -s "pp_get_context" "${real_ffmpeg_tree}/libavcodec/libavcodecaltivec.a"; then - dnl The given libavcodecaltivec wasn't built with --enable-postproc - AC_MSG_RESULT(no) - AC_MSG_ERROR([${real_ffmpeg_tree}/libavcodec/libavcodecaltivec.a was not compiled with postprocessing support, make sure you configured ffmpeg with --enable-postproc]) - fi - dnl Use a custom libffmpeg - AC_MSG_RESULT(${real_ffmpeg_tree}/libavcodec/libavcodecaltivec.a) - VLC_ADD_BUILTINS([ffmpegaltivec]) - VLC_ADD_LIBS([ffmpegaltivec],[-L${real_ffmpeg_tree}/libavcodec -lavcodecaltivec]) - VLC_ADD_CPPFLAGS([ffmpeg],[-DNO_ALTIVEC_IN_FFMPEG]) - VLC_ADD_CPPFLAGS([ffmpegaltivec],[-I${real_ffmpeg_tree}/libavcodec -I${real_ffmpeg_tree}/libavformat]) - - if test -f "${real_ffmpeg_tree}/libavformat/libavformat.a"; then - AC_DEFINE(HAVE_LIBAVFORMAT_TREE, 1, [Define if you have ffmpeg's libavformat.]) - VLC_ADD_LIBS([ffmpegaltivec],[-L${real_ffmpeg_tree}/libavformat -lavformataltivec -lz]) - VLC_ADD_CPPFLAGS([ffmpegaltivec],[-I${real_ffmpeg_tree}/libavformat]) - fi - VLC_ADD_LIBS([stream_out_switcher],[-L${real_ffmpeg_tree}/libavcodec]) - VLC_ADD_CPPFLAGS([stream_out_switcher],[-I${real_ffmpeg_tree}/libavcodec -I${real_ffmpeg_tree}/libavformat]) - fi + VLC_RESTORE_FLAGS + ]) fi dnl @@ -5181,6 +4967,8 @@ then 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"]) @@ -5501,18 +5289,20 @@ AC_ARG_ENABLE(macosx, if test "x${enable_macosx}" = "xyes" then # VLC_ADD_LDFLAGS([access_eyetv], [-Wl,-framework,Foundation]) - VLC_ADD_LDFLAGS([macosx minimal_macosx opengllayer],[-Wl,-framework,Cocoa]) + VLC_ADD_LDFLAGS([macosx minimal_macosx opengllayer qtcapture],[-Wl,-framework,Cocoa]) VLC_ADD_LDFLAGS([macosx minimal_macosx opengllayer],[-Wl,-framework,OpenGL]) VLC_ADD_LDFLAGS([macosx minimal_macosx], [-Wl,-framework,Carbon]) VLC_ADD_LDFLAGS([macosx minimal_macosx], [-Wl,-framework,AGL]) VLC_ADD_LDFLAGS([macosx], [-Wl,-framework,IOKit]) VLC_ADD_LDFLAGS([macosx], [-Wl,-framework,QuickTime]) - VLC_ADD_LDFLAGS([macosx], [-Wl,-framework,QTKit]) + VLC_ADD_LDFLAGS([macosx qtcapture], [-Wl,-framework,QTKit]) VLC_ADD_LDFLAGS([macosx], [-Wl,-framework,WebKit]) - VLC_ADD_LDFLAGS([opengllayer], [-Wl,-framework,QuartzCore]) + VLC_ADD_LDFLAGS([opengllayer qtcapture], [-Wl,-framework,QuartzCore]) + VLC_ADD_LDFLAGS([qtcapture], [-Wl,-framework,CoreVideo]) VLC_ADD_OBJCFLAGS([macosx minimal_macosx opengllayer growl], [-fobjc-exceptions] ) # VLC_ADD_PLUGIN([access_eyetv]) + VLC_ADD_PLUGIN([qtcapture]) VLC_ADD_PLUGIN([macosx]) VLC_ADD_PLUGIN([minimal_macosx]) @@ -5818,63 +5608,15 @@ then fi dnl -dnl Endianness check, AC_C_BIGENDIAN doesn't work if we are cross-compiling +dnl Endianness check dnl -dnl We give the user the opportunity to specify -dnl --with-words=big or --with-words=little ; otherwise, try to guess -dnl -AC_ARG_WITH(words, - [ --with-words=endianness set endianness (big or little)]) - case "${with_words}" in - big) - ac_cv_c_bigendian=yes - ;; - little) - ac_cv_c_bigendian=no - ;; - *) - dnl Try to guess endianness by matching patterns on a compiled - dnl binary, by looking for an ASCII or EBCDIC string - AC_CACHE_CHECK([whether the byte order is big-endian], - [ac_cv_c_bigendian], - [ac_cv_c_bigendian="unknown" - [cat >conftest.c <>config.log 2>&1 \ - && test -f conftest.o - then - if test "`strings conftest.o | grep BIGenDianSyS`" - then - ac_cv_c_bigendian="yes" - fi - if test "`strings conftest.o | grep LiTTleEnDian`" - then - ac_cv_c_bigendian="no" - fi - fi - fi - ]) - if test "${ac_cv_c_bigendian}" = "unknown" - then - AC_MSG_ERROR([Could not guess endianness, please use --with-words]) - fi - ;; - esac -dnl Now we know what to use for endianness, just put it in the header -if test "${ac_cv_c_bigendian}" = "yes" -then - AC_DEFINE(WORDS_BIGENDIAN, 1, big endian system) -fi +AC_C_BIGENDIAN +AS_IF([test "${ac_cv_c_bigendian}" = "yes"], [ + DEFS_BIGENDIAN="-DWORDS_BIGENDIAN=1" +], [ + DEFS_BIGENDIAN="" +]) +AC_SUBST(DEFS_BIGENDIAN) dnl dnl DLL loader copied from MPlayer copied from somewhere else (WINE ?) @@ -6134,56 +5876,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 - -dnl -dnl Mediacontrol Python bindings -dnl -AC_ARG_ENABLE(python-bindings, - [ --enable-python-bindings Enable Python bindings (default disabled)]) - -if test "${enable_python_bindings}" = "yes"; then - AC_PATH_PROG(PYTHON_CONFIG, python-config, no) - CFLAGS="${CFLAGS_save} `${PYTHON_CONFIG} --cflags`" - AC_CHECK_HEADER([Python.h], - PLUGINS_BINDINGS="${PLUGINS_BINDINGS} python", - AC_MSG_ERROR([You have to install python-dev to build the bindings]), - [] - ) - CFLAGS="${CFLAGS_save}" -fi -AM_CONDITIONAL(BUILD_PYTHON, [test "${enable_python_bindings}" = "yes"]) - -dnl -dnl Java bindings -dnl -AC_ARG_ENABLE(java-bindings, - [ --enable-java-bindings Enable Java bindings (default disabled)]) -if test "${enable_java_bindings}" = "yes" -then - echo "" - echo "****** WARNING **** WARNING ***** WARNING *************" - echo "*** To compile the java bindings go to the " - echo "*** bindings/java folder and run mvn install. " - echo "*** You need maven2 installed. " - echo "*** This configuration will continue, so you will be " - echo "*** able to compile VideoLAN as usual. " - echo "*******************************************************" - echo "" -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 test plugins @@ -6260,7 +5962,6 @@ then VLC_ADD_LDFLAGS([qte_main],[${LDFLAGS_qte} ${LDFLAGS_qt_video}]) fi - dnl dnl Plugin and builtin checks dnl @@ -6291,8 +5992,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 @@ -6352,8 +6053,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 @@ -6363,7 +6064,6 @@ AC_CONFIG_FILES([ Makefile projects/activex/Makefile projects/activex/axvlc.inf - bindings/python/Makefile doc/Makefile extras/package/ipkg/Makefile libs/loader/Makefile