From 899cc1d3938f12d42734ca816b746d93a8ceb798 Mon Sep 17 00:00:00 2001 From: moritz Date: Sat, 1 Aug 2009 16:08:45 +0000 Subject: [PATCH] Give it a chance to link statically. git-svn-id: https://svn.xiph.org/trunk/ezstream@16380 0101bb08-14d6-0310-b084-bc0e0c8e3800 --- m4/libshout.m4 | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/m4/libshout.m4 b/m4/libshout.m4 index c25f5e4..e5914ad 100644 --- a/m4/libshout.m4 +++ b/m4/libshout.m4 @@ -155,7 +155,8 @@ if test -n "$1" -a x"${ax_check_libshout_shout_pc}" = "xyes"; then fi libshout_libs_autodetect=no -if test -z "${LIBSHOUT_LIBS}"; then +if test -z "${LIBSHOUT_LIBS}" \ + -a x"${ax_check_libshout_shout_pc}" = "xyes"; then LIBSHOUT_LIBS="`${PKG_CONFIG} --libs-only-l shout`" libshout_libs_autodetect=yes fi @@ -195,6 +196,27 @@ AC_CHECK_HEADER([shout/shout.h], ], [ AC_MSG_RESULT([no]) + if test x"${libshout_libs_autodetect}" = "xyes"; then + LIBSHOUT_LIBS="`${PKG_CONFIG} --static --libs-only-l shout`" + LIBS="${LIBSHOUT_LIBS} ${ax_check_libshout_save_LIBS}" + AC_MSG_CHECKING([if libshout works with explicit dependencies]) + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[ + #include + ]], + [[ + shout_new(); + ]])], + [ + AC_MSG_RESULT([yes]) + local_cv_have_lib_libshout=yes + ], + [ + AC_MSG_RESULT([no]) + ] + ) + fi ] ) ])