4.2. AC_CHECK_LIB
- AC_CHECK_LIB checks for a presence of a symbol inside a library.
- It can run optional shell codes, (accepted as the third and fourth arguments) if it succeeds or fails.
- If it succeeds it will prepend -l[library] to compiler flags, and define the preprocessor macro HAVE_LIB[library].
- Examples:
AC_CHECK_LIB(m, pow) if test "x$requires_libavl" = "xyes" ; then AC_CHECK_LIB(avl, avl_create, [], [ echo "Error! You need to have libavl around." exit -1 ]) fi