diff --git a/aegisub/configure.in b/aegisub/configure.in index 11b8c6545..566db6165 100644 --- a/aegisub/configure.in +++ b/aegisub/configure.in @@ -16,12 +16,6 @@ m4_define([aegisub_version_data], [aegisub_version_major.aegisub_version_minor]) ################### # Required packages ################### -m4_define([libavcodec_required_version], [52.27.0]) # (r18642) -m4_define([libavformat_required_version], [52.32.0]) # (r18642) -m4_define([libavutil_required_version], [50.3.0]) # (r18642) -m4_define([libpostproc_required_version], [51.2.0]) # (r18642) -m4_define([libswscale_required_version], [0.7.1]) # (r18642) - m4_define([lua_auto3_required_version], [5.0]) m4_define([lua_auto4_required_version], [5.1]) m4_define([portaudio_required_version], [19]) @@ -102,7 +96,7 @@ if test "$build_darwin" = "yes"; then fi AC_SUBST(DARWIN_ARCH) - CXXFLAGS_OSX="-mmacosx-version-min=10.4" + CXXFLAGS_OSX="-mmacosx-version-min=10.5" case "$target_or_host" in # 10.4 @@ -217,7 +211,6 @@ AM_PROG_CC_C_O define([AC_LIBTOOL_LANG_F77_CONFIG], [:]) AC_PROG_LIBTOOL AC_PROG_INSTALL -AC_PROG_RANLIB PKG_PROG_PKG_CONFIG([pkgconfig_required_version]) @@ -242,7 +235,7 @@ else fi # This is required in order for the config file to work correctly. -AC_DEFINE_UNQUOTED([BUILD_SVN_REVISION], [$SVN_REVISION], [SVN Revision number, used for config.dat and verison.cpp]) +AC_DEFINE_UNQUOTED([BUILD_SVN_REVISION], [$SVN_REVISION], [SVN Revision number, used for config.dat and version.cpp]) # Release information. @@ -357,7 +350,7 @@ AC_CHECK_HEADER([wchar.h],,[AC_MSG_FAILURE([aegisub requires wide character supp ## OpenGL ######### AX_CHECK_GL -if test ! "$GL_LIBS"; then +if test "x$GL_LIBS" = "x"; then AC_MSG_FAILURE([aegisub requires GL support.]) fi AC_SUBST(GL_CFLAGS) @@ -469,30 +462,40 @@ AC_SUBST(ICONV_CFLAGS) ####### ## ALSA ####### -AC_ARG_WITH(alsa, [ --without-alsa build without ALSA audio provider. (default: auto)], alsa_disabled="(disabled)") +AC_ARG_WITH(alsa, [ --without-alsa build without ALSA audio provider. (default: auto)],[],[with_alsa="auto";alsa_disabled="(autodetected)"]) AC_ARG_VAR([ALSA_CFLAGS], [CFLAGS to use for ALSA (default: CPPFLAGS)]) AC_ARG_VAR([ALSA_LIBS], [LIBS to use for ALSA (default: -lasound -lrt)]) -if test -z "$ALSA_LIBS"; then - ALSA_LIBS="-lasound -lrt"; -fi +AS_IF([test "x$with_alsa" != "xno"],[ + if test -z "$ALSA_LIBS"; then + ALSA_LIBS="-lasound -lrt"; + fi -if test -z "$ALSA_CFLAGS"; then - ALSA_CFLAGS="$CPPFLAGS"; # I don't get this. Why CPPFLAGS? I would understand CFLAGS and even CXXFLAGS, but why CPPFLAGS? -Fluff -fi + if test -z "$ALSA_CFLAGS"; then + ALSA_CFLAGS="$CPPFLAGS"; # I don't get this. Why CPPFLAGS? I would understand CFLAGS and even CXXFLAGS, but why CPPFLAGS? -Fluff + fi -if test "$with_alsa" != "no"; then aegisub_save_LIBS="$LDFLAGS" LIBS="$ALSA_LIBS" - AC_CHECK_LIB([asound], [snd_pcm_open], [ALSA_LIBS="-lasound -lrt"; with_alsa="yes"], [with_alsa="no"]) + AC_CHECK_LIB([asound], [snd_pcm_open], [ + ALSA_LIBS="-lasound -lrt" + with_alsa="yes" + ], [ + AS_IF([test "x$with_alsa" != "xauto"],[ + AC_MSG_FAILURE([ALSA was specified as required, but was not detected.]) + ],[]) + with_alsa="no" + ]) LIBS="$aegisub_save_LIBS" -fi +],[ + alsa_disabled="(disabled)" +]) -if test "$with_alsa" != "no"; then +AS_IF([test "x$with_alsa" = "xyes"],[ AC_DEFINE(WITH_ALSA, 1, [Enable ALSA Support]) found_audio_player="yes" -fi +],[]) AM_CONDITIONAL([HAVE_ALSA], [test "$with_alsa" != "no"]) AC_SUBST(ALSA_LIBS) @@ -503,30 +506,25 @@ AC_SUBST(ALSA_LIBS) ############ AC_ARG_WITH(portaudio,[ --without-portaudio build without PortAudio v19 audio provider. - (default: auto)], portaudio_disabled="(disabled)") -if test "$with_portaudio" != "no"; then - PKG_CHECK_MODULES(PORTAUDIO, portaudio-2.0 >= portaudio_required_version, [with_portaudio="yes"], [with_portaudio="no"]) -fi + (default: auto)],[],[with_portaudio="auto";portaudio_disabled="(autodetected)"]) -if test "$with_portaudio" != "no"; then - AC_AGI_COMPILE([PortAudio], [portaudio], [$PORTAUDIO_CFLAGS], [$PORTAUDIO_LIBS],[ -#include -int main(void) { - PaError err = Pa_Initialize(); - if (err != paNoError) return 1; - return 0; -} ]) -fi +AS_IF([test "x$with_portaudio" != "xno"],[ + PKG_CHECK_MODULES(PORTAUDIO, portaudio-2.0 >= portaudio_required_version, [ + with_portaudio="yes" + ], [ + AS_IF([test "x$with_portaudio" != "xauto"],[ + AC_MSG_FAILURE([PortAudio was specified as required, but was not detected.]) + ],[]) + with_portaudio="no" + ]) +],[ + portaudio_disabled="(disabled)" +]) -if test "$agi_cv_with_portaudio" = "no" && test "$with_portaudio" = "yes"; then - AC_MSG_WARN([PortAudio detected, but it doesn't work...]) - with_portaudio="no" -fi - -if test "$agi_cv_with_portaudio" = "yes" && test "$with_portaudio" = "yes"; then +AS_IF([test "$with_portaudio" = "yes"],[ AC_DEFINE(WITH_PORTAUDIO, 1, [Enable PortAudio v19 support]) found_audio_player="yes" -fi +],[]) AM_CONDITIONAL([HAVE_PORTAUDIO], [test "$with_portaudio" != "no"]) @@ -536,30 +534,25 @@ AM_CONDITIONAL([HAVE_PORTAUDIO], [test "$with_portaudio" != "no"]) ############# AC_ARG_WITH(pulseaudio,[ --with-pulseaudio build with PulseAudio audio provider. - (default: auto)], [pulseaudio_disabled="(disabled)"]) -if test "$with_pulseaudio" != "no"; then - PKG_CHECK_MODULES(LIBPULSE, libpulse >= pulseaudio_required_version, [with_pulseaudio="yes"], [with_pulseaudio="no"]) -fi + (default: auto)],[],[with_pulseaudio="auto";pulseaudio_disabled="(autodetected)"]) -if test "$with_pulseaudio" != "no"; then - AC_AGI_COMPILE([PulseAudio], [pulseaudio], [$LIBPULSE_CFLAGS], [$LIBPULSE_LIBS],[ -#include -int main(void) { -pa_threaded_mainloop *mainloop = pa_threaded_mainloop_new(); -if (!mainloop) return 1; -return 0; -} ]) -fi +AS_IF([test "x$with_pulseaudio" != "xno"],[ + PKG_CHECK_MODULES(LIBPULSE, libpulse >= pulseaudio_required_version, [ + with_pulseaudio="yes" + ], [ + AS_IF([test "x$with_pulseaudio" != "xauto"],[ + AC_MSG_FAILURE([PulseAudio was specified as required, but was not detected.]) + ],[]) + with_pulseaudio="no" + ]) +],[ + pulseaudio_disabled="(disabled)" +]) -if test "$agi_cv_with_pulseaudio" = "no" && test "$with_pulseaudio" = "yes"; then - AC_MSG_WARN([PulseAudio detected, but it doesn't work...]) - with_pulseaudio="no" -fi - -if test "$agi_cv_with_pulseaudio" = "yes" && test "$with_pulseaudio" = "yes"; then +AS_IF([test "x$with_pulseaudio" = "xyes"],[ AC_DEFINE(WITH_PULSEAUDIO, 1, [Enable PulseAudio support]) found_audio_player="yes" -fi +],[]) AM_CONDITIONAL([HAVE_PULSEAUDIO], [test "$with_pulseaudio" != "no"]) @@ -568,38 +561,25 @@ AM_CONDITIONAL([HAVE_PULSEAUDIO], [test "$with_pulseaudio" != "no"]) ## OpenAL ######### AC_ARG_WITH(openal,[ --without-openal build without OpenAL audio provider. - (default: auto)], openal_disabled="(disabled)") -if test "$with_openal" != "no"; then - PKG_CHECK_MODULES(OPENAL, openal >= 0.0.8, [with_openal=yes], [with_openal=no]) -fi + (default: auto)],[],[with_openal="auto";openal_disabled="(autodetected)"]) -if test "$with_openal" != "no"; then - AC_AGI_COMPILE([OpenAL], [openal], [$OPENAL_CFLAGS], [$OPENAL_LIBS],[ -#if defined(__APPLE__) -#include -#include -#else -#include -#include -#endif -int main(void) { - ALCdevice *device = alcOpenDevice(0); - if (!device) return 1; - ALCcontext *context = alcCreateContext(device, 0); - if (!context) return 1; - return 0; -} ]) -fi +AS_IF([test "x$with_openal" != "xno"],[ + PKG_CHECK_MODULES(OPENAL, openal >= 0.0.8, [ + with_openal=yes + ], [ + AS_IF([test "x$with_openal" != "xauto"],[ + AC_MSG_FAILURE([OpenAL was specified as required, but was not detected.]) + ],[]) + with_openal=no + ]) +],[ + openal_disabled="(disabled)" +]) -if test "$agi_cv_with_openal" = "no" && test "$with_openal" = "yes"; then - AC_MSG_WARN([OpenAL detected, but it doesn't work...]) - with_openal="no" -fi - -if test "$agi_cv_with_openal" = "yes" && test "$with_openal" = "yes"; then - found_audio_player="yes" +AS_IF([test "x$with_openal" = "xyes"],[ AC_DEFINE(WITH_OPENAL, 1, [Enable OpenAL support]) -fi + found_audio_player="yes" +],[]) AM_CONDITIONAL([HAVE_OPENAL], [test "$with_openal" != "no"]) @@ -608,20 +588,29 @@ AM_CONDITIONAL([HAVE_OPENAL], [test "$with_openal" != "no"]) ## OSS ###### AC_ARG_WITH(oss,[ --without-oss build without OSS audio provider. - (default: auto)], oss_disabled="(disabled)") -if test "$with_oss" != "no"; then - if test -f "/etc/oss.conf"; then + (default: auto)],[],[with_oss="auto";oss_disabled="(autodetected)"]) + +AS_IF([test "x$with_oss" != "xno"],[ + AS_IF([test -f "/etc/oss.conf"],[ . /etc/oss.conf CPPFLAGS="$CPPFLAGS -I${OSSLIBDIR}/include/sys" - fi - AC_CHECK_HEADERS([soundcard.h sys/soundcard.h], [with_oss="yes"], [with_oss="no"]) - # XXX: maybe check if OSS works -fi + ],[]) + AC_CHECK_HEADERS([soundcard.h sys/soundcard.h], [ + with_oss="yes" + ], [ + AS_IF([test "x$with_oss" != "xauto"],[ + AC_MSG_FAILURE([OSS support was specified as required, but was not detected.]) + ],[]) + with_oss="no" + ]) +],[ + oss_disabled="(disabled)" +]) -if test "$with_oss" != "no"; then - found_audio_player="yes" +AS_IF([test "x$with_oss" != "xno"],[ AC_DEFINE(WITH_OSS, 1, [Enable OSS support]) -fi + found_audio_player="yes" +],[]) AM_CONDITIONAL([HAVE_OSS], [test "$with_oss" != "no"]) @@ -631,18 +620,29 @@ AM_CONDITIONAL([HAVE_OSS], [test "$with_oss" != "no"]) ######################### -AC_ARG_WITH(provider-ffms,[ --without-ffms disable FFmpegSource support (default: auto)],ffms_provider_disabled="(disabled)") +AC_ARG_WITH(ffms,[ --without-ffms disable FFmpegSource support (default: auto)],[],[with_ffms="auto";ffms_provider_disabled="(autodetected)"]) -if test "$with_provider_ffms" != "no"; then - PKG_CHECK_MODULES(FFMS, ffms2 >= ffms_required_version, [with_provider_ffms="yes"], [with_provider_ffms="no"]) -fi +AS_IF([test "x$with_ffms" != "xno"],[ + PKG_CHECK_MODULES(FFMS, ffms2 >= ffms_required_version, [ + with_ffms="yes" + ], [ + AS_IF([test "x$with_ffms" != "xauto"],[ + AC_MSG_FAILURE([FFmpegSource was specified as required, but was not detected.]) + ],[]) + with_ffms="no" + ]) +],[ + ffms_provider_disabled="(disabled)" +]) -if test "$with_provider_ffms" = "yes"; then +AS_IF([test "x$with_ffms" = "xyes"],[ AC_DEFINE(WITH_FFMPEGSOURCE, 1, [Enable FFmpegSource2 video provider]) found_video_provider="yes" -fi +],[ + with_ffms="no" +]) -AM_CONDITIONAL([HAVE_PROVIDER_FFMPEGSOURCE], [test "$with_provider_ffms" = "yes"]) +AM_CONDITIONAL([HAVE_PROVIDER_FFMPEGSOURCE], [test "$with_ffms" = "yes"]) AC_SUBST(FFMS_CFLAGS) @@ -651,17 +651,26 @@ AC_SUBST(FFMS_CFLAGS) # Subtitle Provider ################### -AC_ARG_ENABLE(libass, [ --without-libass disable libass support (default=enabled)],libass_disabled="(disabled)") +AC_ARG_WITH(libass, [ --without-libass disable libass support (default=auto)],[],[with_libass="auto";libass_disabled="(autodetected)"]) -if test "$enable_libass" != "no"; then - PKG_CHECK_MODULES(LIBASS, libass >= libass_required_version, [with_libass="yes"], [with_libass="no"]) -fi +AS_IF([test "x$with_libass" != "xno"],[ + PKG_CHECK_MODULES(LIBASS, libass >= libass_required_version, [ + with_libass="yes" + ], [ + AS_IF([test "x$with_libass" != "xauto"],[ + AC_MSG_FAILURE([libass was specified as required, but was not detected.]) + ],[]) + with_libass="no" + ]) +],[ + libass_disabled="(disabled)" +]) -if test "$with_libass" = "yes" || test "$enable_libass" != "no"; then +AS_IF([test "x$with_libass" = "xyes"],[ AC_DEFINE(WITH_LIBASS, 1, [Enable libass Subtitle Provider]) -else +],[ with_libass="no" -fi +]) AM_CONDITIONAL([WITH_LIBASS], [test "$with_libass" = "yes"]) AC_SUBST(LIBASS_LIBS) @@ -672,28 +681,24 @@ AC_SUBST(LIBASS_CFLAGS) ########### ## Hunspell ########### -AC_ARG_WITH(hunspell, [ --without-hunspell build without hunspell support (default: auto)], hunspell_disabled="(disabled)") +AC_ARG_WITH(hunspell, [ --without-hunspell build without hunspell support (default: auto)],[],[with_hunspell="auto";hunspell_disabled="(autodetected)"]) -if test "$with_hunspell" != "no"; then - PKG_CHECK_MODULES(HUNSPELL, hunspell >= 1.2.0, [with_hunspell="yes"], [with_hunspell="no"]) - AC_AGI_COMPILE([Hunspell], [hunspell], [$HUNSPELL_CFLAGS], [$HUNSPELL_LIBS],[ -#include -int main(void) { - Hunspell *hunspell; - hunspell = new Hunspell(".", "."); - if (!hunspell) return 1; - return 0; -} ]) -fi +AS_IF([test "x$with_hunspell" != "xno"],[ + PKG_CHECK_MODULES(HUNSPELL, hunspell >= 1.2.0, [ + with_hunspell="yes" + ], [ + AS_IF([test "x$with_hunspell" != "xauto"],[ + AC_MSG_FAILURE([hunspell was specified as required, but was not detected.]) + ],[]) + with_hunspell="no" + ]) +],[ + hunspell_disabled="(disabled)" +]) -if test "$agi_cv_with_hunspell" = "no" && test "$with_hunspell" = "yes"; then - AC_MSG_WARN([Hunspell detected, but it doesn't work...]) - with_hunspell="no" -fi - -if test "$agi_cv_with_hunspell" = "yes" && test "$with_hunspell" = "yes"; then +AS_IF([test "x$with_hunspell" = "xyes"],[ AC_DEFINE(WITH_HUNSPELL, 1, [Enable Hunspell support.]) -fi +],[]) AM_CONDITIONAL([HAVE_HUNSPELL], [test "$with_hunspell" != "no"]) @@ -702,12 +707,13 @@ AM_CONDITIONAL([HAVE_HUNSPELL], [test "$with_hunspell" != "no"]) ###################### ## universalchardetect ###################### -AC_ARG_ENABLE(univchardet, [ --disable-univchardet disble universalchardet support.], univchardet_disabled="(disabled)") +AC_ARG_ENABLE(univchardet, [ --disable-univchardet disble universalchardet support.],[],[univchardet_disabled="(default)"]) if test "$enable_univchardet" != "no"; then with_univchardet="yes" AC_DEFINE(WITH_UNIVCHARDET, 1, [Enable universalchardet support]) else with_univchardet="no" + univchardet_disabled="(disabled)" fi AM_CONDITIONAL([HAVE_UNIVCHARDET], [test "$with_univchardet" != "no"]) @@ -723,23 +729,23 @@ AM_CONDITIONAL([HAVE_UNIVCHARDET], [test "$with_univchardet" != "no"]) ############ AC_ARG_WITH(lua, -[ --without-lua build without lua 5.1 (auto4)], [lua51_disabled="(disabled)"]) +[ --without-lua build without lua 5.1 (auto4)],[],[with_lua="auto";lua51_disabled="(autodetected)"]) AC_ARG_VAR([LUA_CFLAGS], [CFLAGS to use for LUA 5.1 (default: autodetect)]) AC_ARG_VAR([LUA_LDFLAGS], [LDFLAGS to use for LUA 5.1 (default: autodetect)]) AC_ARG_VAR([LUA_LIBDIR], [Location of LUA 5.1 library. (default: none)]) -if test -z "$LUA_CFLAGS"; then - AGI_FIND_HEADER([LUA], [lua.hpp], [/usr/include/lua5.1 /usr/include/lua51 /usr/local/include/lua51 /usr/local/include/lua5.1 /usr/include /usr/local/include]) -fi +AS_IF([test "x$with_lua" != "xno"],[ + if test -z "$LUA_CFLAGS"; then + AGI_FIND_HEADER([LUA], [lua.hpp], [/usr/include/lua5.1 /usr/include/lua51 /usr/local/include/lua51 /usr/local/include/lua5.1 /usr/include /usr/local/include]) + fi -if test -z "$LUA_LDFLAGS"; then - AGI_FIND_LIB([LUA], [lua51 lua-5.1 lua5.1 lua], [$LUA_LIBDIR]) -fi + if test -z "$LUA_LDFLAGS"; then + AGI_FIND_LIB([LUA], [lua51 lua-5.1 lua5.1 lua], [$LUA_LIBDIR]) + fi -aegisub_save_LIBS="$LIBS" -LIBS="$LUA_LDFLAGS" -if test "$with_lua" != no; then + aegisub_save_LIBS="$LIBS" + LIBS="$LUA_LDFLAGS" AC_AGI_COMPILE([Lua 5.1 (auto4)], [lua], [$LUA_CFLAGS], [$LUA_LDFLAGS],[ #include @@ -750,16 +756,21 @@ int main () { lua_close(L); return !res; }]) -fi -LIBS="$aegisub_save_LIBS" + LIBS="$aegisub_save_LIBS" -if test "$agi_cv_with_lua" = "yes"; then - with_auto4="yes" - with_automation="yes" - AC_DEFINE(WITH_AUTO4_LUA, 1, [Enable Automation (auto4), requires lua]) -else - with_auto4="no" -fi + AS_IF([test "x$agi_cv_with_lua" = "xyes"],[ + with_auto4="yes" + with_automation="yes" + AC_DEFINE(WITH_AUTO4_LUA, 1, [Enable Automation (auto4), requires Lua 5.1]) + ],[ + AS_IF([test "x$with_lua" != "xauto"],[ + AC_MSG_FAILURE([Lua 5.1 support was specified as required, but was not detected.]) + ],[]) + with_auto4="no" + ]) +],[ + lua51_disabled="(disabled)" +]) AM_CONDITIONAL([HAVE_AUTO4_LUA], [test "$with_auto4" != "no"]) AC_SUBST(LUA_CFLAGS) @@ -771,22 +782,22 @@ AC_SUBST(LUA_LDFLAGS) ################## AC_ARG_WITH(lua50, -[ --without-lua50 build without lua 5.0 (auto3)], [lua50_disabled="(disabled)"]) +[ --without-lua50 build without lua 5.0 (auto3)],[],[with_lua50="auto";lua50_disabled="(autodetected)"]) AC_ARG_VAR([LUA50_CFLAGS], [CFLAGS to use for LUA 5.1 (default: autodetect)]) AC_ARG_VAR([LUA50_LDFLAGS], [LDFLAGS to use for LUA 5.1 (default: autodetect)]) AC_ARG_VAR([LUA50_LIBDIR], [Location of LUA 5.1 library. (default: none)]) -if test -z "$LUA50_CFLAGS"; then - AGI_FIND_HEADER([LUA50], [lua.h], [/usr/include/lua5.0 /usr/include/lua50 /usr/local/include/lua50 /usr/local/include/lua5.0 /usr/include /usr/local/include]) -fi +AS_IF([test "x$with_lua50" != "xno"],[ + if test -z "$LUA50_CFLAGS"; then + AGI_FIND_HEADER([LUA50], [lua.h], [/usr/include/lua5.0 /usr/include/lua50 /usr/local/include/lua50 /usr/local/include/lua5.0 /usr/include /usr/local/include]) + fi -if test -z "$LUA50_LDFLAGS"; then - AGI_FIND_LIB([LUA50], [lua50 lua-5.0 lua5.0 lua], [$LUA50_LIBDIR]) - AGI_FIND_LIB([LUALIB50], [lualib50 lualib-5.0 lualib5.0 lualib], [$LUA50_LIBDIR], [$LUA50_LDFLAGS]) -fi + if test -z "$LUA50_LDFLAGS"; then + AGI_FIND_LIB([LUA50], [lua50 lua-5.0 lua5.0 lua], [$LUA50_LIBDIR]) + AGI_FIND_LIB([LUALIB50], [lualib50 lualib-5.0 lualib5.0 lualib], [$LUA50_LIBDIR], [$LUA50_LDFLAGS]) + fi -if test "$with_lua50" != no; then AC_AGI_COMPILE([Lua 5.0 (auto3)], [lua50], [$LUA50_CFLAGS], [$LUA50_LDFLAGS $LUALIB50_LDFLAGS],[ extern "C" { #include "lua.h" @@ -801,15 +812,20 @@ int main() { luaL_newmetatable(L, "test"); lua_close(L); }]) -fi -if test "$agi_cv_with_lua50" = "yes"; then - with_auto3="yes" - with_automation="yes" - AC_DEFINE(WITH_AUTO3, 1, [Enable Automation (auto3, DEPRECIATED!), requires lua 5.0]) -else - with_auto3="no" -fi + AS_IF([test "x$agi_cv_with_lua50" = "xyes"],[ + with_auto3="yes" + with_automation="yes" + AC_DEFINE(WITH_AUTO3, 1, [Enable Automation (auto3, DEPRECIATED!), requires lua 5.0]) + ],[ + AS_IF([test "x$with_lua50" != "xauto"],[ + AC_MSG_FAILURE([Lua 5.0 support was specified as required, but was not detected.]) + ],[]) + with_auto3="no" + ]) +],[ + lua50_disabled="(disabled)" +]) AM_CONDITIONAL([HAVE_AUTO3_LUA], [test "$with_auto3" != "no"]) AC_SUBST(LUA50_CFLAGS) @@ -821,7 +837,7 @@ AC_SUBST(LUALIB50_LDFLAGS) ############# ## Auto4 PERL ############# -AC_ARG_WITH(perl, [ --with-perl build with PERL Automation. (default: no)], perl_disabled="(disabled)") +AC_ARG_WITH(perl, [ --with-perl build with PERL Automation. (default: no)],[],[with_perl="auto";perl_disabled="(default)"]) AC_ARG_WITH(perl-bin, [ --with-perl-bin=PATH location of PERL binary. (default: $PATH)], [WITH_PERL_BIN="$withval"]) AC_ARG_VAR([PERL_CFLAGS], [CFLAGS to use for Perl (default: -MExtUtils::Embed -eccflags -eperl_inc)]) @@ -864,11 +880,12 @@ int main(int argc, char **argv, char **env) { }]) fi fi +elif test "x$with_perl" = "xno"; then + perl_disabled="(disabled)" fi if test "$agi_cv_with_perl" = "no" && test "$with_cv_perl" = "yes"; then - AC_MSG_WARN([Perl detected, but it doesn't work...]) - with_cv_perl="no" + AC_MSG_FAILURE([Perl detected, but it doesn't work...]) fi if test "$agi_cv_with_perl" = "yes" && test "$with_cv_perl" = "yes"; then @@ -878,7 +895,7 @@ else with_cv_perl="no" fi -AM_CONDITIONAL([HAVE_AUTO4_PERL], [test "$with_cv_perl" != "no"]) +AM_CONDITIONAL([HAVE_AUTO4_PERL], [test "$with_cv_perl" = "yes"]) AC_SUBST(PERL_CFLAGS) AC_SUBST(PERL_LDFLAGS) @@ -893,7 +910,7 @@ fi ############# ## Auto4 Ruby ############# -AC_ARG_WITH(ruby, [ --with-ruby build with Ruby Automation. (default: no)], ruby_disabled="(disabled)") +AC_ARG_WITH(ruby, [ --with-ruby build with Ruby Automation. (default: no)],[],[with_ruby="auto";ruby_disabled="(default)"]) AC_ARG_WITH(ruby-bin, [ --with-ruby-bin=PATH location of RUBY binary. (default: $PATH)], [WITH_RUBY_BIN="$withval"]) AC_ARG_VAR([RUBY_CFLAGS], [CFLAGS to use for Ruby (default: Config::CONFIG archdir + CFLAGS)]) @@ -936,10 +953,12 @@ int main(void) { }]) fi fi +elif test "x$with_ruby" = "xno"; then + ruby_disabled="(disabled)" fi if test "$agi_cv_with_ruby" = "no" && test "$with_cv_ruby" = "yes"; then - AC_MSG_WARN([Ruby detected, but it doesn't work...]) + AC_MSG_FAILURE([Ruby detected, but it doesn't work...]) with_cv_ruby="no" fi @@ -1013,8 +1032,9 @@ fi ############################ AC_MSG_CHECKING([whether to use precompiled headers]) -AC_ARG_ENABLE(gcc-prec, [ --enable-gcc-prec enable GCC precompiled headers (default=no)]) -if test "$enable_gcc_prec" = "yes"; then +AC_ARG_ENABLE(gcc-prec, [ --enable-gcc-prec enable GCC precompiled headers (default=auto)],[],[enable_gcc_prec="auto"]) +if test "x$enable_gcc_prec" != "no"; then + enable_gcc_prec="yes" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) @@ -1196,7 +1216,7 @@ AC_ARG_WITH(player-audio, [ --with-player-audio=(alsa|openal|portaudio|pulseaud if ! test -z "$with_provider_video"; then default_provider_video="$with_provider_video" else - if test "$with_provider_ffms" = "yes"; then + if test "$with_ffms" = "yes"; then default_provider_video="ffmpegsource" fi fi @@ -1206,7 +1226,7 @@ AC_DEFINE_UNQUOTED([DEFAULT_PROVIDER_VIDEO], ["$default_provider_video"], [Defau if ! test -z "$with_provider_audio"; then default_provider_audio="$with_provider_audio" else - if test "$with_provider_ffms" = "yes"; then + if test "$with_ffms" = "yes"; then default_provider_audio="ffmpegsource" fi fi @@ -1353,12 +1373,12 @@ Audio Players PulseAudio: $with_pulseaudio $pulseaudio_disabled A/V Providers - FFmpegSource: $with_provider_ffms $ffms_provider_disabled + FFmpegSource: $with_ffms $ffms_provider_disabled Subtitle Providers: libASS $with_libass $libass_disabled $libass_default Misc Packages - Hunspell: $with_hunspell $with_hunspell_version $hunspell_disabled + Hunspell: $with_hunspell $hunspell_disabled universalchardet: $with_univchardet $univchardet_disabled ]);