X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=configure.ac;h=1e3a725d41cdd1105e9faca2b112352934e84b6c;hb=7467b74ca3b0396ae8baa2939256074d32d04a3d;hp=51ef50e735248d5b93934c319ddfde73f29ee46f;hpb=4bcb2f21a9d5c13992e2430bbe335695567fb7be;p=vlc diff --git a/configure.ac b/configure.ac index 51ef50e735..1e3a725d41 100644 --- a/configure.ac +++ b/configure.ac @@ -55,6 +55,7 @@ AC_CHECK_TOOL(RANLIB, ranlib, :) AC_CHECK_TOOL(STRIP, strip, :) AC_CHECK_TOOL(AR, ar, :) AC_CHECK_TOOL(LD, ld, :) +AC_CHECK_TOOL(DLLTOOL, dlltool, :) dnl Check for compiler properties AC_C_CONST @@ -244,7 +245,7 @@ case "${host_os}" in VLC_ADD_LDFLAGS([beos],[-lbe -lmedia -ltranslation -ltracker -lgame]) VLC_ADD_LDFLAGS([dvdnav dvdread],[-ldl]) VLC_ADD_LDFLAGS([access_file],[-lpoll]) - LDFLAGS_save="${LDFLAGS_save} -lintl"; LDFLAGS="${CFLAGS_save}" + LDFLAGS_save="${LDFLAGS_save} -lintl"; LDFLAGS="${LDFLAGS_save}" dnl Check for BONE if test -f /boot/beos/system/lib/libbind.so; then VLC_ADD_LDFLAGS([access_file access_ftp access_mms access_output_udp telnet netsync sap ipv4 vlc growl],[-lbind -lsocket]) @@ -274,6 +275,8 @@ dnl AC_DISABLE_STATIC AC_LIBTOOL_DLOPEN dnl AC_LIBTOOL_WIN32_DLL - couldn't get libtool to work on Win32 so far +m4_undefine([AC_PROG_F77]) +m4_defun([AC_PROG_F77],[]) AC_PROG_LIBTOOL AC_ARG_ENABLE(libtool, @@ -298,7 +301,7 @@ fi dnl dnl Gettext stuff dnl -ALL_LINGUAS="ca cs da de en_GB es fr gl he hi hu it ja ka ko ms nl oc pt_BR ro ru sk sv tr zh_CN zh_TW" +ALL_LINGUAS="af ar bn ca co cs da de el en_GB es eu fr fur gl he hi hu it ja ka ko lt lv ms my nb ne nl nn no oc pa pl ps pt_BR pt_PT ro ru sk sl sq sv tet th tl tr zh_CN zh_TW" AM_GNU_GETTEXT_VERSION(0.11.5) AM_GNU_GETTEXT AS_IF([test "${nls_cv_force_use_gnu_gettext}" = "yes"], [ @@ -565,10 +568,10 @@ AC_CHECK_LIB(m,cos,[ VLC_ADD_LDFLAGS([adjust wave ripple psychedelic gradient a52tofloat32 dtstofloat32 x264 goom visual panoramix rotate noise],[-lm]) ]) AC_CHECK_LIB(m,pow,[ - VLC_ADD_LDFLAGS([ffmpeg ffmpegaltivec stream_out_transrate i420_rgb faad twolame equalizer param_eq vlc freetype mpc dmo quicktime realaudio galaktos],[-lm]) + VLC_ADD_LDFLAGS([ffmpeg ffmpegaltivec stream_out_transrate i420_rgb faad twolame equalizer param_eq vlc vorbis freetype mod mpc dmo quicktime realaudio galaktos opengl],[-lm]) ]) AC_CHECK_LIB(m,sqrt,[ - VLC_ADD_LDFLAGS([headphone_channel_mixer normvol speex],[-lm]) + VLC_ADD_LDFLAGS([headphone_channel_mixer normvol speex mono colorthres],[-lm]) ]) AC_CHECK_LIB(m,ceil,[ VLC_ADD_LDFLAGS([mosaic],[-lm]) @@ -886,10 +889,17 @@ AC_CACHE_CHECK([for ntohl in sys/param.h], if test "${ac_cv_c_ntohl_sys_param_h}" != "no"; then AC_DEFINE(NTOHL_IN_SYS_PARAM_H, 1, Define if defines ntohl.) fi +CFLAGS="${CFLAGS_save}" -RDC_PROG_CC_WFLAGS([all extra no-unused-parameter sign-compare undef]) +RDC_PROG_CC_WFLAGS([all extra no-unused-parameter sign-compare undef pointer-arith bad-function-cast cast-align write-strings old-style-definition missing-prototypes packed volatile-register-var]) RDC_PROG_CC_FLAGS_IFELSE([-pipe]) +dnl This helps detect broken plugins with undefined symbols +dnl Better fail loudly at build-time than silenty at run-time. +RDC_PROG_LINK_FLAGS_IFELSE([-Wl,-z,defs], [ + VLC_ADD_LDFLAGS([plugin],[-Wl,-z,defs]) +]) + dnl Check for various optimization flags AC_CACHE_CHECK([if \$CC accepts -Os], [ac_cv_c_os], @@ -983,17 +993,19 @@ fi dnl Check for standard plugin linking flags dnl BeOS' gcc needs -nostart instead of -shared, even if -shared isn't harmful (just a warning) -if test "${SYS}" = "beos"; then - VLC_ADD_LDFLAGS([plugin mozilla],[-nostart]) -else - AC_CACHE_CHECK([if \$CC accepts -shared], - [ac_cv_ld_plugins], - [CFLAGS="${CFLAGS_save} -shared" - AC_TRY_COMPILE([],, ac_cv_ld_plugins=yes, ac_cv_ld_plugins=no)]) - if test "${ac_cv_ld_plugins}" != "no"; then - VLC_ADD_LDFLAGS([plugin mozilla],[-shared]) - fi -fi +AS_IF([test "${enable_libtool}" = "no"], [ + AS_IF([test "${SYS}" = "beos"], [ + VLC_ADD_LDFLAGS([plugin mozilla],[-nostart]) + ], [ + AC_CACHE_CHECK([if \$CC accepts -shared], + [ac_cv_ld_plugins], + [CFLAGS="${CFLAGS_save} -shared" + AC_TRY_COMPILE([],, ac_cv_ld_plugins=yes, ac_cv_ld_plugins=no)]) + AS_IF([test "${ac_cv_ld_plugins}" != "no"], [ + VLC_ADD_LDFLAGS([plugin mozilla],[-shared]) + ]) + ]) +]) dnl Check for variadic macros AC_CACHE_CHECK([for variadic cpp macros], @@ -1074,14 +1086,14 @@ 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 flac tta]) -VLC_ADD_PLUGINS([cvdsub svcdsub spudec subsdec dvbsub mpeg_audio lpcm a52 dts cinepak flacdec]) +VLC_ADD_PLUGINS([mpgv mpga m4v m4a h264 ps pva avi asf mp4 rawdv nsv real aiff mjpeg demuxdump flacsys tta]) +VLC_ADD_PLUGINS([cvdsub svcdsub spudec subsdec dvbsub mpeg_audio lpcm a52 dts cinepak flac]) VLC_ADD_PLUGINS([deinterlace invert adjust transform wave ripple psychedelic gradient motionblur rv32 rotate noise]) VLC_ADD_PLUGINS([fixed32tos16 s16tofixed32 u8tofixed32 mono]) VLC_ADD_PLUGINS([trivial_resampler ugly_resampler]) VLC_ADD_PLUGINS([trivial_channel_mixer trivial_mixer]) VLC_ADD_PLUGINS([playlist export sgimb nsc xtag]) -VLC_ADD_PLUGINS([i420_rgb rawvideo blend scale image logo magnify]) +VLC_ADD_PLUGINS([i420_rgb rawvideo blend scale image logo magnify puzzle colorthres]) VLC_ADD_PLUGINS([wav araw subtitle vobsub adpcm a52sys dtssys au ty voc xa nuv]) VLC_ADD_PLUGINS([access_directory access_file access_udp access_tcp]) VLC_ADD_PLUGINS([access_http access_mms access_ftp ipv4]) @@ -1090,8 +1102,7 @@ VLC_ADD_PLUGINS([packetizer_mpeg4video packetizer_mpeg4audio]) if test "${SYS}" != "mingwce"; then -dnl VLC_ADD_PLUGINS([externrun]) - VLC_ADD_PLUGINS([access_fake access_filter_timeshift access_filter_record]) + 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([i420_yuy2 i422_yuy2 i420_ymga]) @@ -1416,7 +1427,7 @@ then VLC_ADD_PLUGINS([packetizer_copy]) VLC_ADD_PLUGINS([stream_out_dummy stream_out_standard stream_out_es stream_out_rtp stream_out_description vod_rtsp]) - VLC_ADD_PLUGINS([stream_out_duplicate stream_out_gather stream_out_display stream_out_transcode stream_out_bridge stream_out_mosaic_bridge]) + VLC_ADD_PLUGINS([stream_out_duplicate stream_out_gather stream_out_display stream_out_transcode stream_out_bridge stream_out_mosaic_bridge stream_out_autodel]) # VLC_ADD_PLUGINS([stream_out_transrate]) VLC_ADD_PLUGINS([profile_parser]) @@ -1475,7 +1486,7 @@ dnl AC_ARG_ENABLE(notify, [ --enable-notify libnotify notification plugin (default enabled)]) -AS_IF([test "${enable_notify}" != "no"], [ +AS_IF([test "${enable_notify}" != "no" -a "${SYS}" != "mingw32"], [ PKG_CHECK_MODULES(NOTIFY, libnotify, [ VLC_ADD_PLUGINS([notify]) @@ -1492,8 +1503,8 @@ dnl Audioscrobbler plugin dnl AC_ARG_ENABLE(audioscrobbler, - [ --enable-audioscrobbler Last.fm submission plugin (default enabled)]) -AS_IF([test "${enable_audioscrobbler}" != "no"], [ + [ --enable-audioscrobbler Last.fm submission plugin (default disabled)]) +AS_IF([test "${enable_audioscrobbler}" = "yes"], [ VLC_ADD_PLUGINS([audioscrobbler]) ]) @@ -2445,8 +2456,8 @@ then dnl Use a custom mod AC_MSG_RESULT(${real_mod_tree}/src/.libs/libmodplug.a) VLC_ADD_PLUGINS([mod]) - VLC_ADD_LDFLAGS([mod],[${real_mod_tree}/src/.libs/libmodplug.a]) - VLC_ADD_CFLAGS([mod],[-I${real_mod_tree}/include]) + VLC_ADD_LDFLAGS([mod],[${real_mod_tree}/src/.libs/libmodplug.a -lstdc++]) + VLC_ADD_CXXFLAGS([mod],[-I${real_mod_tree}/include]) else dnl The given mod wasn't built AC_MSG_RESULT(no) @@ -2456,7 +2467,7 @@ then AC_CHECK_HEADERS(libmodplug/modplug.h, [ VLC_ADD_PLUGINS([mod]) VLC_ADD_CXXFLAGS([mod],[]) - VLC_ADD_LDFLAGS([mod],[-lmodplug])]) + VLC_ADD_LDFLAGS([mod],[-lmodplug -lstdc++])]) fi fi @@ -2748,10 +2759,10 @@ dnl Look for a ffmpeg-config (we are on debian ) AC_PATH_PROG(FFMPEG_CONFIG, ffmpeg-config, no, ${FFMPEG_PATH}) if test "${FFMPEG_CONFIG}" != "no" then - AC_CHECK_HEADERS(ffmpeg/avcodec.h) + 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/avutil.h) - AC_CHECK_HEADERS(postproc/postprocess.h) + AC_CHECK_HEADERS(postproc/postprocess.h, [], [AC_MSG_ERROR([Missing header file postproc/postprocess.h.])] ) VLC_ADD_PLUGINS([ffmpeg]) if test "${enable_sout}" != "no" -a "${enable_switcher}" = "yes"; then VLC_ADD_PLUGINS([stream_out_switcher]) @@ -2764,10 +2775,10 @@ dnl Look for a ffmpeg-config (we are on debian ) dnl Trying with pkg-config PKG_CHECK_MODULES(FFMPEG,[libavcodec, libavformat], [ - AC_CHECK_HEADERS(ffmpeg/avcodec.h) + 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/avutil.h) - AC_CHECK_HEADERS(postproc/postprocess.h) + AC_CHECK_HEADERS(postproc/postprocess.h, [], [AC_MSG_ERROR([Missing header file postproc/postprocess.h.])] ) if test "${SYS}" = "darwin"; then VLC_ADD_BUILTINS([ffmpeg]) else @@ -3079,7 +3090,9 @@ then VLC_ADD_CPPFLAGS([a52tofloat32],[${CPPFLAGS_test}]) ],[ AC_MSG_ERROR([Could not find liba52 on your system: you may get it from http://liba52.sf.net/. Alternatively you can use --disable-a52 to disable the a52 plugin.]) - ]) + ]) + ],[ + AC_MSG_ERROR([Could not find liba52 on your system: you may get it from http://liba52.sf.net/. Alternatively you can use --disable-a52 to disable the a52 plugin.]) ]) CPPFLAGS="${CPPFLAGS_save}" LDFLAGS="${LDFLAGS_save}" @@ -3162,7 +3175,7 @@ dnl dnl Flac plugin dnl AC_ARG_ENABLE(flac, - [ --enable-flac flac decoder support (default disabled)]) + [ --enable-flac libflac decoder/encoder support (default disabled)]) if test "${enable_flac}" = "yes" then AC_ARG_WITH(flac-tree, @@ -3181,8 +3194,8 @@ then then dnl Use a custom flac AC_MSG_RESULT(${real_flac_tree}/src/libFLAC/.libs/libFLAC.a) - VLC_ADD_LDFLAGS([flacdec],[${real_flac_tree}/src/libFLAC/.libs/libFLAC.a]) - VLC_ADD_CFLAGS([flacdec],[-I${real_flac_tree}/include]) + VLC_ADD_LDFLAGS([flac],[${real_flac_tree}/src/libFLAC/.libs/libFLAC.a]) + VLC_ADD_CFLAGS([flac],[-I${real_flac_tree}/include]) AC_DEFINE(HAVE_FLAC_STREAM_DECODER_H, 1, [Define if you have FLAC]) else dnl The given flac wasn't built @@ -3191,7 +3204,7 @@ then fi else AC_CHECK_HEADERS(FLAC/stream_decoder.h, [ - VLC_ADD_LDFLAGS([flacdec],[-lFLAC]) + VLC_ADD_LDFLAGS([flac],[-lFLAC]) ],[]) fi fi @@ -3283,10 +3296,10 @@ then else AC_CHECK_HEADERS(vorbis/codec.h, [ VLC_ADD_PLUGINS([vorbis]) - VLC_ADD_LDFLAGS([vorbis],[-lvorbis -logg]) ],[]) + VLC_ADD_LDFLAGS([vorbis],[-lvorbis -logg -lm]) ],[]) AC_CHECK_HEADERS(vorbis/vorbisenc.h, [ - VLC_ADD_LDFLAGS([vorbis],[-lvorbisenc]) ],[]) + VLC_ADD_LDFLAGS([vorbis],[-lvorbisenc -lm]) ],[]) fi fi @@ -3581,7 +3594,25 @@ if test "${enable_glx}" != "no" && VLC_ADD_PLUGINS([glx]) VLC_ADD_LDFLAGS([glx],[${X_LIBS} ${X_PRE_LIBS} -lX11 -lXext -lGL -lGLU]) VLC_ADD_CPPFLAGS([glx],[${X_CFLAGS}]) - ]) + ],[AC_MSG_ERROR([Please install GL development package. Alternatively you can also configure with --disable-glx.])]) + CPPFLAGS="${CPPFLAGS_save}" +fi + +dnl +dnl XVMC module +dnl (enabled by default except on win32) +dnl +AC_ARG_ENABLE(xvmc, + [ --enable-xvmc XVMC support (default disabled)]) +if test "${enable_xvmc}" = "yes" && + (test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce" || + test "${enable_xvmc}" = "yes"); then + CPPFLAGS="${CPPFLAGS_save} ${X_FLAGS}" + AC_CHECK_HEADERS(X11/extensions/vldXvMC.h, [ + VLC_ADD_PLUGINS([xvmc]) + VLC_ADD_LDFLAGS([xvmc],[${X_LIBS} ${X_PRE_LIBS} -lX11 -lXext]) + VLC_ADD_CPPFLAGS([xvmc],[${X_CFLAGS}]) + ]) CPPFLAGS="${CPPFLAGS_save}" fi @@ -4409,7 +4440,7 @@ AS_IF([test "x${enable_upnp}" != "xno"], [ AC_MSG_ERROR([cannot find Intel UPnP SDK (libupnp)]) ]) AS_IF([test "${has_upnp}" = "yes"], [ - VLC_ADD_LDFLAGS([upnp_intel], [-lupnp]) + VLC_ADD_LDFLAGS([upnp_intel], [-lupnp -lixml]) ]) ], [ has_upnp="no" @@ -4661,6 +4692,18 @@ then fi VLC_ADD_LDFLAGS([wxwidgets],[`${WX_CONFIG} --libs`]) VLC_ADD_CXXFLAGS([wxwidgets],[`${WX_CONFIG} --cxxflags`]) + # check if we must link against gtk2 libs + # if __WXGTK20__ && __WXGTK__ are defined + # for modules/gui/wxwidgets/video.cpp + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ +#include +#ifdef __WXGTK20__ +#error ok, we need to link against gtk2 +#endif + ])],[WXGTK=no],[WXGTK=yes]) + if test "$WXGTK" = "yes"; then + ${PKG_CONFIG} --exists gtk+-2.0 && VLC_ADD_LDFLAGS([wxwidgets],[`$PKG_CONFIG --libs gtk+-2.0`]) + fi if ${WX_CONFIG} --unicode then # wxwidgets should provide the following flags but does not @@ -5132,11 +5175,11 @@ 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]) + VLC_ADD_LDFLAGS([dmo],[../../../loader/libloader.la -lpthread]) VLC_ADD_CPPFLAGS([quicktime],[-I../../@top_srcdir@/loader]) - VLC_ADD_LDFLAGS([quicktime],[../../loader/libloader.la]) + VLC_ADD_LDFLAGS([quicktime],[../../loader/libloader.la -lpthread]) VLC_ADD_CPPFLAGS([realaudio],[-I../../@top_srcdir@/loader -DLOADER]) - VLC_ADD_LDFLAGS([realaudio],[../../loader/libloader.la]) + VLC_ADD_LDFLAGS([realaudio],[../../loader/libloader.la -ldl -lpthread]) ]) dnl @@ -5190,12 +5233,12 @@ AC_ARG_ENABLE(mozilla, [ --enable-mozilla build a vlc-based Mozilla plugin (default disabled)]) AC_ARG_WITH(mozilla-sdk-path, [ --with-mozilla-sdk-path=PATH path to mozilla sdk]) - +AC_LANG_PUSH(C++) if test "${enable_mozilla}" = "yes" then dnl currently vlc plugin only needs headers, no xpcom support apis are actually used need_xpcom_libs=false - if test "${with_mozilla_sdk_path}" = "" + if test "${with_mozilla_sdk_path}" = "" -o "${with_mozilla_sdk_path}" = "no" then AC_PATH_PROG(MOZILLA_CONFIG, mozilla-config, no) if test "${MOZILLA_CONFIG}" = "no" @@ -5238,17 +5281,21 @@ then VLC_ADD_LDFLAGS([mozilla],[`${MOZILLA_CONFIG} --libs plugin`]) fi CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_mozilla}" - AC_CHECK_HEADERS(mozilla-config.h) + MOZILLA_REQUIRED_HEADERS=1 + AC_CHECK_HEADERS(mozilla-config.h,,MOZILLA_REQUIRED_HEADERS=0) + AC_CHECK_HEADERS(npapi.h,,MOZILLA_REQUIRED_HEADERS=0) + AC_CHECK_HEADERS(npruntime.h,,MOZILLA_REQUIRED_HEADERS=0, + [#if HAVE_NPAPI_H + # include + #endif + ]) + if test "${MOZILLA_REQUIRED_HEADERS}" = "0" + then + AC_MSG_ERROR([Please install the Mozilla development tools, required headers were not found.]) + fi + MOZILLA_REQUIRED_HEADERS= CPPFLAGS="${CPPFLAGS_save}" MOZILLA_SDK_PATH="`${MOZILLA_CONFIG} --prefix`" - XPIDL_INCL="`${MOZILLA_CONFIG} --cflags plugin xpcom java` \ - `${MOZILLA_CONFIG} --idlflags plugin xpcom java` " - if ${have_xul} - then - xpidl_path="`${MOZILLA_CONFIG} --prefix`/lib/xulrunner" - else - xpidl_path="`${MOZILLA_CONFIG} --prefix`/bin" - fi dnl End of moz_sdk = "" else dnl special case for mingw32 @@ -5263,39 +5310,40 @@ then real_mozilla_sdk="`cd ${with_mozilla_sdk_path} 2>/dev/null && pwd`" CPPFLAGS="${CPPFLAGS_save} -I${real_mozilla_sdk} -I${real_mozilla_sdk}/include" - AC_CHECK_HEADERS(mozilla-config.h, [ - mozilla=: - VLC_ADD_CPPFLAGS([mozilla],[-DXPCOM_GLUE -DHAVE_CPP_MODERN_SPECIALIZE_TEMPLATE_SYNTAX -I${real_mozilla_sdk} -I${real_mozilla_sdk}/include -I${real_mozilla_sdk}/embedstring/include -I${real_mozilla_sdk}/xpcom/include -I${real_mozilla_sdk}/nspr/include -I${real_mozilla_sdk}/string/include -I${real_mozilla_sdk}/plugin/include -I${real_mozilla_sdk}/java/include]) - if ${need_xpcom_libs}; then - VLC_ADD_LDFLAGS([mozilla],[-L${real_mozilla_sdk}/embedstring/bin -L${real_mozilla_sdk}/xpcom/bin -L${real_mozilla_sdk}/nspr/bin -L${real_mozilla_sdk}/string/bin -L${real_mozilla_sdk}/lib -lnspr4 -lplds4 -lplc4 -lxpcomglue]) - if test "${SYS}" = "mingw32"; then - dnl latest gecko sdk does not have embedstring - if test -d "${real_mozilla_sdk}/embedstring/bin" - then - VLC_ADD_LDFLAGS([mozilla],[-lembedstring -Wl,--kill-at]) - fi - fi - fi - - MOZILLA_SDK_PATH="${real_mozilla_sdk}" - XPIDL_INCL="-I${real_mozilla_sdk}${mozilla_sdk_xpcom}/idl" - xpidl_path="${real_mozilla_sdk}${mozilla_sdk_xpcom}/bin" + MOZILLA_REQUIRED_HEADERS=1 + AC_CHECK_HEADERS(mozilla-config.h,,MOZILLA_REQUIRED_HEADERS=0) + AC_CHECK_HEADERS(npapi.h,,MOZILLA_REQUIRED_HEADERS=0) + AC_CHECK_HEADERS(npruntime.h,,MOZILLA_REQUIRED_HEADERS=0, + [#if HAVE_NPAPI_H + #include + #endif + ]) + if test "${MOZILLA_REQUIRED_HEADERS}" = "0" + then + AC_MSG_ERROR([Please install the Mozilla development tools, required headers were not found.]) + fi + MOZILLA_REQUIRED_HEADERS= + mozilla=: + VLC_ADD_CPPFLAGS([mozilla],[-DXPCOM_GLUE -DHAVE_CPP_MODERN_SPECIALIZE_TEMPLATE_SYNTAX -I${real_mozilla_sdk} -I${real_mozilla_sdk}/include -I${real_mozilla_sdk}/embedstring/include -I${real_mozilla_sdk}/xpcom/include -I${real_mozilla_sdk}/nspr/include -I${real_mozilla_sdk}/string/include -I${real_mozilla_sdk}/plugin/include -I${real_mozilla_sdk}/java/include]) + if ${need_xpcom_libs}; then + VLC_ADD_LDFLAGS([mozilla],[-L${real_mozilla_sdk}/embedstring/bin -L${real_mozilla_sdk}/xpcom/bin -L${real_mozilla_sdk}/nspr/bin -L${real_mozilla_sdk}/string/bin -L${real_mozilla_sdk}/lib -lnspr4 -lplds4 -lplc4 -lxpcomglue]) + if test "${SYS}" = "mingw32"; then + dnl latest gecko sdk does not have embedstring + if test -d "${real_mozilla_sdk}/embedstring/bin" + then + VLC_ADD_LDFLAGS([mozilla],[-lembedstring -Wl,--kill-at]) + fi + fi + fi + MOZILLA_SDK_PATH="${real_mozilla_sdk}" - if test -n "${CYGPATH}"; then - real_mozilla_sdk="`${CYGPATH} -w ${real_mozilla_sdk}`" - XPIDL_INCL="${XPIDL_INCL} -I\"${real_mozilla_sdk}${mozilla_sdk_xpcom}/idl\"" - fi ]) + if test -n "${CYGPATH}"; then + real_mozilla_sdk="`${CYGPATH} -w ${real_mozilla_sdk}`" + fi CPPFLAGS="${CPPFLAGS_save}" fi - - if test "${enable_mozilla}" != "false" - then - AC_PATH_PROG(XPIDL, xpidl, no, ${xpidl_path}:/usr/lib/mozilla:/usr/lib64/mozilla:/usr/lib/xulrunner:/usr/lib64/xulrunner) - if test "${XPIDL}" = "no"; then - AC_MSG_ERROR([Please install the Mozilla development tools, xpidl was not found.]) - fi - fi fi +AC_LANG_POP(C++) AM_CONDITIONAL(BUILD_MOZILLA,${mozilla}) dnl @@ -5503,8 +5551,6 @@ AC_SUBST(UIC) AC_SUBST(WINDRES) AC_SUBST(MOZILLA_SDK_PATH) AC_SUBST(WINE_SDK_PATH) -AC_SUBST(XPIDL) -AC_SUBST(XPIDL_INCL) AC_SUBST(LIBEXT) AC_SUBST(AM_CPPFLAGS) AC_SUBST(ALL_LINGUAS) @@ -5524,7 +5570,6 @@ AC_CONFIG_FILES([ activex/axvlc.inf bindings/Makefile bindings/java/Makefile - bindings/java/src/Makefile bindings/python/Makefile doc/Makefile intl/Makefile @@ -5625,7 +5670,7 @@ dnl Shortcut to nice compile message rm -f compile echo '#! /bin/sh' >compile -echo "PATH=$PATH LANG=C make \$* 2>&1| \\" >> compile +echo "PATH=$PATH LANG=C make \$@ 2>&1| \\" >> compile echo '`sed -ne "s/^top_srcdir *= *//p" < Makefile`/extras/make.pl' >> compile chmod a+x compile