[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
AC_CHECK_LIB and C++ classes
From: |
f18m_217828 |
Subject: |
AC_CHECK_LIB and C++ classes |
Date: |
Sat, 23 Apr 2005 20:22:37 +0200 |
User-agent: |
Mozilla Thunderbird 1.0.2 (Windows/20050317) |
Hi,
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
- AC_CHECK_LIB and C++ classes,
f18m_217828 <=