2003-02-16 12:09:37 +00:00
|
|
|
dnl process this file with autoconf to generate the configure script
|
|
|
|
|
2003-07-09 18:53:25 +00:00
|
|
|
AC_INIT(src/mkvmerge.cpp)
|
2003-10-04 10:17:39 +00:00
|
|
|
AC_PREREQ(2.50)
|
|
|
|
|
2003-10-11 12:33:26 +00:00
|
|
|
AM_INIT_AUTOMAKE(mkvtoolnix,0.7.2)
|
2003-10-05 15:22:24 +00:00
|
|
|
AM_CONFIG_HEADER(config.h)
|
2003-02-16 12:09:37 +00:00
|
|
|
|
|
|
|
AC_PROG_CC
|
2003-10-04 10:17:39 +00:00
|
|
|
AC_PROG_CC_C_O
|
2003-02-16 12:09:37 +00:00
|
|
|
AC_PROG_CPP
|
2003-10-04 10:17:39 +00:00
|
|
|
AC_PROG_CXX
|
|
|
|
AC_PROG_MAKE_SET
|
|
|
|
dnl Find the right ranlib, even when cross-compiling
|
|
|
|
AC_CHECK_TOOL(RANLIB, ranlib, :)
|
|
|
|
AC_CHECK_TOOL(STRIP, strip, :)
|
|
|
|
AC_CHECK_TOOL(AR, ar, :)
|
|
|
|
AC_CHECK_TOOL(LD, ld, :)
|
2003-02-16 12:09:37 +00:00
|
|
|
|
|
|
|
dnl Check for headers
|
|
|
|
AC_HEADER_STDC()
|
|
|
|
|
2003-10-04 10:17:39 +00:00
|
|
|
|
|
|
|
|
|
|
|
dnl Stolen from VideoLAN Client, http://www.videolan.org/
|
|
|
|
dnl
|
|
|
|
dnl Endianness check, AC_C_BIGENDIAN doesn't work if we are cross-compiling
|
|
|
|
dnl
|
|
|
|
dnl We give the user the opportunity to specify
|
|
|
|
dnl --with-words=big or --with-words=little ; otherwise, try to guess
|
|
|
|
dnl
|
|
|
|
AC_ARG_WITH(words,
|
|
|
|
[ --with-words=endianness set endianness (big or little)])
|
|
|
|
case "${with_words}" in
|
|
|
|
big)
|
|
|
|
ac_cv_c_bigendian=yes
|
|
|
|
;;
|
|
|
|
little)
|
|
|
|
ac_cv_c_bigendian=no
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
dnl Try to guess endianness by matching patterns on a compiled
|
|
|
|
dnl binary, by looking for an ASCII or EBCDIC string
|
|
|
|
AC_CACHE_CHECK([whether the byte order is big-endian],
|
|
|
|
[ac_cv_c_bigendian],
|
|
|
|
[ac_cv_c_bigendian="unknown"
|
|
|
|
[cat >conftest.c <<EOF
|
|
|
|
short am[] = { 0x4249, 0x4765, 0x6e44, 0x6961, 0x6e53, 0x7953, 0 };
|
|
|
|
short ai[] = { 0x694c, 0x5454, 0x656c, 0x6e45, 0x6944, 0x6e61, 0 };
|
|
|
|
void _a(void) { char*s = (char*)am; s = (char *)ai; }
|
|
|
|
short ei[] = { 0x89D3, 0xe3e3, 0x8593, 0x95c5, 0x89c4, 0x9581, 0 };
|
|
|
|
short em[] = { 0xc2c9, 0xc785, 0x95c4, 0x8981, 0x95e2, 0xa8e2, 0 };
|
|
|
|
void _e(void) { char*s = (char*)em; s = (char*)ei; }
|
|
|
|
int main(void) { _a(); _e(); return 0; }
|
|
|
|
EOF
|
|
|
|
]
|
|
|
|
if test -f conftest.c
|
|
|
|
then
|
|
|
|
if ${CC-cc} -c conftest.c -o conftest.o >>config.log 2>&1 \
|
|
|
|
&& test -f conftest.o
|
|
|
|
then
|
|
|
|
if test "`strings conftest.o | grep BIGenDianSyS`"
|
|
|
|
then
|
|
|
|
ac_cv_c_bigendian="yes"
|
|
|
|
fi
|
|
|
|
if test "`strings conftest.o | grep LiTTleEnDian`"
|
|
|
|
then
|
|
|
|
ac_cv_c_bigendian="no"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
])
|
|
|
|
if test "${ac_cv_c_bigendian}" = "unknown"
|
|
|
|
then
|
|
|
|
AC_MSG_ERROR([Could not guess endianness, please use --with-words])
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
dnl Now we know what to use for endianness, just put it in the header
|
|
|
|
if test "${ac_cv_c_bigendian}" = "yes"
|
|
|
|
then
|
|
|
|
AC_DEFINE(WORDS_BIGENDIAN, 1, big endian system)
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dnl
|
|
|
|
dnl Extra include and library dirs that someone would like to specify.
|
|
|
|
dnl
|
|
|
|
AC_ARG_WITH(extra-includes,
|
|
|
|
[ --with-extra-includes=DIR Path to other include directories],,
|
|
|
|
with_extra_include_given=no)
|
|
|
|
AC_ARG_WITH(extra-libs,
|
|
|
|
[ --with-extra-libs=DIR Path to other library directories],,
|
|
|
|
with_extra_libs_given=no)
|
|
|
|
EXTRA_CFLAGS=
|
|
|
|
if test "$with_extra_includes" != ""; then
|
|
|
|
DIRS=`echo $with_extra_includes | cut -d '=' -f 2 | sed 's,;, -I,g'`
|
|
|
|
EXTRA_CFLAGS="-I$DIRS"
|
|
|
|
CFLAGS="$CFLAGS -I$DIRS"
|
|
|
|
CXXFLAGS="$CXXFLAGS -I$DIRS"
|
|
|
|
CPPFLAGS="$CPPFLAGS -I$DIRS"
|
|
|
|
fi
|
|
|
|
|
|
|
|
EXTRA_LDFLAGS=
|
|
|
|
if test "$with_extra_libs" != ""; then
|
|
|
|
DIRS=`echo $with_extra_libs | cut -d '=' -f 2 | sed 's,;, -L,g'`
|
|
|
|
EXTRA_LDFLAGS="-L$DIRS"
|
|
|
|
LDFLAGS="$LDFLAGS -L$DIRS"
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_SUBST(EXTRA_CFLAGS)
|
|
|
|
AC_SUBST(EXTRA_LDFLAGS)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dnl
|
|
|
|
dnl Debugging and profiling options
|
|
|
|
dnl
|
|
|
|
AC_ARG_ENABLE([debug],
|
|
|
|
[ --enable-debug compile with debug information])
|
|
|
|
if test x"$enable_debug" = x"yes"; then
|
|
|
|
dnl debug information
|
2003-10-24 22:06:58 +00:00
|
|
|
DEBUG_CFLAGS="-g -DDEBUG"
|
2003-10-04 10:17:39 +00:00
|
|
|
else
|
|
|
|
DEBUG_CFLAGS=""
|
|
|
|
fi
|
|
|
|
AC_ARG_ENABLE([profiling],
|
|
|
|
[ --enable-profiling compile with profiling information])
|
|
|
|
if test x"$enable_profiling" = x"yes"; then
|
|
|
|
dnl profiling information
|
|
|
|
PROFILING_CFLAGS="-pg"
|
|
|
|
PROFILING_LIBS=""
|
|
|
|
else
|
|
|
|
PROFILING_CFLAGS=""
|
|
|
|
PROFILING_LIBS=""
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_SUBST(DEBUG_CFLAGS)
|
|
|
|
AC_SUBST(PROFILING_CFLAGS)
|
|
|
|
AC_SUBST(PROFILING_LIBS)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dnl
|
|
|
|
dnl Check for mingw
|
|
|
|
dnl
|
2003-10-04 10:37:38 +00:00
|
|
|
AC_CACHE_CHECK([if being compiled with mingw32],
|
|
|
|
[ac_cv_mingw32],[
|
2003-10-04 10:17:39 +00:00
|
|
|
if test "x`gcc --version | grep -i mingw`" = "x" ; then
|
2003-10-04 10:37:38 +00:00
|
|
|
ac_cv_mingw32=no
|
2003-10-04 10:17:39 +00:00
|
|
|
else
|
2003-10-04 10:37:38 +00:00
|
|
|
ac_cv_mingw32=yes
|
|
|
|
fi])
|
|
|
|
|
|
|
|
if test "x$ac_cv_mingw32" = "xyes"; then
|
2003-10-04 10:17:39 +00:00
|
|
|
export MINGW=1
|
|
|
|
MINGW_GUIAPP=-mwindows
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_SUBST(MINGW_LIBS)
|
|
|
|
AC_SUBST(MINGW_GUIAPP)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dnl
|
|
|
|
dnl Test for libiconv
|
|
|
|
dnl
|
|
|
|
dnl This macros shamelessly stolen from
|
|
|
|
dnl http://gcc.gnu.org/ml/gcc-bugs/2001-06/msg01398.html.
|
|
|
|
dnl Written by Bruno Haible.
|
|
|
|
dnl
|
|
|
|
dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
|
|
|
|
dnl those with the standalone portable GNU libiconv installed).
|
|
|
|
dnl
|
|
|
|
AC_ARG_WITH([libiconv-prefix],
|
|
|
|
[ --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib],[
|
|
|
|
for dir in `echo "$withval" | tr : ' '`; do
|
|
|
|
if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
|
|
|
|
if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
|
|
|
|
done
|
|
|
|
])
|
|
|
|
|
|
|
|
AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
|
|
|
|
am_cv_func_iconv="no, consider installing GNU libiconv"
|
|
|
|
am_cv_lib_iconv=no
|
|
|
|
AC_TRY_LINK([#include <stdlib.h>
|
|
|
|
#include <iconv.h>],
|
|
|
|
[iconv_t cd = iconv_open("","");
|
|
|
|
iconv(cd,NULL,NULL,NULL,NULL);
|
|
|
|
iconv_close(cd);],
|
|
|
|
am_cv_func_iconv=yes)
|
|
|
|
if test "$am_cv_func_iconv" != yes; then
|
|
|
|
am_save_LIBS="$LIBS"
|
|
|
|
LIBS="$LIBS -liconv"
|
|
|
|
AC_TRY_LINK([#include <stdlib.h>
|
|
|
|
#include <iconv.h>],
|
|
|
|
[iconv_t cd = iconv_open("","");
|
|
|
|
iconv(cd,NULL,NULL,NULL,NULL);
|
|
|
|
iconv_close(cd);],
|
|
|
|
am_cv_lib_iconv=yes
|
|
|
|
am_cv_func_iconv=yes)
|
|
|
|
LIBS="$am_save_LIBS"
|
|
|
|
fi
|
|
|
|
])
|
|
|
|
if test "$am_cv_func_iconv" = yes; then
|
|
|
|
AC_MSG_CHECKING([for iconv declaration])
|
|
|
|
AC_CACHE_VAL(am_cv_proto_iconv, [
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <iconv.h>
|
|
|
|
extern
|
|
|
|
#ifdef __cplusplus
|
|
|
|
"C"
|
|
|
|
#endif
|
|
|
|
#if defined(__STDC__) || defined(__cplusplus)
|
|
|
|
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
|
|
|
|
#else
|
|
|
|
size_t iconv();
|
|
|
|
#endif
|
|
|
|
], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
|
|
|
|
am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
|
|
|
|
am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
|
|
|
|
AC_MSG_RESULT([$]{ac_t:-
|
|
|
|
}[$]am_cv_proto_iconv)
|
|
|
|
dnl AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
|
|
|
|
dnl [Define as const if the declaration of iconv() needs const.])
|
|
|
|
else
|
|
|
|
echo '*** The iconv library is needed but could not be found.'
|
|
|
|
echo '*** Please install it and re-run configure.'
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
ICONV_LIBS=
|
|
|
|
if test "$am_cv_lib_iconv" = yes; then
|
|
|
|
ICONV_LIBS="-liconv"
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_SUBST(ICONV_LIBS)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dnl
|
|
|
|
dnl Check for libogg
|
|
|
|
dnl
|
|
|
|
AC_ARG_WITH(ogg-prefix,
|
|
|
|
[ --with-ogg-prefix=PFX Prefix where libogg is installed],
|
|
|
|
ogg_prefix="$withval", ogg_prefix="")
|
|
|
|
AC_ARG_WITH(ogg-includes,
|
|
|
|
[ --with-ogg-includes=DIR Directory where libogg headers are installed],
|
|
|
|
ogg_includes="$withval", ogg_includes="")
|
|
|
|
AC_ARG_WITH(ogg-libraries,
|
|
|
|
[ --with-ogg-libraries=DIR Directory where libogg is installed],
|
|
|
|
ogg_libraries="$withval", ogg_libraries="")
|
|
|
|
|
|
|
|
if test "x$ogg_prefix" != "x"; then
|
|
|
|
OGG_CFLAGS="-I$ogg_prefix/include"
|
|
|
|
OGG_LIBS="-L$ogg_prefix/lib"
|
|
|
|
else
|
|
|
|
if test "x$ogg_includes" != "x"; then
|
|
|
|
OGG_CFLAGS="-I$ogg_includes"
|
|
|
|
elif test "x$prefix" != "xNONE"; then
|
|
|
|
OGG_CFLAGS="-I$prefix"
|
|
|
|
fi
|
|
|
|
if test "x$ogg_libraries" != "x"; then
|
|
|
|
OGG_LIBS="-L$ogg_libraries"
|
|
|
|
elif test "x$prefix" != "xNONE"; then
|
|
|
|
OGG_LIBS="-L$prefix"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_CHECK_LIB(ogg, ogg_sync_init,
|
2003-10-04 13:02:49 +00:00
|
|
|
[ OGG_LIBS="$OGG_LIBS -logg"
|
2003-10-04 10:17:39 +00:00
|
|
|
ogg_found=yes ],
|
|
|
|
[ ogg_found=no ],
|
|
|
|
"$OGG_LIBS")
|
|
|
|
if test "$ogg_found" = "no"; then
|
|
|
|
AC_MSG_ERROR([Could not find the Ogg library])
|
|
|
|
fi
|
|
|
|
ogg_save_CFLAGS="$CFLAGS"
|
|
|
|
CFLAGS="$CFLAGS $OGG_CFLAGS"
|
|
|
|
AC_CHECK_HEADERS(ogg/ogg.h, , ogg_found=no)
|
|
|
|
if test "$ogg_found" = "no"; then
|
|
|
|
AC_MSG_ERROR([Could not find the Ogg header files])
|
|
|
|
fi
|
|
|
|
CFLAGS="$ogg_save_CFLAGS"
|
|
|
|
|
|
|
|
AC_SUBST(OGG_CFLAGS)
|
|
|
|
AC_SUBST(OGG_LIBS)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dnl
|
|
|
|
dnl Check for libvorbis
|
|
|
|
dnl
|
|
|
|
AC_ARG_WITH(vorbis-prefix,
|
|
|
|
[ --with-vorbis-prefix=PFX Prefix where libvorbis is installed],
|
|
|
|
vorbis_prefix="$withval", vorbis_prefix="")
|
|
|
|
AC_ARG_WITH(vorbis-includes,
|
|
|
|
[ --with-vorbis-includes=DIR Directory where libvorbis headers are installed],
|
|
|
|
vorbis_includes="$withval", vorbis_includes="")
|
|
|
|
AC_ARG_WITH(vorbis-libraries,
|
|
|
|
[ --with-vorbis-libraries=DIR Directory where libvorbis is installed],
|
|
|
|
vorbis_libraries="$withval", vorbis_libraries="")
|
|
|
|
|
|
|
|
if test "x$vorbis_prefix" != "x"; then
|
|
|
|
VORBIS_CFLAGS="-I$vorbis_prefix/include"
|
|
|
|
VORBIS_LIBS="-L$vorbis_prefix/lib"
|
|
|
|
else
|
|
|
|
if test "x$vorbis_includes" != "x"; then
|
|
|
|
VORBIS_CFLAGS="-I$vorbis_includes"
|
|
|
|
elif test "x$prefix" != "xNONE"; then
|
|
|
|
VORBIS_CFLAGS="-I$prefix"
|
|
|
|
fi
|
|
|
|
if test "x$vorbis_libraries" != "x"; then
|
|
|
|
VORBIS_LIBS="-L$vorbis_libraries"
|
|
|
|
elif test "x$prefix" != "xNONE"; then
|
|
|
|
VORBIS_LIBS="-L$prefix"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_CHECK_LIB(vorbis, vorbis_synthesis_init,
|
2003-10-04 13:02:49 +00:00
|
|
|
[ VORBIS_LIBS="$VORBIS_LIBS -lvorbis -lm"
|
2003-10-04 10:17:39 +00:00
|
|
|
vorbis_found=yes ],
|
|
|
|
[ vorbis_found=no ],
|
2003-10-04 13:02:49 +00:00
|
|
|
$VORBIS_LIBS $OGG_LIBS)
|
2003-10-04 10:17:39 +00:00
|
|
|
if test "$vorbis_found" = "no"; then
|
|
|
|
AC_MSG_ERROR([Could not find the Vorbis library])
|
|
|
|
fi
|
|
|
|
vorbis_save_CFLAGS="$CFLAGS"
|
|
|
|
CFLAGS="$CFLAGS $VORBIS_CFLAGS"
|
|
|
|
AC_CHECK_HEADERS(vorbis/codec.h, , vorbis_found=no)
|
|
|
|
if test "$vorbis_found" = "no"; then
|
|
|
|
AC_MSG_ERROR([Could not find the Vorbis header files])
|
|
|
|
fi
|
|
|
|
CFLAGS="$vorbis_save_CFLAGS"
|
|
|
|
|
|
|
|
AC_SUBST(VORBIS_CFLAGS)
|
|
|
|
AC_SUBST(VORBIS_LIBS)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dnl
|
|
|
|
dnl Test for libebml, and define EBML_CFLAGS and EBML_LIBS
|
|
|
|
dnl
|
|
|
|
AC_ARG_WITH(ebml-prefix,
|
|
|
|
[ --with-ebml-prefix=PFX Prefix where libebml is installed],
|
|
|
|
ebml_prefix="$withval", ebml_prefix="")
|
|
|
|
AC_ARG_WITH(ebml-include,
|
|
|
|
[ --with-ebml-include=DIR Path to where the libebml include files are installed],
|
|
|
|
ebml_include="$withval", ebml_include="")
|
|
|
|
AC_ARG_WITH(ebml-lib,
|
|
|
|
[ --with-ebml-lib=DIR Path to where libebml is installed],
|
|
|
|
ebml_lib="$withval", ebml_lib="")
|
|
|
|
AC_ARG_ENABLE(ebmltest,
|
|
|
|
[ --disable-ebmltest Do not try to compile and run a test EBML program],,
|
|
|
|
enable_ebmltest=yes)
|
|
|
|
if test "x$ebml_prefix" != "x"; then
|
|
|
|
ebml_args="$ebml_args --prefix=$ebml_prefix"
|
|
|
|
if test "x$ebml_include" != "x"; then
|
|
|
|
EBML_CFLAGS="-I$ebml_include"
|
|
|
|
else
|
|
|
|
EBML_CFLAGS="-I$ebml_prefix/include"
|
|
|
|
fi
|
|
|
|
if test "x$ebml_lib" != "x"; then
|
|
|
|
EBML_LIBS="-L$ebml_lib"
|
|
|
|
else
|
|
|
|
EBML_LIBS="-L$ebml_prefix/lib"
|
|
|
|
fi
|
|
|
|
elif test "x$prefix" != "xNONE"; then
|
|
|
|
ebml_args="$ebml_args --prefix=$prefix"
|
|
|
|
if test "x$ebml_include" != "x"; then
|
|
|
|
EBML_CFLAGS="-I$ebml_include"
|
|
|
|
else
|
|
|
|
EBML_CFLAGS="-I$prefix/include"
|
|
|
|
fi
|
|
|
|
if test "x$ebml_lib" != "x"; then
|
|
|
|
EBML_LIBS="-L$ebml_lib"
|
|
|
|
else
|
|
|
|
EBML_LIBS="-L$prefix/lib"
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
if test "x$ebml_include" != "x"; then
|
|
|
|
EBML_CFLAGS="-I$ebml_include"
|
|
|
|
fi
|
|
|
|
if test "x$ebml_lib" != "x"; then
|
|
|
|
EBML_LIBS="-L$ebml_lib"
|
|
|
|
else
|
|
|
|
EBML_LIBS="-L/usr/local/lib"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
EBML_LIBS="$EBML_LIBS -lebml"
|
|
|
|
|
|
|
|
AC_MSG_CHECKING(for EBML)
|
|
|
|
no_ebml=""
|
|
|
|
|
|
|
|
if test "x$enable_ebmltest" = "xyes" ; then
|
|
|
|
ac_save_CXXFLAGS="$CXXFLAGS"
|
|
|
|
ac_save_LIBS="$LIBS"
|
|
|
|
CXXFLAGS="$CFLAGS $EBML_CFLAGS"
|
|
|
|
LIBS="$LIBS $EBML_LIBS"
|
|
|
|
dnl
|
|
|
|
dnl Now check if the installed EBML is sufficiently new.
|
|
|
|
dnl
|
|
|
|
rm -f conf.ebmltest
|
|
|
|
AC_LANG_PUSH(C++)
|
|
|
|
AC_TRY_RUN([
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <ebml/EbmlVersion.h>
|
|
|
|
|
|
|
|
using namespace libebml;
|
|
|
|
|
|
|
|
int main ()
|
|
|
|
{
|
|
|
|
FILE *f;
|
|
|
|
f = fopen("conf.ebmltest", "wb");
|
|
|
|
if (f == NULL)
|
|
|
|
return 1;
|
|
|
|
fprintf(f, "%s\n", EbmlCodeVersion.c_str());
|
|
|
|
fclose(f);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
],, no_ebml=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
|
|
|
|
AC_LANG_POP
|
|
|
|
CXXFLAGS="$ac_save_CXXFLAGS"
|
|
|
|
LIBS="$ac_save_LIBS"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "x$no_ebml" = "x" -a -f conf.ebmltest ; then
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2003-10-19 15:41:42 +00:00
|
|
|
ebml_ver_req_major=0
|
2003-11-01 11:01:09 +00:00
|
|
|
ebml_ver_req_minor=6
|
|
|
|
ebml_ver_req_micro=2
|
2003-10-19 15:41:42 +00:00
|
|
|
|
|
|
|
AC_MSG_CHECKING(Ebml version >= ${ebml_ver_req_major}.${ebml_ver_req_minor}.${ebml_ver_req_micro})
|
2003-10-04 10:17:39 +00:00
|
|
|
|
|
|
|
ebml_version=`cat conf.ebmltest`
|
2003-10-19 15:41:42 +00:00
|
|
|
set - `sed 's/\./\ /g' < conf.ebmltest`
|
|
|
|
if test "x$1" = "x" -o $1 -lt ${ebml_ver_req_major} ; then
|
2003-10-04 10:17:39 +00:00
|
|
|
mver_ok=0
|
2003-10-19 15:41:42 +00:00
|
|
|
elif test $1 -gt ${ebml_ver_req_major} ; then
|
|
|
|
mver_ok=1
|
2003-10-04 10:17:39 +00:00
|
|
|
else
|
2003-10-19 15:41:42 +00:00
|
|
|
if test "x$2" = "x" -o $2 -lt ${ebml_ver_req_minor} ; then
|
2003-10-04 10:17:39 +00:00
|
|
|
mver_ok=0
|
2003-10-19 15:41:42 +00:00
|
|
|
elif test $2 -gt ${ebml_ver_req_minor} ; then
|
|
|
|
mver_ok=1
|
2003-10-04 10:17:39 +00:00
|
|
|
else
|
2003-10-19 15:41:42 +00:00
|
|
|
if test "x$3" = "x" -o $3 -lt ${ebml_ver_req_micro} ; then
|
2003-10-04 10:17:39 +00:00
|
|
|
mver_ok=0
|
2003-10-19 15:41:42 +00:00
|
|
|
else
|
|
|
|
mver_ok=1
|
2003-10-04 10:17:39 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
if test "$mver_ok" = "1" ; then
|
2003-10-19 15:41:42 +00:00
|
|
|
AC_MSG_RESULT(ok ($ebml_version))
|
2003-10-04 10:17:39 +00:00
|
|
|
else
|
2003-10-19 15:41:42 +00:00
|
|
|
AC_MSG_RESULT(too old ($ebml_version))
|
2003-10-04 10:17:39 +00:00
|
|
|
echo '*** Your Ebml version is too old. Upgrade to at least version'
|
2003-10-19 15:41:42 +00:00
|
|
|
echo '*** '${ebml_ver_req_major}.${ebml_ver_req_minor}.${ebml_ver_req_micro}' and re-run configure.'
|
2003-10-04 10:17:39 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
rm -f conf.ebmltest
|
|
|
|
|
|
|
|
AC_SUBST(EBML_CFLAGS)
|
|
|
|
AC_SUBST(EBML_LIBS)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dnl
|
|
|
|
dnl Test for libmatroska, and define MATROSKA_CFLAGS and MATROSKA_LIBS
|
|
|
|
dnl
|
|
|
|
AC_ARG_WITH(matroska-prefix,
|
|
|
|
[ --with-matroska-prefix=PFX Prefix where libmatroska is installed],
|
|
|
|
matroska_prefix="$withval", matroska_prefix="")
|
|
|
|
AC_ARG_WITH(matroska-include,
|
|
|
|
[ --with-matroska-include=DIR Path to where the libmatroska include files installed],
|
|
|
|
matroska_include="$withval", matroska_include="")
|
|
|
|
AC_ARG_WITH(matroska-lib,
|
|
|
|
[ --with-matroska-lib=DIR Path to where the libmatroska library installed],
|
|
|
|
matroska_lib="$withval", matroska_lib="")
|
|
|
|
AC_ARG_ENABLE(matroskatest,
|
|
|
|
[ --disable-matroskatest Do not try to compile and run a test Matroska program],,
|
|
|
|
enable_matroskatest=yes)
|
|
|
|
if test "x$matroska_prefix" != "x"; then
|
|
|
|
matroska_args="$matroska_args --prefix=$matroska_prefix"
|
|
|
|
if test "x$matroska_include" != "x"; then
|
|
|
|
MATROSKA_CFLAGS="-I$matroska_include"
|
|
|
|
else
|
|
|
|
MATROSKA_CFLAGS="-I$matroska_prefix/include"
|
|
|
|
fi
|
|
|
|
if test "x$matroska_lib" != "x"; then
|
|
|
|
MATROSKA_LIBS="-L$matroska_lib"
|
|
|
|
else
|
|
|
|
MATROSKA_LIBS="-L$matroska_prefix/lib"
|
|
|
|
fi
|
|
|
|
elif test "x$prefix" != "xNONE"; then
|
|
|
|
matroska_args="$matroska_args --prefix=$prefix"
|
|
|
|
if test "x$matroska_include" != "x"; then
|
|
|
|
MATROSKA_CFLAGS="-I$matroska_include"
|
|
|
|
else
|
|
|
|
MATROSKA_CFLAGS="-I$prefix/include"
|
|
|
|
fi
|
|
|
|
if test "x$matroska_lib" != "x"; then
|
|
|
|
MATROSKA_LIBS="-L$matroska_lib"
|
|
|
|
else
|
|
|
|
MATROSKA_LIBS="-L$prefix/lib"
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
if test "x$matroska_include" != "x"; then
|
|
|
|
MATROSKA_CFLAGS="-I$matroska_include"
|
|
|
|
fi
|
|
|
|
if test "x$matroska_lib" != "x"; then
|
|
|
|
MATROSKA_LIBS="-L$matroska_lib"
|
|
|
|
else
|
|
|
|
MATROSKA_LIBS="-L/usr/local/lib"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
MATROSKA_LIBS="$MATROSKA_LIBS -lmatroska"
|
|
|
|
|
|
|
|
AC_MSG_CHECKING(for Matroska)
|
|
|
|
no_matroska=""
|
|
|
|
|
|
|
|
if test "x$enable_matroskatest" = "xyes" ; then
|
|
|
|
ac_save_CXXFLAGS="$CXXFLAGS"
|
|
|
|
ac_save_LIBS="$LIBS"
|
|
|
|
CXXFLAGS="$CXXFLAGS $MATROSKA_CFLAGS $EBML_CFLAGS"
|
|
|
|
LIBS="$LIBS $MATROSKA_LIBS $EBML_LIBS"
|
|
|
|
dnl
|
|
|
|
dnl Now check if the installed Matroska is sufficiently new.
|
|
|
|
dnl
|
|
|
|
rm -f conf.matroskatest
|
|
|
|
AC_LANG_PUSH(C++)
|
|
|
|
AC_TRY_RUN([
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <ebml/EbmlConfig.h>
|
|
|
|
#include <matroska/KaxVersion.h>
|
|
|
|
|
|
|
|
using namespace LIBMATROSKA_NAMESPACE;
|
|
|
|
|
|
|
|
int main ()
|
|
|
|
{
|
|
|
|
FILE *f;
|
|
|
|
f = fopen("conf.matroskatest", "wb");
|
|
|
|
if (f == NULL)
|
|
|
|
return 1;
|
|
|
|
fprintf(f, "%s\n", KaxCodeVersion.c_str());
|
|
|
|
fclose(f);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
],, no_matroska=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
|
|
|
|
AC_LANG_POP
|
|
|
|
CXXFLAGS="$ac_save_CXXFLAGS"
|
|
|
|
LIBS="$ac_save_LIBS"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "x$no_matroska" = "x" -a -f conf.matroskatest ; then
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2003-10-19 15:41:42 +00:00
|
|
|
kax_ver_req_major=0
|
2003-11-01 11:01:09 +00:00
|
|
|
kax_ver_req_minor=6
|
|
|
|
kax_ver_req_micro=1
|
2003-10-19 15:41:42 +00:00
|
|
|
AC_MSG_CHECKING(Matroska version >= ${kax_ver_req_major}.${kax_ver_req_minor}.${kax_ver_req_micro})
|
2003-10-04 10:17:39 +00:00
|
|
|
|
|
|
|
matroska_version=`cat conf.matroskatest`
|
2003-10-19 15:41:42 +00:00
|
|
|
set - `sed 's/\./\ /g' < conf.matroskatest`
|
|
|
|
if test "x$1" = "x" -o $1 -lt ${kax_ver_req_major} ; then
|
2003-10-04 10:17:39 +00:00
|
|
|
mver_ok=0
|
2003-10-19 15:41:42 +00:00
|
|
|
elif test $1 -gt ${kax_ver_req_major} ; then
|
|
|
|
mver_ok=1
|
2003-10-04 10:17:39 +00:00
|
|
|
else
|
2003-10-19 15:41:42 +00:00
|
|
|
if test "x$2" = "x" -o $2 -lt ${kax_ver_req_minor} ; then
|
2003-10-04 10:17:39 +00:00
|
|
|
mver_ok=0
|
2003-10-19 15:41:42 +00:00
|
|
|
elif test $2 -gt ${kax_ver_req_minor} ; then
|
|
|
|
mver_ok=1
|
2003-10-04 10:17:39 +00:00
|
|
|
else
|
2003-10-19 15:41:42 +00:00
|
|
|
if test "x$3" = "x" -o $3 -lt ${kax_ver_req_micro} ; then
|
2003-10-04 10:17:39 +00:00
|
|
|
mver_ok=0
|
2003-10-19 15:41:42 +00:00
|
|
|
else
|
|
|
|
mver_ok=1
|
2003-10-04 10:17:39 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
if test "$mver_ok" = "1" ; then
|
2003-10-19 15:41:42 +00:00
|
|
|
AC_MSG_RESULT(ok ($matroska_version))
|
2003-10-04 10:17:39 +00:00
|
|
|
else
|
2003-10-19 15:41:42 +00:00
|
|
|
AC_MSG_RESULT(too old ($matroska_version))
|
2003-10-04 10:17:39 +00:00
|
|
|
echo '*** Your Matroska version is too old. Upgrade to at least version'
|
2003-10-19 15:41:42 +00:00
|
|
|
echo '*** '${kax_ver_req_major}.${kax_ver_req_minor}.${kax_ver_req_micro}' and re-run configure.'
|
2003-10-04 10:17:39 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
rm -f conf.matroskatest
|
|
|
|
|
|
|
|
AC_SUBST(MATROSKA_CFLAGS)
|
|
|
|
AC_SUBST(MATROSKA_LIBS)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dnl
|
|
|
|
dnl Check for libexpat
|
|
|
|
dnl
|
|
|
|
AC_ARG_WITH(expat-prefix,
|
2003-10-05 15:22:24 +00:00
|
|
|
[ --with-expat-prefix=PFX Path to where the Expat library is installed],,
|
2003-10-04 10:17:39 +00:00
|
|
|
with_expat_given=no)
|
|
|
|
AC_ARG_WITH(expat-includes,
|
2003-10-05 15:22:24 +00:00
|
|
|
[ --with-expat-includes=DIR Path to the Expat include file],,
|
2003-10-04 10:17:39 +00:00
|
|
|
with_expat_includes_given=no)
|
|
|
|
AC_ARG_WITH(expat-libraries,
|
2003-10-05 15:22:24 +00:00
|
|
|
[ --with-expat-libraries=DIR Path to where the Expat library is installed],,
|
2003-10-04 10:17:39 +00:00
|
|
|
with_expat_libraries_given=no)
|
|
|
|
|
|
|
|
EXPAT_CFLAGS=
|
|
|
|
EXPAT_LIBS=
|
|
|
|
if test "$with_expat_includes" != ""; then
|
|
|
|
EXPAT_CFLAGS="-I$with_expat_includes"
|
|
|
|
elif test "$with_expat_prefix" != "yes" -a "$with_expat_prefix" != ""; then
|
|
|
|
EXPAT_CFLAGS="-I$with_expat_prefix/include"
|
|
|
|
fi
|
|
|
|
if test "$with_expat_libraries" != ""; then
|
|
|
|
EXPAT_LIBS="-L$with_expat_libraries"
|
|
|
|
elif test "$with_expat_prefix" != "yes" -a "$with_expat_prefix" != ""; then
|
|
|
|
EXPAT_LIBS="-L$with_expat_prefix/lib"
|
|
|
|
fi
|
|
|
|
AC_CHECK_LIB(expat, XML_ParserCreate,
|
|
|
|
[ EXPAT_LIBS="$EXPAT_LIBS -lexpat"
|
|
|
|
expat_found=yes ],
|
|
|
|
[ expat_found=no ],
|
|
|
|
"$EXPAT_LIBS")
|
|
|
|
if test "$expat_found" = "no"; then
|
|
|
|
AC_MSG_ERROR([Could not find the Expat library])
|
|
|
|
fi
|
|
|
|
expat_save_CFLAGS="$CFLAGS"
|
|
|
|
CFLAGS="$CFLAGS $EXPAT_CFLAGS"
|
|
|
|
AC_CHECK_HEADERS(expat.h, , expat_found=no)
|
|
|
|
if test "$expat_found" = "no"; then
|
|
|
|
AC_MSG_ERROR([Could not find expat.h])
|
|
|
|
fi
|
|
|
|
CFLAGS="$expat_save_CFLAGS"
|
|
|
|
|
|
|
|
if test "x$expat_found" = "xno"; then
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_SUBST(EXPAT_CFLAGS)
|
|
|
|
AC_SUBST(EXPAT_LIBS)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dnl
|
|
|
|
dnl Check for zlib
|
|
|
|
dnl
|
|
|
|
AC_ARG_WITH(zlib,
|
2003-10-05 15:22:24 +00:00
|
|
|
[ --with-zlib-prefix=PFX Path to where the zlib library is installed],,
|
2003-10-04 10:17:39 +00:00
|
|
|
with_zlib_given=no)
|
|
|
|
|
|
|
|
ZLIB_CFLAGS=
|
|
|
|
ZLIB_LIBS=
|
|
|
|
if test "$with_zlib_prefix" != "yes" -a "$with_zlib_prefix" != ""; then
|
|
|
|
ZLIB_CFLAGS="-I$with_zlib_prefix/include"
|
|
|
|
ZLIB_LIBS="-L$with_zlib_prefix/lib"
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_CHECK_LIB(z, zlibVersion,
|
|
|
|
[ ZLIB_LIBS="$ZLIB_LIBS -lz"
|
|
|
|
zlib_found=yes ],
|
|
|
|
[ zlib_found=no ],
|
|
|
|
"$ZLIB_LIBS")
|
|
|
|
if test "$zlib_found" = "no"; then
|
|
|
|
AC_MSG_ERROR([Could not find the zlib library])
|
|
|
|
fi
|
|
|
|
zlib_save_CFLAGS="$CFLAGS"
|
|
|
|
CFLAGS="$CFLAGS $ZLIB_CFLAGS"
|
|
|
|
AC_CHECK_HEADERS(zlib.h, , zlib_found=no)
|
|
|
|
CFLAGS="$zlib_save_CFLAGS"
|
|
|
|
|
|
|
|
AC_SUBST(ZLIB_CFLAGS)
|
|
|
|
AC_SUBST(ZLIB_LIBS)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dnl
|
|
|
|
dnl Check for liblzo
|
|
|
|
dnl
|
|
|
|
AC_ARG_WITH(lzo,
|
2003-10-05 15:22:24 +00:00
|
|
|
[ --with-lzo-prefix=PFX Path to where the lzo library is installed],,
|
2003-10-04 10:17:39 +00:00
|
|
|
with_lzo_given=no)
|
|
|
|
|
|
|
|
LZO_CFLAGS=
|
|
|
|
LZO_LIBS=
|
|
|
|
if test "$with_lzo_prefix" != "yes" -a "$with_lzo_prefix" != ""; then
|
|
|
|
LZO_CFLAGS="-I$with_lzo_prefix/include"
|
|
|
|
LZO_LIBS="-L$with_lzo_prefix/lib"
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_CHECK_LIB(lzo, lzo1x_1_compress,
|
|
|
|
[ LZO_LIBS="$LZO_LIBS -llzo"
|
|
|
|
lzo_found=yes ],
|
|
|
|
[ lzo_found=no ],
|
|
|
|
"$LZO_LIBS")
|
|
|
|
if test "$lzo_found" = "no"; then
|
|
|
|
AC_MSG_ERROR([Could not find the lzo library])
|
|
|
|
fi
|
|
|
|
lzo_save_CFLAGS="$CFLAGS"
|
|
|
|
CFLAGS="$CFLAGS $LZO_CFLAGS"
|
|
|
|
AC_CHECK_HEADERS(lzo1x.h, , lzo_found=no)
|
|
|
|
CFLAGS="$lzo_save_CFLAGS"
|
|
|
|
|
|
|
|
AC_SUBST(LZO_CFLAGS)
|
|
|
|
AC_SUBST(LZO_LIBS)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dnl
|
|
|
|
dnl Check for libbz2
|
|
|
|
dnl
|
|
|
|
AC_ARG_WITH(bz2,
|
2003-10-05 15:22:24 +00:00
|
|
|
[ --with-bz2-prefix=PFX Path to where the bz2 library is installed],,
|
2003-10-04 10:17:39 +00:00
|
|
|
with_bz2_given=no)
|
|
|
|
|
|
|
|
BZ2_CFLAGS=
|
|
|
|
BZ2_LIBS=
|
|
|
|
if test "$with_bz2_prefix" != "yes" -a "$with_bz2_prefix" != ""; then
|
|
|
|
BZ2_CFLAGS="-I$with_bz2_prefix/include"
|
|
|
|
BZ2_LIBS="-L$with_bz2_prefix/lib"
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_CHECK_LIB(bz2, BZ2_bzCompress,
|
|
|
|
[ BZ2_LIBS="$BZ2_LIBS -lbz2"
|
|
|
|
bz2_found=yes ],
|
|
|
|
[ bz2_found=no ],
|
|
|
|
"$BZ2_LIBS")
|
|
|
|
if test "$bz2_found" = "no"; then
|
|
|
|
AC_MSG_ERROR([Could not find the bz2 library])
|
|
|
|
fi
|
|
|
|
bz2_save_CFLAGS="$CFLAGS"
|
|
|
|
CFLAGS="$CFLAGS $BZ2_CFLAGS"
|
|
|
|
AC_CHECK_HEADERS(bzlib.h, , bz2_found=no)
|
|
|
|
CFLAGS="$bz2_save_CFLAGS"
|
|
|
|
|
|
|
|
AC_SUBST(BZ2_CFLAGS)
|
|
|
|
AC_SUBST(BZ2_LIBS)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dnl
|
|
|
|
dnl Check for wxWindows
|
|
|
|
dnl
|
|
|
|
AC_MSG_CHECKING(for wxWindows)
|
|
|
|
if wx-config --cxxflags > /dev/null 2>&1; then
|
|
|
|
wxwversion=`wx-config --version`
|
|
|
|
wxwver_ok=`echo $wxwversion | sed 's;\.;\ ;g' | (read -a mver
|
|
|
|
if test ${mver[[0]]} -gt 2 ; then
|
|
|
|
wxwver_ok=1
|
|
|
|
elif test ${mver[[0]]} -lt 2 ; then
|
|
|
|
wxwver_ok=0
|
|
|
|
else
|
|
|
|
if test ${mver[[1]]} -ge 4 ; then
|
|
|
|
wxwver_ok=1
|
|
|
|
else
|
|
|
|
wxwver_ok=0
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
echo $wxwver_ok )`
|
|
|
|
|
|
|
|
if test "$wxwver_ok" = "1" ; then
|
|
|
|
if test "$MINGW" = "1" ; then
|
|
|
|
WXWINDOWS_CFLAGS=$(wx-config --cxxflags | sed 's;-I;-Ic:/cygwin;g')
|
|
|
|
WXWINDOWS_LDFLAGS=$(wx-config --ldflags | sed 's;-L;-Lc:/cygwin;g')
|
|
|
|
WXWINDOWS_LIBS=$(wx-config --libs | sed -e 's;-L;-Lc:/cygwin;g' -e 's; /usr/local/lib/libwx; c:/cygwin/usr/local/lib/libwx;g')
|
|
|
|
else
|
|
|
|
WXWINDOWS_CFLAGS=$(wx-config --cxxflags)
|
|
|
|
WXWINDOWS_LDFLAGS=$(wx-config --ldflags)
|
|
|
|
WXWINDOWS_LIBS=$(wx-config --libs)
|
|
|
|
fi
|
2003-10-05 15:22:24 +00:00
|
|
|
AC_DEFINE(HAVE_WXWINDOWS, 1, [Define if wxWindows is present])
|
2003-11-01 14:36:22 +00:00
|
|
|
MMG_SUBDIRS=mmg
|
2003-10-04 10:17:39 +00:00
|
|
|
AC_MSG_RESULT($wxwversion ok)
|
|
|
|
have_wxwindows=yes
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no: version $wxwversion is too old)
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no: wx-config was not found)
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_SUBST(WXWINDOWS_CFLAGS)
|
|
|
|
AC_SUBST(WXWINDOWS_LDFLAGS)
|
|
|
|
AC_SUBST(WXWINDOWS_LIBS)
|
2003-11-01 14:36:22 +00:00
|
|
|
AC_SUBST(MMG_SUBDIRS)
|
2003-09-13 13:01:26 +00:00
|
|
|
AM_CONDITIONAL(HAVE_WXWINDOWS, test x"$have_wxwindows" = "xyes")
|
|
|
|
|
2003-10-05 10:29:54 +00:00
|
|
|
|
2003-10-05 15:22:24 +00:00
|
|
|
dnl
|
|
|
|
dnl Option to use the (old) avilib library instead of the AVI classes
|
|
|
|
dnl
|
2003-10-08 13:51:08 +00:00
|
|
|
AC_ARG_WITH(avilib,
|
2003-10-26 21:18:33 +00:00
|
|
|
[ --with-avilib=version Which avilib should be used (noclasses, 0.6.10)],
|
2003-10-08 13:51:08 +00:00
|
|
|
with_avilib_given=yes, with_avilib_given=no)
|
|
|
|
|
2003-10-15 14:44:00 +00:00
|
|
|
AC_MSG_CHECKING(which AVI libraries to use)
|
|
|
|
# Defaults: use aviclasses and prefer the new avilib.
|
|
|
|
have_aviclasses=yes
|
2003-10-08 13:51:08 +00:00
|
|
|
if test "x$with_avilib_given" = "xyes"; then
|
2003-10-15 14:44:00 +00:00
|
|
|
set - `echo ${with_avilib} | sed 's/,/ /g'`
|
|
|
|
while test "x$1" != "x"; do
|
|
|
|
case "$1" in
|
|
|
|
noclasses)
|
|
|
|
have_aviclasses=no
|
|
|
|
;;
|
|
|
|
"0.6.10")
|
|
|
|
have_avilib0_6_10=yes
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo ""
|
|
|
|
echo "*** Unknown AVI library \"$1\" in \"${with_avilib}\". "
|
|
|
|
echo "*** Supported values are:"
|
|
|
|
echo "*** 0.6.10 - the new avilib with OpenDML support"
|
|
|
|
echo "*** noclasses - Do not use the AVI classes by Cyrius with "
|
|
|
|
echo "*** OpenDML support"
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
shift
|
|
|
|
done
|
2003-10-08 13:51:08 +00:00
|
|
|
fi
|
|
|
|
if test "x$have_aviclasses" = "xyes"; then
|
2003-10-05 15:22:24 +00:00
|
|
|
AC_DEFINE(HAVE_AVICLASSES, 1,
|
2003-10-08 13:51:08 +00:00
|
|
|
[Define if the newer AVIclasses should be used.])
|
2003-10-08 11:43:13 +00:00
|
|
|
AVICLASSES_LIBS="-laviclasses"
|
2003-10-11 10:26:52 +00:00
|
|
|
avi_libs_to_use="classes "
|
2003-10-05 15:22:24 +00:00
|
|
|
fi
|
2003-10-15 14:44:00 +00:00
|
|
|
if test "x$have_avilib0_6_10" = "xyes" -a "x$have_avilib" = "xyes"; then
|
|
|
|
echo ""
|
|
|
|
echo "*** You cannot include both the old avilib and the new"
|
|
|
|
echo "*** one (0.6.10)."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
if test "x$have_avilib" = "xyes"; then
|
|
|
|
avi_libs_to_use="${avi_libs_to_use}old "
|
|
|
|
else
|
2003-10-08 13:51:08 +00:00
|
|
|
AC_DEFINE(HAVE_AVILIB0_6_10, 1,
|
|
|
|
[Define if the newer avilib from transcode 0.6.10 should be used.])
|
2003-10-11 10:26:52 +00:00
|
|
|
avi_libs_to_use="${avi_libs_to_use}0.6.10 "
|
2003-10-26 09:31:30 +00:00
|
|
|
have_avilib0_6_10=yes
|
2003-10-08 13:51:08 +00:00
|
|
|
fi
|
|
|
|
AM_CONDITIONAL(HAVE_AVILIB, test x"$have_avilib0_6_10" != "xyes")
|
|
|
|
AM_CONDITIONAL(HAVE_AVILIB0_6_10, test x"$have_avilib0_6_10" == "xyes")
|
2003-10-08 11:43:13 +00:00
|
|
|
AM_CONDITIONAL(HAVE_AVICLASSES, test x"$have_aviclasses" = "xyes")
|
2003-10-05 15:22:24 +00:00
|
|
|
|
|
|
|
AVILIB_LIBS="-lavi"
|
|
|
|
|
2003-10-11 10:26:52 +00:00
|
|
|
AC_MSG_RESULT($avi_libs_to_use)
|
|
|
|
|
2003-10-04 10:17:39 +00:00
|
|
|
AC_SUBST(AVILIB_LIBS)
|
2003-10-05 10:29:54 +00:00
|
|
|
AC_SUBST(AVICLASSES_LIBS)
|
2003-10-04 10:17:39 +00:00
|
|
|
|
2003-10-05 15:22:24 +00:00
|
|
|
CFLAGS="-Wall -Wno-sign-compare -Wno-comment -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 @EXTRA_CFLAGS@ @OGG_CFLAGS@ @VORBIS_CFLAGS@ @DEBUG_CFLAGS@ @PROFILING_CFLAGS@ @MATROSKA_CFLAGS@ @EBML_CFLAGS@"
|
|
|
|
CXXFLAGS="-Wall -Wno-sign-compare -Wno-comment -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 @EXTRA_CFLAGS@ @OGG_CFLAGS@ @VORBIS_CFLAGS@ @DEBUG_CFLAGS@ @PROFILING_CFLAGS@ @MATROSKA_CFLAGS@ @EBML_CFLAGS@ @WXWINDOWS_CFLAGS@ @EXPAT_CFLAGS@ @ZLIB_CFLAGS@ @LZO_CFLAGS@ @BZ2_CFLAGS@"
|
2003-10-05 10:29:54 +00:00
|
|
|
CPPFLAGS="@EXTRA_CFLAGS@"
|
|
|
|
LDFLAGS="@EXTRA_LDFLAGS@"
|
2003-02-16 12:09:37 +00:00
|
|
|
|
2003-11-01 14:36:22 +00:00
|
|
|
AC_OUTPUT(Makefile avilib-0.6.10/Makefile aviclasses/Makefile src/Makefile src/common/Makefile src/input/Makefile src/output/Makefile src/mmg/Makefile doc/Makefile)
|