1 |
+ |
dnl We need a function similar to AC_CHECK_LIB to check for C++ libraries. |
2 |
+ |
dnl AC_CHECK_CXX_LIB provides a similar interface like AC_CHECK_LIB |
3 |
+ |
dnl and uses AC_TRY_LINK. |
4 |
|
dnl |
5 |
+ |
dnl $1 library name (without "-l") |
6 |
+ |
dnl $2 object name to check for |
7 |
+ |
dnl $3 neccessary include directive(s) |
8 |
+ |
dnl $4 command to create object $2 |
9 |
+ |
dnl $5 yes-action |
10 |
+ |
dnl $6 no-action |
11 |
+ |
dnl $7 include dir for $3 (with -I) |
12 |
+ |
dnl $8 additional libraries to link with |
13 |
+ |
|
14 |
+ |
AC_DEFUN(AC_CHECK_CXX_LIB, AC_MSG_CHECKING([for $2 in -l$1]) |
15 |
+ |
save_CXXFLAGS_CHECK_CXX_LIB="$CXXFLAGS" |
16 |
+ |
CXXFLAGS="$CXXFLAGS $7" |
17 |
+ |
save_LIBS_CHECK_CXX_LIB="$LIBS" |
18 |
+ |
LIBS="-l$1 $8 $LIBS" |
19 |
+ |
[AC_TRY_LINK([$3], [$4], [AC_MSG_RESULT([yes]) |
20 |
+ |
$5], [AC_MSG_RESULT([no]) |
21 |
+ |
$6])] |
22 |
+ |
CXXFLAGS="$save_CXXFLAGS_CHECK_CXX_LIB" |
23 |
+ |
LIBS="$save_LIBS_CHECK_CXX_LIB")dnl |
24 |
+ |
dnl |
25 |
|
dnl AC_CHECK_MODSUFFIX |
26 |
|
dnl |
27 |
|
AC_DEFUN([AC_CHECK_MODSUFFIX],[ |