]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Add a fallback test for ldns system library
authorTravis Cross <tc@traviscross.com>
Fri, 2 May 2014 18:06:42 +0000 (18:06 +0000)
committerTravis Cross <tc@traviscross.com>
Fri, 2 May 2014 18:22:20 +0000 (18:22 +0000)
Some systems don't have the pkg-config file, or don't have it in the
right place.  Breaking build on those systems does have the positive
effect of getting people to file bugs with those distros, but we
should at least keep things working on Debian wheezy while getting
Debian to accept the fix to ldns.

configure.ac

index 527fc1b739f7fb2efaa1d0b8bd3d973958157cb7..e1ba8b502e0acc00affba80110154d480e962cfb 100644 (file)
@@ -1136,7 +1136,10 @@ PKG_CHECK_MODULES([YAML], [yaml-0.1 >= 0.1.4],[
   AC_MSG_RESULT([no]); AM_CONDITIONAL([HAVE_YAML],[false])])
 PKG_CHECK_MODULES([LDNS], [libldns >= 1.6.6],[
   AM_CONDITIONAL([HAVE_LDNS],[true])],[
-  AC_MSG_RESULT([no]); AM_CONDITIONAL([HAVE_LDNS],[false])])
+  AC_CHECK_LIB([ldns], [ldns_str2rdf_a], [LDNS_LIBS=-lldns])
+  AS_IF([test -z "$LDNS_LIBS"],[
+    AC_MSG_RESULT([no]); AM_CONDITIONAL([HAVE_LDNS],[false])],[
+    AM_CONDITIONAL([HAVE_LDNS],[true])])])
 
 PKG_CHECK_MODULES([MEMCACHED], [libmemcached >= 0.31],[
   AM_CONDITIONAL([HAVE_MEMCACHED],[true])