check for getopt.h, and make libvorbisfile depend on libvorbis

This commit is contained in:
Ron Pedde 2005-02-28 21:49:23 +00:00
parent cde5f4c917
commit f4e8bc9625

View File

@ -140,7 +140,7 @@ AC_ARG_WITH(id3tag,
fi fi
]) ])
AC_CHECK_HEADERS(getopt.h,,)
AC_CHECK_HEADERS(gdbm.h,, [ AC_CHECK_HEADERS(gdbm.h,, [
AC_MSG_ERROR([gdbm.h not found... try --with-gdbm-includes=dir])]) AC_MSG_ERROR([gdbm.h not found... try --with-gdbm-includes=dir])])
AC_CHECK_LIB(gdbm,gdbm_open,echo "Have gdbm", echo "Must have gdbm";exit) AC_CHECK_LIB(gdbm,gdbm_open,echo "Have gdbm", echo "Must have gdbm";exit)
@ -170,36 +170,34 @@ else
fi fi
CFLAGS=$oldcflags CFLAGS=$oldcflags
echo USE_OGGVORBIS is $use_oggvorbis
if test x$use_oggvorbis = xtrue; then if test x$use_oggvorbis = xtrue; then
AC_CHECK_HEADERS(ogg/ogg.h,, [ AC_CHECK_HEADERS(ogg/ogg.h,, [
AC_MSG_ERROR([ogg/ogg.h not found... Must have libogg installed for Ogg/Vorbis support])]) AC_MSG_ERROR([ogg/ogg.h not found... Must have libogg installed for Ogg/Vorbis support])])
AC_CHECK_LIB(ogg,ogg_sync_init,echo "Have ogg",echo "Must have libogg for Ogg/Vorbis support";exit) AC_CHECK_LIB(ogg,ogg_sync_init,,echo "Must have libogg for Ogg/Vorbis support";exit)
if test x"$STATIC_LIBS" != x"no"; then if test x"$STATIC_LIBS" != x"no"; then
LDFLAGS="${LDFLAGS} ${STATIC_LIBS}/libogg.a" LDFLAGS="${LDFLAGS} ${STATIC_LIBS}/libogg.a"
echo "Adding static libogg"
else else
LDFLAGS="${LDFLAGS} -logg" LDFLAGS="${LDFLAGS} -logg"
echo "Adding dynamic libogg"
fi fi
AC_CHECK_HEADERS(vorbis/codec.h,, [ AC_CHECK_HEADERS(vorbis/codec.h,, [
AC_MSG_ERROR([vorbis/codec.h not found... Must have libvorbis installed for Ogg/Vorbis support])]) AC_MSG_ERROR([vorbis/codec.h not found... Must have libvorbis installed for Ogg/Vorbis support])])
AC_CHECK_LIB(vorbis,vorbis_info_init,echo "Have vorbis",echo "Must have libvorbis for Ogg/Vorbis support";exit) AC_CHECK_LIB(vorbis,vorbis_info_init,,echo "Must have libvorbis for Ogg/Vorbis support";exit)
AC_CHECK_LIB(vorbisfile,ov_open,echo "Have vorbisfile",echo "Must have libvorbisfile for Ogg/Vorbis support";exit)
if test x"$STATIC_LIBS" != x"no"; then if test x"$STATIC_LIBS" != x"no"; then
LDFLAGS="${LDFLAGS} ${STATIC_LIBS}/libvorbis.a ${STATIC_LIBS}/libvorbisfile.a" LDFLAGS="${LDFLAGS} ${STATIC_LIBS}/libvorbis.a"
echo "Adding static libvorbis"
else else
LDFLAGS="${LDFLAGS} -lvorbis -lvorbisfile" LDFLAGS="${LDFLAGS} -lvorbis"
echo "Adding dynamic libvorbis"
fi
fi fi
echo USE_FLAC is $use_flac AC_CHECK_LIB(vorbisfile,ov_open,,echo "Must have libvorbisfile for Ogg/Vorbis support";exit)
if test x"$STATIC_LIBS" != x"no"; then
LDFLAGS="${LDFLAGS} ${STATIC_LIBS}/libvorbisfile.a"
else
LDFLAGS="${LDFLAGS} -lvorbisfile"
fi
fi
if test x$use_flac = xtrue; then if test x$use_flac = xtrue; then
AC_CHECK_HEADERS(FLAC/metadata.h,, [ AC_CHECK_HEADERS(FLAC/metadata.h,, [
@ -208,10 +206,8 @@ if test x$use_flac = xtrue; then
if test x"$STATIC_LIBS" != x"no"; then if test x"$STATIC_LIBS" != x"no"; then
LDFLAGS="${LDFLAGS} ${STATIC_LIBS}/libFLAC.a" LDFLAGS="${LDFLAGS} ${STATIC_LIBS}/libFLAC.a"
echo "Adding static libFLAC"
else else
LDFLAGS="${LDFLAGS} -lFLAC" LDFLAGS="${LDFLAGS} -lFLAC"
echo "Adding dynamic libFLAC"
fi fi
fi fi