check for libass / add --with[out]-libass parameter to configure
Originally committed to SVN as r1006.
This commit is contained in:
parent
758cd7e2e7
commit
5b0255a59d
2 changed files with 31 additions and 8 deletions
|
@ -1,4 +1,5 @@
|
|||
EXTRA_DIST = res.rc $(srcdir)/*.h
|
||||
EXTRA_DIST = res.rc $(srcdir)/*.h \
|
||||
subtitles_provider_libass.cpp
|
||||
SUFFIXES = .c .cpp .rc
|
||||
|
||||
SUBDIRS = bitmaps posix
|
||||
|
@ -13,6 +14,12 @@ BUILDINFO := -DBUILD_CREDIT="\"$(shell whoami)\"" $(REVISION)
|
|||
AM_CPPFLAGS = -DAEGISUB -Iposix -include posix/defines.h $(BUILDINFO)
|
||||
LDADD = posix/libposix.a ../lua51/src/liblua.a ../FexTrackerSource/libfex.a ../csri/lib/.libs/libcsri.a -lGL -lGLU
|
||||
|
||||
if USE_LIBASS
|
||||
LIBASS=subtitles_provider_libass.cpp
|
||||
else
|
||||
LIBASS=
|
||||
endif
|
||||
|
||||
# auto4_ruby_assfile.cpp
|
||||
# auto4_ruby.cpp
|
||||
# auto4_ruby_dialog.cpp
|
||||
|
@ -111,7 +118,7 @@ aegisub_SOURCES = \
|
|||
subtitle_format_txt.cpp \
|
||||
subtitles_provider.cpp \
|
||||
subtitles_provider_csri.cpp \
|
||||
subtitles_provider_libass.cpp \
|
||||
$(LIBASS) \
|
||||
text_file_reader.cpp \
|
||||
text_file_writer.cpp \
|
||||
thesaurus.cpp \
|
||||
|
|
28
configure.ac
28
configure.ac
|
@ -127,12 +127,26 @@ AC_CHECK_LIB([portaudio], [Pa_Initialize],, [AC_MSG_ERROR([portaudio not found.]
|
|||
AC_CHECK_LIB([avcodec], [avcodec_init])
|
||||
AC_CHECK_LIB([avformat], [av_read_frame])
|
||||
|
||||
PKG_CHECK_MODULES([LIBASS], libass >= 0.9.1, [
|
||||
CPPFLAGS="$CPPFLAGS $LIBASS_CFLAGS"
|
||||
LIBS="$LIBS $LIBASS_LIBS"
|
||||
AC_DEFINE(HAVE_LIBASS, 1, [found libass via pkg-config])
|
||||
], [true])
|
||||
AC_CHECK_HEADERS([ass/ass.h])
|
||||
AC_ARG_WITH([libass], [AS_HELP_STRING([--without-libass],[disable libass @<:@default=check@:>@])],[],[with_libass=check])
|
||||
|
||||
AS_IF([test "x$with_libass" != xno], [
|
||||
PKG_CHECK_MODULES([LIBASS], libass >= 0.9.1, [
|
||||
CPPFLAGS="$CPPFLAGS $LIBASS_CFLAGS"
|
||||
LIBS="$LIBS $LIBASS_LIBS"
|
||||
AC_DEFINE(HAVE_LIBASS, 1, [found libass via pkg-config])
|
||||
AC_CHECK_HEADERS([ass/ass.h], [
|
||||
with_libass=yes
|
||||
], [ if test "x$with_libass" != xcheck
|
||||
then AC_MSG_FAILURE([--with-libass given, but libass headers not found])
|
||||
fi
|
||||
with_libass=no
|
||||
])
|
||||
], [ if test "x$with_libass" != xcheck
|
||||
then AC_MSG_FAILURE([--with-libass given, but libass pkgconfig module found])
|
||||
fi
|
||||
with_libass=no
|
||||
])
|
||||
])
|
||||
|
||||
PKG_CHECK_MODULES([GLIB], glib-2.0, [
|
||||
CPPFLAGS="$CPPFLAGS $GLIB_CFLAGS"
|
||||
|
@ -179,6 +193,8 @@ AC_HEADER_STDBOOL
|
|||
|
||||
AC_CONFIG_SUBDIRS([csri])
|
||||
|
||||
AM_CONDITIONAL([USE_LIBASS], [test "$with_libass" != "no" ])
|
||||
|
||||
AC_OUTPUT([
|
||||
Makefile
|
||||
ac/Makefile
|
||||
|
|
Loading…
Reference in a new issue