From: Stan Seibert Date: Sun, 28 Oct 2001 02:41:08 +0000 (+0000) Subject: Updated macros to support new --with-ogg-{includes,libraries} options, as X-Git-Tag: v1.3.3~893 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a7cb669237862108658bd20a582c4faf03ce360c;p=platform%2Fupstream%2Flibvorbis.git Updated macros to support new --with-ogg-{includes,libraries} options, as well as rename --with-ogg-prefix to --with-ogg. This closes bug 65. svn path=/trunk/vorbis/; revision=2263 --- diff --git a/acinclude.m4 b/acinclude.m4 index 972757b..09c4aec 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -12,21 +12,29 @@ AC_DEFUN(AM_PATH_OGG, [dnl dnl Get the cflags and libraries dnl -AC_ARG_WITH(ogg-prefix,[ --with-ogg-prefix=PFX Prefix where libogg is installed (optional)], ogg_prefix="$withval", ogg_prefix="") +AC_ARG_WITH(ogg,[ --with-ogg=PFX Prefix where libogg is installed (optional)], ogg_prefix="$withval", ogg_prefix="") +AC_ARG_WITH(ogg-libraries,[ --with-ogg-libraries=DIR Directory where libogg library is installed (optional)], ogg_libraries="$withval", ogg_libraries="") +AC_ARG_WITH(ogg-includes,[ --with-ogg-includes=DIR Directory where libogg header files are installed (optional)], ogg_includes="$withval", ogg_includes="") AC_ARG_ENABLE(oggtest, [ --disable-oggtest Do not try to compile and run a test Ogg program],, enable_oggtest=yes) - if test "x$ogg_prefix" != "x"; then - ogg_args="$ogg_args --prefix=$ogg_prefix" - OGG_CFLAGS="-I$ogg_prefix/include" + if test "x$ogg_libraries" != "x" ; then + OGG_LIBS="-L$ogg_libraries" + elif test "x$ogg_prefix" != "x" ; then OGG_LIBS="-L$ogg_prefix/lib" - elif test "x$prefix" != "xNONE"; then - ogg_args="$ogg_args --prefix=$prefix" - OGG_CFLAGS="-I$prefix/include" + elif test "x$prefix" != "xNONE" ; then OGG_LIBS="-L$prefix/lib" fi OGG_LIBS="$OGG_LIBS -logg" + if test "x$ogg_includes" != "x" ; then + OGG_CFLAGS="-I$ogg_includes" + elif test "x$ogg_prefix" != "x" ; then + OGG_CFLAGS="-I$ogg_prefix/include" + elif test "$prefix" != "xNONE"; then + OGG_CFLAGS="-I$prefix/include" + fi + AC_MSG_CHECKING(for Ogg) no_ogg="" diff --git a/vorbis.m4 b/vorbis.m4 index 09a860b..9910dad 100644 --- a/vorbis.m4 +++ b/vorbis.m4 @@ -9,23 +9,32 @@ AC_DEFUN(AM_PATH_VORBIS, [dnl dnl Get the cflags and libraries dnl -AC_ARG_WITH(vorbis-prefix,[ --with-vorbis-prefix=PFX Prefix where libvorbis is installed (optional)], vorbis_prefix="$withval", vorbis_prefix="") +AC_ARG_WITH(vorbis,[ --with-vorbis=PFX Prefix where libvorbis is installed (optional)], vorbis_prefix="$withval", vorbis_prefix="") +AC_ARG_WITH(vorbis-libraries,[ --with-vorbis-libraries=DIR Directory where libvorbis library is installed (optional)], vorbis_libraries="$withval", vorbis_libraries="") +AC_ARG_WITH(vorbis-includes,[ --with-vorbis-includes=DIR Directory where libvorbis header files are installed (optional)], vorbis_includes="$withval", vorbis_includes="") AC_ARG_ENABLE(vorbistest, [ --disable-vorbistest Do not try to compile and run a test Vorbis program],, enable_vorbistest=yes) - if test "x$vorbis_prefix" != "x" ; then - vorbis_args="$vorbis_args --prefix=$vorbis_prefix" - VORBIS_CFLAGS="-I$vorbis_prefix/include" - VORBIS_LIBDIR="-L$vorbis_prefix/lib" + if test "x$vorbis_libraries" != "x" ; then + VORBIS_LIBS="-L$vorbis_libraries" + elif test "x$vorbis_prefix" != "x" ; then + VORBIS_LIBS="-L$vorbis_prefix/lib" elif test "x$prefix" != "xNONE"; then - vorbis_args="$vorbis_args --prefix=$prefix" - VORBIS_CFLAGS="-I$prefix/include" - VORBIS_LIBDIR="-L$prefix/lib" + VORBIS_LIBS="-L$prefix/lib" fi - VORBIS_LIBS="$VORBIS_LIBDIR -lvorbis -lm" + VORBIS_LIBS="$VORBIS_LIBS -lvorbis -lm" VORBISFILE_LIBS="-lvorbisfile" VORBISENC_LIBS="-lvorbisenc" + if test "x$vorbis_includes" != "x" ; then + VORBIS_CFLAGS="-I$vorbis_includes" + elif test "x$vorbis_prefix" != "x" ; then + VORBIS_CFLAGS="-I$vorbis_prefix/include" + elif test "x$prefix" != "xNONE"; then + VORBIS_CFLAGS="-I$prefix/include" + fi + + AC_MSG_CHECKING(for Vorbis) no_vorbis="" @@ -33,7 +42,7 @@ AC_ARG_ENABLE(vorbistest, [ --disable-vorbistest Do not try to compile an if test "x$enable_vorbistest" = "xyes" ; then ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" - CFLAGS="$CFLAGS $VORBIS_CFLAGS" + CFLAGS="$CFLAGS $VORBIS_CFLAGS $OGG_CFLAGS" LIBS="$LIBS $VORBIS_LIBS $OGG_LIBS" dnl dnl Now check if the installed Vorbis is sufficiently new.