autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: usage of ac_check_header


From: Keith Marshall
Subject: Re: usage of ac_check_header
Date: Mon, 23 Jul 2007 20:55:40 +0100
User-agent: KMail/1.8.2

On Monday 23 July 2007 21:18, Joao Miguel Ferreira wrote:
> AC_CHECK_HEADER(libxml2/libxml/xpath.h libxml/xpath.h
> xpath.h,,AC_MSG_ERROR([cannot find headers for libxml2]))
>
> but ./configure always tells me the same:
>
> ...
> checking xpath.h usability... no
> checking xpath.h presence... no
> checking for xpath.h... no
> configure: error: cannot find headers for libxml2
>
> but I am quite sure the headers are there (I installed them: libxml
> and libxml-dev;); see bellow
>
> $ ls -la /usr/include/libxml2/libxml/ | grep xpath.h
> -rw-r--r-- 1 root root 16042 2006-10-26 22:23 xpath.h

Did you look in config.log, to see *why* the check is failing?

Are you sure that your compiler is searching /usr/include, as the 
default include path?

  # mkdir -p /usr/include/libxml2/libxml
  # touch /usr/include/libxml2/libxml/xpath.h

  $ cat > configure.ac
  AC_INIT
  AC_PROG_CC
  AC_CHECK_HEADER([libxml2/libxml/xpath.h],,
    [AC_MSG_ERROR([cannot find xml headers])])

  $ autoconf
  $ ./configure
  checking for gcc... gcc
  checking for C compiler default output file name... a.out
  checking whether the C compiler works... yes
  checking whether we are cross compiling... no
  checking for suffix of executables...
  checking for suffix of object files... o
  checking whether we are using the GNU C compiler... yes
  checking whether gcc accepts -g... yes
  checking for gcc option to accept ANSI C... none needed
  checking how to run the C preprocessor... gcc -E
  checking for egrep... grep -E
  checking for ANSI C header files... yes
  checking for sys/types.h... yes
  checking for sys/stat.h... yes
  checking for stdlib.h... yes
  checking for string.h... yes
  checking for memory.h... yes
  checking for strings.h... yes
  checking for inttypes.h... yes
  checking for stdint.h... yes
  checking for unistd.h... yes
  checking libxml2/libxml/xpath.h usability... yes
  checking libxml2/libxml/xpath.h presence... yes
  checking for libxml2/libxml/xpath.h... yes

HTH,
Keith.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]