Added check for bzlib.

This commit is contained in:
Moritz Bunkus 2003-09-11 18:15:05 +00:00
parent 420818d9c9
commit 8509414a19
4 changed files with 79 additions and 3 deletions

View File

@ -774,3 +774,40 @@ AC_DEFUN(PATH_LZO,
AC_SUBST(LZO_CFLAGS)
AC_SUBST(LZO_LIBS)
])
AC_DEFUN(PATH_BZ2,
[ AC_ARG_WITH(bz2,
[ --with-bz2=PREFIX Path to where the bz2 library is installed],
, with_bz2_given=no)
BZ2_CFLAGS=
BZ2_LIBS=
if test "$with_bz2" != "yes" -a "$with_bz2" != ""; then
BZ2_CFLAGS="-I$with_bz2/include"
BZ2_LIBS="-L$with_bz2/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)
if test "$bz2_found" = "no"; then
AC_MSG_ERROR([Could not find bzlib.h])
fi
CFLAGS="$bz2_save_CFLAGS"
if test "x$bz2_found" = "xno"; then
exit 1
fi
AC_SUBST(BZ2_CFLAGS)
AC_SUBST(BZ2_LIBS)
])

View File

@ -774,3 +774,40 @@ AC_DEFUN(PATH_LZO,
AC_SUBST(LZO_CFLAGS)
AC_SUBST(LZO_LIBS)
])
AC_DEFUN(PATH_BZ2,
[ AC_ARG_WITH(bz2,
[ --with-bz2=PREFIX Path to where the bz2 library is installed],
, with_bz2_given=no)
BZ2_CFLAGS=
BZ2_LIBS=
if test "$with_bz2" != "yes" -a "$with_bz2" != ""; then
BZ2_CFLAGS="-I$with_bz2/include"
BZ2_LIBS="-L$with_bz2/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)
if test "$bz2_found" = "no"; then
AC_MSG_ERROR([Could not find bzlib.h])
fi
CFLAGS="$bz2_save_CFLAGS"
if test "x$bz2_found" = "xno"; then
exit 1
fi
AC_SUBST(BZ2_CFLAGS)
AC_SUBST(BZ2_LIBS)
])

View File

@ -22,12 +22,13 @@ PATH_WXWINDOWS()
PATH_EXPAT()
PATH_ZLIB()
PATH_LZO()
PATH_BZ2()
dnl Check for headers
AC_HEADER_STDC()
CFLAGS="-Wall -Wno-sign-compare -Wno-comment -I../src @OGG_CFLAGS@ @VORBIS_CFLAGS@ @AVILIB_CFLAGS@ @DEBUG_CFLAGS@ @PROFILING_CFLAGS@ @MATROSKA_CFLAGS@ @EBML_CFLAGS@"
CXXFLAGS="-Wall -Wno-sign-compare -Wno-comment -I../avilib -I.. @OGG_CFLAGS@ @VORBIS_CFLAGS@ @AVILIB_CFLAGS@ @DEBUG_CFLAGS@ @PROFILING_CFLAGS@ @MATROSKA_CFLAGS@ @EBML_CFLAGS@ @WXWINDOWS_CFLAGS@ @EXPAT_CFLAGS@ @ZLIB_CFLAGS@"
CXXFLAGS="-Wall -Wno-sign-compare -Wno-comment -I../avilib -I.. @OGG_CFLAGS@ @VORBIS_CFLAGS@ @AVILIB_CFLAGS@ @DEBUG_CFLAGS@ @PROFILING_CFLAGS@ @MATROSKA_CFLAGS@ @EBML_CFLAGS@ @WXWINDOWS_CFLAGS@ @EXPAT_CFLAGS@ @ZLIB_CFLAGS@ @LZO_CFLAGS@ @BZ2_CFLAGS@"
LDFLAGS=-L../avilib
AC_OUTPUT(Makefile avilib/Makefile src/Makefile doc/Makefile)

View File

@ -67,13 +67,14 @@ base64tool_SOURCES = base64tool.cpp \
mkvmerge_LDADD = @AVILIB_LIBS@ @PROFILING_LIBS@ \
@MATROSKA_LIBS@ @EBML_LIBS@ @VORBIS_LIBS@ @OGG_LIBS@ \
@ICONV_LIBS@ @MINGW_LIBS@ @EXPAT_LIBS@ @ZLIB_LIBS@ @LZO_LIBS@
@ICONV_LIBS@ @MINGW_LIBS@ @EXPAT_LIBS@ @ZLIB_LIBS@ @LZO_LIBS@ \
@BZ2_LIBS@
mkvinfo_LDADD = @PROFILING_LIBS@ @MATROSKA_LIBS@ @EBML_LIBS@ @ICONV_LIBS@ \
@WXWINDOWS_LIBS@ @MINGW_LIBS@
mkvextract_LDADD = @AVILIB_LIBS@ @PROFILING_LIBS@ @MATROSKA_LIBS@ @EBML_LIBS@ \
@VORBIS_LIBS@ @OGG_LIBS@ @ICONV_LIBS@ @LZO_LIBS@
@VORBIS_LIBS@ @OGG_LIBS@ @ICONV_LIBS@ @LZO_LIBS@ @BZ2_LIBS@
base64tool_LDADD = @EBML_LIBS@ @ICONV_LIBS@