From dc54bd68824c0911e85799490920c7feb54f05ed Mon Sep 17 00:00:00 2001 From: conrad Date: Thu, 7 Oct 2004 16:28:40 +0000 Subject: [PATCH] Applied patch from Erik de Castro Lopo. Now builds on MingGW: * add pkg-config check for Ogg * add vorbis and speex CFLAGS to various Makefile.am's git-svn-id: http://svn.annodex.net/liboggz/trunk@601 8158c8cd-e7e1-0310-9fa4-c5954c97daef --- configure.ac | 17 +++++++++++++---- src/examples/Makefile.am | 2 +- src/tests/Makefile.am | 2 +- src/tools/Makefile.am | 2 +- 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/configure.ac b/configure.ac index 22b99e2..02e9b2b 100644 --- a/configure.ac +++ b/configure.ac @@ -35,6 +35,8 @@ AC_TYPE_SIZE_T AC_FUNC_REALLOC AC_CHECK_FUNCS([memmove random]) +# Check for pkg-config +AC_CHECK_PROG(HAVE_PKG_CONFIG, pkg-config, yes) # Check for doxygen AC_CHECK_PROG(HAVE_DOXYGEN, doxygen, true, false) @@ -160,11 +162,18 @@ dnl Detect Ogg dnl HAVE_OGG=no -XIPH_PATH_OGG(HAVE_OGG="yes", HAVE_OGG="no") -if test "x$HAVE_OGG" = xno ; then - oggz_config_ok="no" - AC_CHECK_LIB(ogg, ogg_stream_init, HAVE_OGG="maybe") +if test "x$HAVE_PKG_CONFIG" = "xyes" ; then + PKG_CHECK_MODULES(OGG, ogg >= 1.0, HAVE_OGG=yes, HAVE_OGG=no) fi + +if test "x$HAVE_OGG" = "xno" ; then + XIPH_PATH_OGG(HAVE_OGG="yes", HAVE_OGG="no") + if test "x$HAVE_OGG" = xno ; then + oggz_config_ok="no" + AC_CHECK_LIB(ogg, ogg_stream_init, HAVE_OGG="maybe") + fi +fi + AM_CONDITIONAL(HAVE_OGG, [test "x$HAVE_OGG" = "xyes"]) # Checks for header files. diff --git a/src/examples/Makefile.am b/src/examples/Makefile.am index aeaac60..795f036 100644 --- a/src/examples/Makefile.am +++ b/src/examples/Makefile.am @@ -2,7 +2,7 @@ AM_CFLAGS = -Wall -pedantic -g -INCLUDES = -I$(top_srcdir)/include +INCLUDES = -I$(top_srcdir)/include @OGG_CFLAGS@ OGGZDIR = ../liboggz OGGZ_LIBS = $(OGGZDIR)/liboggz.la @OGG_LIBS@ diff --git a/src/tests/Makefile.am b/src/tests/Makefile.am index c11357d..3150d80 100644 --- a/src/tests/Makefile.am +++ b/src/tests/Makefile.am @@ -2,7 +2,7 @@ AM_CFLAGS = -Wall -pedantic -INCLUDES = -I$(top_srcdir)/include +INCLUDES = -I$(top_srcdir)/include @OGG_CFLAGS@ OGGZDIR = ../liboggz OGGZ_LIBS = $(OGGZDIR)/liboggz.la @OGG_LIBS@ diff --git a/src/tools/Makefile.am b/src/tools/Makefile.am index f83209c..b73e07a 100644 --- a/src/tools/Makefile.am +++ b/src/tools/Makefile.am @@ -6,7 +6,7 @@ EXTRA_DIST = oggzdiff bin_SCRIPTS = oggzdiff -INCLUDES = -I$(top_srcdir)/include +INCLUDES = -I$(top_srcdir)/include @OGG_CFLAGS@ OGGZDIR = ../liboggz OGGZ_LIBS = $(OGGZDIR)/liboggz.la @OGG_LIBS@ -- GitLab