[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AC_CHECK_LIB(foo, main, ...

From: Bob Friesenhahn
Subject: AC_CHECK_LIB(foo, main, ...
Date: Sun, 2 Feb 2003 22:43:43 -0600 (CST)

Libtool's libtool.m4 contains a number of tests similar to

AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")

I assume that this is intended to simply verify that the library
exists by linking against it, but not actually testing for a function.
The test program produced looks like:

main ()
main ();
  return 0;

Unfortunately, I am informed that both SUN's CC and SGI's CC warn
about the recursive call to main(), and the tests fail.  It seems that
this is a poor shorthand to use.  A more reliable means would be to
test a function which is known to exist in the library being tested.

Bob Friesenhahn

reply via email to

[Prev in Thread] Current Thread [Next in Thread]