aboutsummaryrefslogtreecommitdiff
path: root/m4/lib.m4
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2004-03-08 17:49:39 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2004-03-08 17:49:39 +0000
commit23030b10e3b9335ae5dc0384a2cb2890cf3685ac (patch)
treeca3e765a20e6da33cb24d1c9871987dd7e7ee756 /m4/lib.m4
parent1a63a918f80858a329f0312da04a6a2ea37011d0 (diff)
downloadellinika-23030b10e3b9335ae5dc0384a2cb2890cf3685ac.tar.gz
ellinika-23030b10e3b9335ae5dc0384a2cb2890cf3685ac.tar.bz2
New files
git-svn-id: file:///home/puszcza/svnroot/ellinika/trunk@27 941c8c0f-9102-463b-b60b-cd22ce0e6858
Diffstat (limited to 'm4/lib.m4')
-rw-r--r--m4/lib.m426
1 files changed, 26 insertions, 0 deletions
diff --git a/m4/lib.m4 b/m4/lib.m4
new file mode 100644
index 0000000..1ecb33c
--- /dev/null
+++ b/m4/lib.m4
@@ -0,0 +1,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 $3 -L$path -l$1"
+ AC_TRY_LINK_FUNC($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.