aboutsummaryrefslogtreecommitdiff
path: root/am/lib.m4
diff options
context:
space:
mode:
Diffstat (limited to 'am/lib.m4')
-rw-r--r--am/lib.m426
1 files changed, 26 insertions, 0 deletions
diff --git a/am/lib.m4 b/am/lib.m4
new file mode 100644
index 0000000..73f3564
--- /dev/null
+++ b/am/lib.m4
@@ -0,0 +1,26 @@
1dnl Arguments:
2dnl $1 -- Library to look for
3dnl $2 -- Function to check in the library
4dnl $3 -- Any additional libraries that might be needed
5dnl $4 -- Action to be taken when test succeeds
6dnl $5 -- Action to be taken when test fails
7dnl $6 -- Directories where the library may reside
8AC_DEFUN([RA_CHECK_LIB],
9[
10 save_LIBS=$LIBS
11 AC_CACHE_CHECK([for -l$1], ra_cv_lib_$1,
12 [
13 for path in $6
14 do
15 LIBS="$save_LIBS -L$path"
16 AC_CHECK_LIB($1, $2,
17 [ra_cv_lib_$1="$3 -L$path -l$1"
18 break],
19 [ra_cv_lib_$1=no],$3)
20 done
21 ])
22 RA_RESULT_ACTIONS([ra_cv_lib_$1],[LIB$1],[$4],[$5])
23 LIBS=$save_LIBS
24])
25
26

Return to:

Send suggestions and report system problems to the System administrator.