I'm trying to write a test program to use in my configure.ac file which I process with autoconf 2.57.
I would like to create a check for testing the presence of the wxXml2 library which is based on turn on the wxWidgets library.
So I wrote in my configure.ac:
[...] AC_LANG(C++)
# MY CHECK
AC_MSG_CHECKING([for wxXml2 library...])
AC_LINK_IFELSE([AC_LANG_PROGRAM(
[[#include <wx/xml2.h>]],
[[wxXml2::Init();]])],
,
[AC_MSG_ERROR([wxXml2 wrapper library not found, see http://wxcode.sourceforge.net/components/wxxml2/index.html])])
[...]
however, the configure script fails because reading the CONFIG.LOG file, I can see that the test program generated by the AC_LANG_PROGRAM macro is compiled with the command line:
configure:3009: checking for wxXml2 library... configure:3028: g++ -o conftest -g -O2 conftest.cc -lxml2 -lgmp >&5
obviously the compilation fails because the test program needs to be compiled with some additional C flags (e.g. -I/usr/local/include, -L/usr/local/lib -lwx -lwxbaseXXXX .... ).
However, I could not find any way to modify the options used by autoconf to compile test programs.... how can I do that ?
Does anyone managed to make such thing or something similar ?
Thanks indeed, Francesco
_______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf