forked from mia/Aegisub
* Split HAVE_FFMPEG into HAVE_FFMPEG / HAVE_PROVIDER_FFMPEG
* s/HAVE_FFMPEGSOURCE/HAVE_PROVIDER_FFMPEGSOURCE/ * Add FFMPEG_CFLAGS / FFMPEG_LDFLAGS as configure env vars for FFMPEG detection. Originally committed to SVN as r2664.
This commit is contained in:
parent
90062363f3
commit
d5f5e66e33
3 changed files with 22 additions and 10 deletions
|
@ -13,7 +13,7 @@ if WITH_LIBASS
|
|||
libass = libass
|
||||
endif
|
||||
|
||||
if HAVE_FFMPEGSOURCE
|
||||
if HAVE_PROVIDER_FFMPEGSOURCE
|
||||
ffmpegsource = FFmpegSource2
|
||||
endif
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ endif
|
|||
|
||||
SUBDIRS = bitmaps libresrc $(libosxutil_subdir)
|
||||
|
||||
AM_CXXFLAGS = -DAEGISUB -Iinclude @WX_CPPFLAGS@ @OPENMP_CXXFLAGS@
|
||||
AM_CXXFLAGS = -DAEGISUB -Iinclude @WX_CPPFLAGS@ @OPENMP_CXXFLAGS@ @FFMPEG_CFLAGS@
|
||||
|
||||
bin_PROGRAMS = aegisub-2.1
|
||||
aegisub_2_1_LDADD = libresrc/libresrc.a $(libosxutil_lib)
|
||||
|
@ -53,16 +53,19 @@ aegisub_2_1_LDADD += libaudio_openal.a
|
|||
endif
|
||||
|
||||
if HAVE_FFMPEG
|
||||
aegisub_2_1_LDFLAGS += @AVFORMAT_LDFLAGS@ @AVCODEC_LDFLAGS@ @SWSCALE_LDFLAGS@ @FFMPEG_LDFLAGS@
|
||||
endif
|
||||
|
||||
if HAVE_PROVIDER_FFMPEG
|
||||
noinst_LIBRARIES += libaudiovideo_ffmpeg.a
|
||||
libaudiovideo_ffmpeg_a_SOURCES = audio_provider_lavc.cpp lavc_file.cpp video_provider_lavc.cpp lavc_keyframes.cpp
|
||||
aegisub_2_1_LDFLAGS += @AVFORMAT_LDFLAGS@ @AVCODEC_LDFLAGS@ @SWSCALE_LDFLAGS@
|
||||
aegisub_2_1_LDFLAGS += @POSTPROC_LDFLAGS@
|
||||
aegisub_2_1_LDADD += libaudiovideo_ffmpeg.a
|
||||
endif
|
||||
|
||||
if HAVE_FFMPEGSOURCE
|
||||
if HAVE_PROVIDER_FFMPEGSOURCE
|
||||
noinst_LIBRARIES += libaudiovideo_ffmpegsource.a
|
||||
libaudiovideo_ffmpegsource_a_SOURCES = audio_provider_ffmpegsource.cpp video_provider_ffmpegsource.cpp ffmpegsource_common.cpp
|
||||
aegisub_2_1_LDFLAGS += @AVFORMAT_LDFLAGS@ @AVCODEC_LDFLAGS@ @SWSCALE_LDFLAGS@ @POSTPROC_LDFLAGS@
|
||||
aegisub_2_1_LDADD += libaudiovideo_ffmpegsource.a ../FFmpegSource2/libffmpegsource2_aegisub.a
|
||||
endif
|
||||
|
||||
|
|
19
configure.in
19
configure.in
|
@ -99,13 +99,12 @@ AC_DEFINE_UNQUOTED(AEGISUB_VERSION_DATA, ["$AEGISUB_VERSION_DATA"], [Data path s
|
|||
|
||||
aegisubdatadir="$datadir/$PACKAGE/aegisub_version_data"
|
||||
aegisubdocdir="$datadir/doc/$PACKAGE/aegisub_version_data"
|
||||
AEGISUB_COMMAND="aegisub-aegisub_version_data"
|
||||
AEGISUB_COMMAND="aegisub-$AEGISUB_VERSION_MAJOR.AEGISUB_VERSION_MINOR"
|
||||
|
||||
AC_SUBST(aegisubdatadir)
|
||||
AC_SUBST(aegisubdocdir)
|
||||
AC_SUBST(AEGISUB_COMMAND)
|
||||
|
||||
|
||||
AC_ARG_WITH(desktop-dir, [ --with-desktop-dir=PATH desktop file locations (default: PREFIX/share)])
|
||||
if test -z "$with_desktop_dir" ; then
|
||||
DESKTOP_DATADIR=$with_desktop_dir
|
||||
|
@ -504,6 +503,14 @@ AC_ARG_WITH(ffmpeg, [ --without-ffmpeg build without FFMPEG support.
|
|||
Disables FFMPEG and FFmpegSource A/V providers.
|
||||
(default: auto)], ffmpeg_disabled="(disabled)")
|
||||
|
||||
AC_ARG_VAR([FFMPEG_LDFLAGS], [LDFLAGS to use for FFMPEG (default: LDFLAGS)])
|
||||
AC_ARG_VAR([FFMPEG_CFLAGS], [CFLAGS to use for FFMPEG (default: CPPFLAGS)])
|
||||
|
||||
aegisub_save_CPPFLAGS="$CPPFLAGS"
|
||||
aegisub_save_LDFLAGS="$LDFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $FFMPEG_CFLAGS"
|
||||
LDFLAGS="$LDFLAGS $FFMPEG_LDFLAGS"
|
||||
|
||||
if test "$with_ffmpeg" != "no"; then
|
||||
AC_CHECK_LIB([avcodec], [avcodec_init],[AVCODEC_LDFLAGS="-lavcodec"; with_ffmpeg="yes"], [with_ffmpeg="no"])
|
||||
AC_CHECK_LIB([avformat], [av_read_frame],[AVFORMAT_LDFLAGS="-lavformat"; with_ffmpeg="yes"], [with_ffmpeg="no"])
|
||||
|
@ -521,12 +528,15 @@ if test "$with_ffmpeg" != "no"; then
|
|||
with_ffmpeg="no";
|
||||
fi
|
||||
fi
|
||||
CPPFLAGS="$aegisub_save_CPPFLAGS"
|
||||
LDFLAGS="$aegisub_save_LDFLAGS"
|
||||
|
||||
AC_SUBST(SWSCALE_LDFLAGS)
|
||||
AC_SUBST(AVCODEC_LDFLAGS)
|
||||
AC_SUBST(AVFORMAT_LDFLAGS)
|
||||
AC_SUBST(AVUTIL_LDFLAGS)
|
||||
|
||||
AM_CONDITIONAL([HAVE_FFMPEG], [test "$with_ffmpeg" = "yes"])
|
||||
|
||||
AC_ARG_WITH(provider-ffmpeg, [ --without-provider-ffmpeg
|
||||
build without FFMPEG A/V provider. (default: auto)], ffmpeg_provider_disabled="(disabled)")
|
||||
|
@ -544,7 +554,7 @@ if test "$with_ffmpeg" = "no"; then
|
|||
ffmpeg_provider_disabled="(disabled, requires FFMPEG)"
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL([HAVE_FFMPEG], [test "$with_provider_ffmpeg" = "yes"])
|
||||
AM_CONDITIONAL([HAVE_PROVIDER_FFMPEG], [test "$with_provider_ffmpeg" = "yes"])
|
||||
|
||||
AC_ARG_WITH(provider-ffmpegsource, [ --without-provider-ffmpegsource
|
||||
build without FFmpegSource A/V provider.
|
||||
|
@ -564,8 +574,7 @@ if test "$with_ffmpegsource" != "no"; then
|
|||
fi
|
||||
|
||||
AC_SUBST(POSTPROC_LDFLAGS)
|
||||
|
||||
AM_CONDITIONAL([HAVE_FFMPEGSOURCE], [test "$with_provider_ffmpegsource" = "yes"])
|
||||
AM_CONDITIONAL([HAVE_PROVIDER_FFMPEGSOURCE], [test "$with_provider_ffmpegsource" = "yes"])
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue