1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
|
--- configure.in.1.2.0 2008-02-02 14:29:37.000000000 +0000
+++ configure.in 2008-02-02 14:30:32.000000000 +0000
@@ -191,21 +191,46 @@
AC_CHECK_LIB(pthread, pthread_create, pthread_lib="-lpthread", :)
HAVE_OGG=no
-dnl first check through pkg-config
-dnl check for pkg-config itself so we don't try the m4 macro without pkg-config
-AC_CHECK_PROG(HAVE_PKG_CONFIG, pkg-config, yes)
-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
- dnl fall back to the old school test
- XIPH_PATH_OGG(, AC_MSG_ERROR(must have Ogg installed!))
- libs_save=$LIBS
- LIBS="$OGG_LIBS $VORBIS_LIBS"
- AC_CHECK_FUNC(oggpack_writealign, , AC_MSG_ERROR(Ogg >= 1.0 required !))
- LIBS=$libs_save
+
+dnl Audacity-specific code by dmazzoni:
+dnl If libogg is in the same parent directory and it has been
+dnl configured already, then we assume that libogg is going to
+dnl be built, too.
+AC_CHECK_FILE(../libogg/include/ogg/ogg.h,
+ ogg_h_available="yes",
+ ogg_h_available="no")
+
+AC_CHECK_FILE(../libogg/Makefile,
+ ogg_configured="yes",
+ ogg_configured="no")
+
+if test "x$ogg_configured" = "xyes" && test "x$ogg_h_available" = "xyes" ; then
+ echo "Using local libogg library from Audacity lib-src directory."
+
+ AC_SUBST(OGG_CFLAGS)
+ AC_SUBST(OGG_LIBS)
+
+ OGG_LIBS="-L../.. -logg"
+ LIBS="-L../.. -logg"
+ OGG_CFLAGS="-I../../libogg/include"
+
+else
+ dnl first check through pkg-config
+ dnl check for pkg-config itself so we don't try the m4 macro without pkg-config
+ AC_CHECK_PROG(HAVE_PKG_CONFIG, pkg-config, yes)
+ 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
+ dnl fall back to the old school test
+ XIPH_PATH_OGG(, AC_MSG_ERROR(must have Ogg installed!))
+ libs_save=$LIBS
+ LIBS="$OGG_LIBS $VORBIS_LIBS"
+ AC_CHECK_FUNC(oggpack_writealign, , AC_MSG_ERROR(Ogg >= 1.0 required !))
+ LIBS=$libs_save
+ fi
fi
dnl --------------------------------------------------
|