[redland-dev] header file nanohttp.h not found during configure
Klaus Heinz
k.heinz.mai.sieben at kh-22.de
Mon May 14 19:48:51 BST 2007
Hi,
updating the raptor package to the latest version 1.4.15 I noticed that
libxml/nanohttp.h could not be found by configure:
...
checking curl/curl.h usability... yes
checking curl/curl.h presence... yes
checking for curl/curl.h... yes
checking libxml/nanohttp.h usability... no
checking libxml/nanohttp.h presence... no
checking for libxml/nanohttp.h... no
...
checking for xml2-config... xml2-config
checking for xslt-config... xslt-config
checking for curl-config... curl-config
...
checking for system (GNOME) libxml library... yes - version 2.6.26
checking libxml/parser.h usability... yes
checking libxml/parser.h presence... yes
checking for libxml/parser.h... yes
checking for libxml/hash.h... yes
checking for libxml/SAX2.h... yes
checking if libxml xmlEntity has name_length field... no
checking if libxml xmlEntity has etype field... yes
checking if libxml xmlSAXHandler has initialized field... yes
checking if libxml xmlSAXHandler has externalSubset field... yes
checking for xmlSAX2InternalSubset... yes
checking for xmlCtxtUseOptions... yes
...
libxml2 was installed including header files. Looking at config.log and
configure/configure.ac revealed that the check for libxml/nanohttp.h was
done without using xml2-config to get the path for header files, so I
guessed moving the check for libxml/nanohttp.h to a more appopriate
place would be better. The same reasoning applies to curl/curl.h,
although it did not fail for me in this case.
Please review the appended patch for configure.ac. Tested on NetBSD 3.1
and Debian Sarge.
ciao
Klaus
-------------- next part --------------
$NetBSD$
--- configure.ac.orig 2007-02-01 07:57:00.000000000 +0100
+++ configure.ac
@@ -176,7 +176,7 @@ MAINTAINER_CFLAGS="$warning_cflags"
dnl Checks for header files.
AC_HEADER_STDC
-AC_CHECK_HEADERS(errno.h stdlib.h unistd.h string.h limits.h dmalloc.h getopt.h sys/stat.h curl/curl.h libxml/nanohttp.h sys/param.h sys/time.h)
+AC_CHECK_HEADERS(errno.h stdlib.h unistd.h string.h limits.h dmalloc.h getopt.h sys/stat.h sys/param.h sys/time.h)
AC_HEADER_TIME
dnl FreeBSD fetch.h needs stdio.h and sys/param.h first
AC_CHECK_HEADERS(fetch.h,,,
@@ -536,6 +536,7 @@ if test "X$XML_CONFIG" != X; then
AC_MSG_RESULT(no)
fi
+ AC_CHECK_HEADERS(libxml/nanohttp.h)
AC_CHECK_HEADERS(libxml/parser.h)
AC_CHECK_HEADERS(libxml/hash.h libxml/SAX2.h,,,
[#ifdef HAVE_LIBXML_PARSER_H
@@ -867,8 +868,12 @@ need_libcurl=0
need_libxml_www=0
need_libfetch=0
-oCPPFLAGS="$CPPFLAGS"
if test "X$CURL_CONFIG" != X; then
+ oCPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS `$CURL_CONFIG --cflags`"
+ AC_CHECK_HEADERS(curl/curl.h)
+ CPPFLAGS="$oCPPFLAGS"
+
oLIBS="$LIBS"
LIBS="$LIBS `$CURL_CONFIG --libs`"
AC_CHECK_FUNC(curl_easy_init, have_curl_easy_init=yes, have_curl_easy_init=no)
More information about the redland-dev
mailing list