summaryrefslogtreecommitdiff
path: root/ogg.m4
diff options
context:
space:
mode:
Diffstat (limited to 'ogg.m4')
-rw-r--r--ogg.m422
1 files changed, 15 insertions, 7 deletions
diff --git a/ogg.m4 b/ogg.m4
index bf29606..de8c161 100644
--- a/ogg.m4
+++ b/ogg.m4
@@ -9,21 +9,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_libraries="$withval", ogg_libraries="")
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"
+ if 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=""