[xiph-commits] r13670 - trunk/ezstream

moritz at svn.xiph.org moritz at svn.xiph.org
Fri Aug 31 08:55:16 PDT 2007


Author: moritz
Date: 2007-08-31 08:55:16 -0700 (Fri, 31 Aug 2007)
New Revision: 13670

Modified:
   trunk/ezstream/configure.in
Log:
Try harder to link against TagLib.


Modified: trunk/ezstream/configure.in
===================================================================
--- trunk/ezstream/configure.in	2007-08-31 11:49:43 UTC (rev 13669)
+++ trunk/ezstream/configure.in	2007-08-31 15:55:16 UTC (rev 13670)
@@ -192,22 +192,14 @@
 	LIBS="${TAGLIB_LIBS}"
 
 	AC_CHECK_HEADERS([taglib/tag_c.h], [
-			AC_MSG_CHECKING([whether TagLib works])
+			AC_MSG_CHECKING([whether libtag_c works])
 			AC_LINK_IFELSE(
 				[AC_LANG_PROGRAM([[#include <taglib/tag_c.h>]],
 					[[ taglib_set_string_management_enabled(0); ]])],
 				[
 				AC_MSG_RESULT([yes])
 				have_taglib=yes
-				], [
-				if test x"$require_taglib" = "xyes"; then
-					AC_MSG_RESULT([no])
-					AC_MSG_ERROR([Cannot link against libtag_c in ${taglib_prefix}/lib])
-				else
-					AC_MSG_RESULT([no])
-					AC_MSG_WARN([Error while linking against libtag_c in ${taglib_prefix}/lib, disabling support])
-				fi
-				]
+				], [AC_MSG_RESULT([no])]
 			)
 		], [
 			if test x"$require_taglib" = "xyes"; then
@@ -217,6 +209,29 @@
 			fi
 		])
 
+	dnl For static-only archs:
+	if test x"$have_taglib" = "xno" -a x"$ac_cv_header_taglib_tag_c_h" = "xyes"; then
+		AC_MSG_CHECKING([whether libtag_c works with -ltag -lstdc++ -lz (static arch)])
+		TAGLIB_LIBS="${TAGLIB_LIBS} -ltag -lstdc++ -lz"
+		LIBS="${TAGLIB_LIBS}"
+		AC_LINK_IFELSE(
+			[AC_LANG_PROGRAM([[#include <taglib/tag_c.h>]],
+				[[ taglib_set_string_management_enabled(0); ]])],
+			[
+			 AC_MSG_RESULT([yes])
+			 have_taglib=yes
+			], [
+			 if test x"$require_taglib" = "xyes"; then
+				AC_MSG_RESULT([no])
+				AC_MSG_ERROR([Cannot link against libtag_c in ${taglib_prefix}/lib])
+			 else
+				AC_MSG_RESULT([no])
+				AC_MSG_WARN([Error while linking against libtag_c in ${taglib_prefix}/lib, disabling support])
+			 fi
+			]
+		)
+	fi
+
 	CFLAGS="$ac_taglib_save_CFLAGS"
 	CPPFLAGS="$ac_taglib_save_CPPFLAGS"
 	LIBS="$ac_taglib_save_LIBS"



More information about the commits mailing list