|
From: Christophe Prud'h. <pru...@MI...> - 2000-07-27 20:56:24
|
Hi,
lots of Linux projects use autoconf out there
so being able to check corelinux existence using autoconf
would be nice. Unfortunately autoconf doesn't support well
C++ in the sense that to check libs it uses a m4 macro
AC_CHECK_LIB this way
AC_CHECK_LIB(cl++, ACCheckCoreLinux,[
CXXFLAGS="${CXXFLAGS} -I/usr/include/corelinux"
LDFLAGS="${LDFLAGS} "
LIBS="${LIBS} -lcl++"
],[
echo "You need to install corelinux. see http://corelinux.sourceforge.net"
exit;
],)
where cl++ is corelinux lib and ACCheckCoreLinux some symbol to check in cl++
but the c++ mangler won't create the symbol ACCheckCoreLinux(more likely
ACCheckCoreLinux__Fv) and AC_CHECK_LIB will create a C program
char ACCheckCoreLinux();
int main() {
ACCheckCoreLinux()
; return 0; }
and the above test will fail :(
that is bad !
So people have to create their own checking m4 macros for corelinux
or bypass the checking of corelinux existence.
We can help them by proving this symbol in corelinux
by defining this dummy function using extern "C"
extern "C" {
int
ACCheckCoreLinux()
{
return 1;
}
and put it in libcl++
and yes it should be documented in the Developper manual
so that any autoconf user will be very happy. (see the macro above)
well I have already done it in my cvs copy.
comments?
it seems I like long mails recently :)
C.
--
Christophe Prud'homme |
MIT, 77, Mass Ave, Rm 3-243 | He that breaks a thing to find out
Cambridge MA 02139 | what it is has left the path of wisdom.
Tel (Office) : (00 1) (617) 253 0229 | -- J.R.R. Tolkien
Fax (Office) : (00 1) (617) 258 8559 |
http://augustine.mit.edu/~prudhomm |
Following the hacker spirit
|