diff options
author | Stijn Buys <ingar@osirion.org> | 2013-12-15 19:04:10 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2013-12-15 19:04:10 +0000 |
commit | 232ec00456b96d65b11442819868e8e9e4a69367 (patch) | |
tree | 4998c8683e7b2764e9497b3ad735fafac8323c44 | |
parent | 4fad0180606df181447b7578bbc13e48465acd35 (diff) |
Improved autoconf library detection for static builds.
-rw-r--r-- | configure.ac | 14 |
1 files changed, 10 insertions, 4 deletions
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 --------------------------------------------------------------- |