Commit 21e18b4c authored by Sandrine Avakian's avatar Sandrine Avakian

Fixing spandsp error host include and/or library paths were used

Using pkgconfig to check for libxml2, adding a patch for configure.ac
parent b4d9092f
--- a/configure.ac 2016-10-14 12:14:39.000000000 +0200
+++ b/configure.ac 2016-10-14 14:17:47.000000000 +0200
@@ -19,6 +19,9 @@
# @start 1
AC_INIT
+AC_PREREQ(2.63)
+AC_CONFIG_MACRO_DIR([m4])
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
m4_include(config/ax_compiler_vendor.m4)
m4_include(config/ax_check_real_file.m4)
@@ -213,30 +216,13 @@
fi
# Determine XML2 include path
-AC_MSG_CHECKING(for libxml/xmlmemory.h)
-
-# Can we include headers using system include dirs?
-AC_TRY_COMPILE([#include <libxml/xmlmemory.h>], [int a = 1;],
- XML2_INCLUDE=" ",
- XML2_INCLUDE=
-)
-
-# Hunt through several possible directories to find the includes for libxml2
-if test "x$XML2_INCLUDE" = "x"; then
- old_CPPFLAGS="$CPPFLAGS"
- for i in $xml2_include_dir /usr/include /usr/local/include /usr/include/libxml2 /usr/local/include/libxml2 ; do
- CPPFLAGS="$old_CPPFLAGS -I$i"
- AC_TRY_COMPILE([#include <libxml/xmlmemory.h>], [int a = 1;],
- XML2_INCLUDE="-I$i",
- XML2_INCLUDE=
- )
- if test "x$XML2_INCLUDE" != "x"; then
- break;
- fi
- done
- CPPFLAGS="$old_CPPFLAGS $XML2_INCLUDE"
+dnl check libxml2
+PKG_CHECK_MODULES(LIBXML2, [libxml-2.0] ,[libxml2_found=yes] ,foo=bar)
+if test "$libxml2_found" != "yes" ; then
+ AC_MSG_WARN([libxml2 not found. Disabling cache.])
+else
+ AC_DEFINE(HAVE_LIBXML2,1,[defined when libxml2 is available])
fi
-
AC_CHECK_HEADERS([libxml/xmlmemory.h])
AC_CHECK_HEADERS([libxml/parser.h])
AC_CHECK_HEADERS([libxml/xinclude.h])
\ No newline at end of file
......@@ -15,10 +15,12 @@ SECTION = "libs"
LICENSE = "LGPL"
DEPENDS_${PN} = "tiff libxml2"
inherit autotools
inherit autotools pkgconfig
#PARALLEL_MAKE = ""
SRC_URI[md5sum] = "98330bc00a581ed8d71ebe34afabbcf9"
SRC_URI[sha256sum] = "835cd886105e4e39791f0e8cfe004c39b069f2e6dcb0795a68a6c79b5d14af2c"
LIC_FILES_CHKSUM = "file://COPYING;md5=8791c23ddf418deb5be264cffb5fa6bc"
FILESEXTRAPATHS_prepend := "${THISDIR}/files/:"
SRC_URI += "file://configure.patch"
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment