
To allow the autoconf tools (ie configure) to detect the presence of the various Boost libs and header file versions, would it be possible to add a C-linkage function to each libraries' source file(s). This would allow users to add a configure check which detects if a particular library instance is installed. For example, we add the following code to each library instance:
extern "C" boost_autoconf() {}
This allows autoconf users to add a test to their configure.in script:
AC_CHECK_LIB(boost_regex,boost_autoconf,...,[Boost::Regex library not found])
I don't see why you need a function with C linkage for this to work. The behavior of autoconf depends on the current language specified in configure.ac at the point where you call AC_CHECK_LIB. If that language is C++, you should well be able to test for functions with C++ linkage. See http://www.gnu.org/software/autoconf/manual/autoconf-2.57/html_chapter/autoc...
Yeah - thats what I'm trying to do. Specifically, I'm trying to detect if "libboost_regex..." is installed, so I have the following: AC_CHECK_LIB(boost_regex-gcc,<somefunc>,,AC_ERROR([Must have the Boost::Regex library installed]) Now the problem is, 'What do I put in for <somefunc>?' All other C++ libraries I have used, specifically contain a C-linkage function to allow configure to detect it. regards, Mathew Robertson