Move *all* AC_SUBST* out of any conditional blocks, also set them below

AM_CONDITIONAL where applicable.

Originally committed to SVN as r2747.
This commit is contained in:
Amar Takhar 2009-02-22 22:04:21 +00:00
parent bf730cf96e
commit 6218649912
1 changed files with 19 additions and 19 deletions

View File

@ -400,11 +400,11 @@ fi
if test "$with_alsa" != "no"; then if test "$with_alsa" != "no"; then
AC_DEFINE(WITH_ALSA, 1, [Enable ALSA Support]) AC_DEFINE(WITH_ALSA, 1, [Enable ALSA Support])
AC_SUBST(ALSA_LDFLAGS)
found_audio="yes" found_audio="yes"
fi fi
AM_CONDITIONAL([HAVE_ALSA], [test "$with_alsa" != "no"]) AM_CONDITIONAL([HAVE_ALSA], [test "$with_alsa" != "no"])
AC_SUBST(ALSA_LDFLAGS)
############ ############
@ -452,12 +452,12 @@ fi
if test "$with_portaudio" = "yes" && test "$agi_cv_with_portaudio" = "yes"; then if test "$with_portaudio" = "yes" && test "$agi_cv_with_portaudio" = "yes"; then
found_audio="yes" found_audio="yes"
AC_SUBST(PORTAUDIO_LDFLAGS)
AC_SUBST(PORTAUDIO_CFLAGS)
AC_DEFINE(WITH_PORTAUDIO, 1, [Enable PortAudio Audio Provider]) AC_DEFINE(WITH_PORTAUDIO, 1, [Enable PortAudio Audio Provider])
fi fi
AM_CONDITIONAL([HAVE_PORTAUDIO], [test "$with_portaudio" != "no"]) AM_CONDITIONAL([HAVE_PORTAUDIO], [test "$with_portaudio" != "no"])
AC_SUBST(PORTAUDIO_LDFLAGS)
AC_SUBST(PORTAUDIO_CFLAGS)
############# #############
@ -599,14 +599,6 @@ if test "$agi_cv_with_ffmpeg" = "no" && test "$with_ffmpeg" != "no"; then
fi fi
if test "$agi_cv_with_ffmpeg" = "yes" && test "$with_ffmpeg" != "no"; then if test "$agi_cv_with_ffmpeg" = "yes" && test "$with_ffmpeg" != "no"; then
AC_SUBST(LIBAVFORMAT_LIBS)
AC_SUBST(LIBAVFORMAT_CFLAGS)
AC_SUBST(LIBAVCODEC_LIBS)
AC_SUBST(LIBAVCODEC_CFLAGS)
AC_SUBST(LIBSWSCALE_LIBS)
AC_SUBST(LIBSWSCALE_CFLAGS)
AC_SUBST(LIBAVUTIL_LIBS)
AC_SUBST(LIBAVUTIL_CFLAGS)
with_ffmpeg="yes" with_ffmpeg="yes"
fi fi
@ -617,6 +609,14 @@ if test "$agi_cv_with_ffmpeg" = "no" || test "$with_ffmpeg" = "no"; then
fi fi
AM_CONDITIONAL([HAVE_FFMPEG], [test "$agi_cv_with_ffmpeg" = "yes"]) AM_CONDITIONAL([HAVE_FFMPEG], [test "$agi_cv_with_ffmpeg" = "yes"])
AC_SUBST(LIBAVFORMAT_LIBS)
AC_SUBST(LIBAVFORMAT_CFLAGS)
AC_SUBST(LIBAVCODEC_LIBS)
AC_SUBST(LIBAVCODEC_CFLAGS)
AC_SUBST(LIBSWSCALE_LIBS)
AC_SUBST(LIBSWSCALE_CFLAGS)
AC_SUBST(LIBAVUTIL_LIBS)
AC_SUBST(LIBAVUTIL_CFLAGS)
AC_ARG_WITH(provider-ffmpeg, [ --without-provider-ffmpeg AC_ARG_WITH(provider-ffmpeg, [ --without-provider-ffmpeg
build without FFMPEG A/V provider. (default: auto)], ffmpeg_provider_disabled="(disabled)", with_provider_ffmpeg="yes") build without FFMPEG A/V provider. (default: auto)], ffmpeg_provider_disabled="(disabled)", with_provider_ffmpeg="yes")
@ -661,9 +661,9 @@ else
with_provider_ffmpegsource="no" with_provider_ffmpegsource="no"
fi fi
AM_CONDITIONAL([HAVE_PROVIDER_FFMPEGSOURCE], [test "$with_provider_ffmpegsource" = "yes"])
AC_SUBST(LIBPOSTPROC_LIBS) AC_SUBST(LIBPOSTPROC_LIBS)
AC_SUBST(LIBPOSTPROC_CFLAGS) AC_SUBST(LIBPOSTPROC_CFLAGS)
AM_CONDITIONAL([HAVE_PROVIDER_FFMPEGSOURCE], [test "$with_provider_ffmpegsource" = "yes"])
@ -690,9 +690,9 @@ else
with_libass="no" with_libass="no"
fi fi
AM_CONDITIONAL([WITH_LIBASS], [test "$with_libass" = "yes"])
AC_SUBST(LIBASS_LIBS) AC_SUBST(LIBASS_LIBS)
AC_SUBST(LIBASS_CFLAGS) AC_SUBST(LIBASS_CFLAGS)
AM_CONDITIONAL([WITH_LIBASS], [test "$with_libass" = "yes"])
@ -905,14 +905,14 @@ fi
if test "$agi_cv_with_perl" = "yes" && test "$with_cv_perl" = "yes"; then if test "$agi_cv_with_perl" = "yes" && test "$with_cv_perl" = "yes"; then
with_automation="yes" with_automation="yes"
AC_SUBST(PERL_CFLAGS)
AC_SUBST(PERL_LDFLAGS)
AC_DEFINE(WITH_PERL, 1, [Enable PERL support.]) AC_DEFINE(WITH_PERL, 1, [Enable PERL support.])
else else
with_cv_perl="no" with_cv_perl="no"
fi fi
AM_CONDITIONAL([HAVE_AUTO4_PERL], [test "$with_cv_perl" != "no"]) AM_CONDITIONAL([HAVE_AUTO4_PERL], [test "$with_cv_perl" != "no"])
AC_SUBST(PERL_CFLAGS)
AC_SUBST(PERL_LDFLAGS)
AC_ARG_ENABLE(perl-console, [ --disable-perl-console disable PERL console (default=enabled)],perlconsole_disabled="(disabled)") AC_ARG_ENABLE(perl-console, [ --disable-perl-console disable PERL console (default=enabled)],perlconsole_disabled="(disabled)")
@ -977,14 +977,14 @@ fi
if test "$agi_cv_with_ruby" = "yes" && test "$with_cv_ruby" = "yes"; then if test "$agi_cv_with_ruby" = "yes" && test "$with_cv_ruby" = "yes"; then
with_automation="yes" with_automation="yes"
AC_SUBST(RUBY_CFLAGS)
AC_SUBST(RUBY_LDFLAGS)
AC_DEFINE(WITH_RUBY, 1, [Enable RUBY Automation.]) AC_DEFINE(WITH_RUBY, 1, [Enable RUBY Automation.])
else else
with_cv_ruby="no" with_cv_ruby="no"
fi fi
AM_CONDITIONAL([HAVE_AUTO4_RUBY], [test "$with_cv_ruby" != "no"]) AM_CONDITIONAL([HAVE_AUTO4_RUBY], [test "$with_cv_ruby" != "no"])
AC_SUBST(RUBY_CFLAGS)
AC_SUBST(RUBY_LDFLAGS)
# Automation setup # Automation setup
@ -1057,7 +1057,6 @@ if test "$enable_debug" = "yes"; then
AC_MSG_RESULT([yes ($DEBUG_FLAGS)]) AC_MSG_RESULT([yes ($DEBUG_FLAGS)])
CPPFLAGS="$DEBUG_FLAGS $CPPFLAGS" CPPFLAGS="$DEBUG_FLAGS $CPPFLAGS"
msg_debug="($DEBUG_FLAGS)" msg_debug="($DEBUG_FLAGS)"
AC_SUBST(DEBUG_FLAGS)
# This turns on some internal (to aegisub) debugging features. # This turns on some internal (to aegisub) debugging features.
# A debug version of wxWidgets is required. # A debug version of wxWidgets is required.
@ -1068,11 +1067,12 @@ else
enable_debug="no" enable_debug="no"
AC_MSG_RESULT([no]) AC_MSG_RESULT([no])
fi fi
AC_SUBST(DEBUG_FLAGS)
if test "$enable_debug" = "yes"; then if test "$enable_debug" = "yes"; then
PACKAGE_DEBUG="-debug" PACKAGE_DEBUG="-debug"
AC_SUBST(PACKAGE_DEBUG)
fi fi
AC_SUBST(PACKAGE_DEBUG)
########### ###########