From 232ec00456b96d65b11442819868e8e9e4a69367 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 15 Dec 2013 19:04:10 +0000 Subject: Improved autoconf library detection for static builds. --- configure.ac | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 4e607e0..f2a8a84 100644 --- a/configure.ac +++ b/configure.ac @@ -376,8 +376,8 @@ else dnl libpng dnl - LD_FLAGS_save="$LD_FLAGS" - LD_FLAGS="$LD_FLAGS $LIBZ_LIBS" + LIBS_save="$LIBS" + LIBS="$LIBZ_LIBS" AC_CHECK_HEADER(png.h, [], @@ -388,7 +388,7 @@ else [AC_MSG_ERROR([libpng not found])] ) - LD_FLAGS="$LD_FLAGS_save" + LIBS="$LIBS_save" LIBPNG_LIBS="-lpng" AC_SUBST(LIBPNG_LIBS) @@ -411,6 +411,10 @@ else dnl --------------------------------------------------------------- dnl Ogg Vorbis dnl + + LIBS_save="$LIBS" + LIBS="$LIBS -lvorbis -l ogg" + AC_CHECK_HEADER(vorbis/vorbisfile.h, [], [AC_MSG_ERROR([vorbis/vorbisfile.h not found])] @@ -425,7 +429,9 @@ else AC_DEFINE_UNQUOTED(HAVE_VORBISFILE, 1, [Define this if you have libvorbisfile]), AC_MSG_ERROR([libvorbisfile not found]) ) - LIBVORBISFILE_LIBS="-lvorbisfile" + + LIBS="$LIBS_SAVE" + LIBVORBISFILE_LIBS="-lvorbisfile -lvorbis -logg" AC_SUBST(LIBVORBISFILE_LIBS) dnl --------------------------------------------------------------- -- cgit v1.2.3