use autoconf macros for determining xml2 and xmlccwrap linking
authorFelix Domke <tmbinc@elitedvb.net>
Sun, 4 Nov 2007 23:06:36 +0000 (23:06 +0000)
committerFelix Domke <tmbinc@elitedvb.net>
Sun, 4 Nov 2007 23:06:36 +0000 (23:06 +0000)
configure.ac
main/Makefile.am

index fb9860c..a184fe8 100644 (file)
@@ -37,6 +37,12 @@ AC_CHECK_LIB(ungif, DGifOpenFileName, HAVE_LIBUNGIF="yes", HAVE_LIBUNGIF="no")
 LIBUNGIF_LIBS="-lungif"
 AC_SUBST(LIBUNGIF_LIBS)
 
+TUXBOX_APPS_LIB_PKGCONFIG(XML2,libxml-2.0)
+
+# ok, we are in trouble: XMLCCWRAP only defines C++ symbols. So let's just check if linking works,
+# and assume everything will be ok. Then just check for the "exit" symbol, which should be always there.
+TUXBOX_APPS_LIB_SYMBOL(XMLCCWRAP, xmlccwrap, exit)
+
 if test "$withsdl" = "yes" ; then
        TUXBOX_APPS_LIB_CONFIG(SDL,sdl-config)
        AC_DEFINE_UNQUOTED([WITH_SDL],[$withsdl],[With SDL])
index 42b0e01..9bc728a 100644 (file)
@@ -46,7 +46,9 @@ enigma2_LDADD = \
        @GSTREAMER_LIBS@ \
        @JPEG_LIBS@ \
        @LIBUNGIF_LIBS@ \
-       -ldl -lpthread -lcrypt -lresolv -lxml2 -lxmlccwrap
+       @XML2_LIBS@ \
+       @XMLCCWRAP_LIBS@ \
+       -ldl -lpthread -lcrypt -lresolv
 
 enigma2$(EXEEXT): $(enigma2_OBJECTS) $(enigma2_DEPENDENCIES) $(enigma2_LDADD_WHOLE)
 #      @rm -f enigma2$(EXEEXT)