Where does autoconf's AC_CHECK_HEADERS verify the header files?
Asked Answered
T

1

17

I am having trouble with compiling one of the open source libraries (libopekele OpenID lib).

The problem is I don't have sudo access on the system where I need to compile this.

Ran the configure. It complained of missing htmltidy lib. Installed the htmltidy at a non-standard path /home/geekgod (as I dont have access to the /usr and /usr/local).

Now the problem is how do I make the configure script of libopekele to pick the the headers from /home/geekgod/include.

Poking into the configure.ac script of libopkele, it is using AC_CHECK_HEADERS to search for tidy.h or tidy/tidy.h. I am pretty sure it is looking for these at standard location (/usr/include). How do I add /home/geekgod to the standard include dir?

Tiffanietiffanle answered 9/2, 2011 at 3:15 Comment(1)
To answer your question mechanically: AC_CHECK_HEADERS compiles a small test program, using the compiler for whichever language is selected by AC_LANG_PUSH and AC_LANG_POP (C is the default). This sees CPPFLAGS, which is how you pass additional search paths to the compiler.Astatine
E
23

try this:

./configure CPPFLAGS=-I/home/geekgod/include --prefix=... --etc
Emelun answered 9/2, 2011 at 3:22 Comment(2)
+1: You'll probably also want to add LDFLAGS=-L/home/geekgod/libGerson
Thanks guys, I required both LDFLAGS and CPPFLAGS to be set.Tiffanietiffanle

© 2022 - 2024 — McMap. All rights reserved.