aboutsummaryrefslogtreecommitdiff
path: root/m4/lib.m4
blob: 73f3564136e92747097d18952ad9b0e92d916b70 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
dnl Arguments:
dnl   $1     --    Library to look for
dnl   $2     --    Function to check in the library
dnl   $3     --    Any additional libraries that might be needed
dnl   $4     --    Action to be taken when test succeeds
dnl   $5     --    Action to be taken when test fails
dnl   $6     --    Directories where the library may reside
AC_DEFUN([RA_CHECK_LIB],
[
  save_LIBS=$LIBS
  AC_CACHE_CHECK([for -l$1], ra_cv_lib_$1,
  [
   for path in $6
   do
      LIBS="$save_LIBS -L$path"
      AC_CHECK_LIB($1, $2,
                   [ra_cv_lib_$1="$3 -L$path -l$1"
                    break],
                   [ra_cv_lib_$1=no],$3)
   done
  ])
  RA_RESULT_ACTIONS([ra_cv_lib_$1],[LIB$1],[$4],[$5])
  LIBS=$save_LIBS
])


Return to:

Send suggestions and report system problems to the System administrator.