summaryrefslogtreecommitdiffstats
path: root/aclocal.m4
diff options
context:
space:
mode:
Diffstat (limited to 'aclocal.m4')
-rw-r--r--aclocal.m411
1 files changed, 10 insertions, 1 deletions
diff --git a/aclocal.m4 b/aclocal.m4
index 7b89b4b2..fadd44eb 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -90,7 +90,16 @@ AC_DEFUN( AC_SEARCH_LIB,
ac_lib_found=no
for p in $3; do
- LDFLAGS="-L$p -l$1"
+ test -d $p || continue;
+
+ # Check for libtool library
+ if test -f $p/lib$1.la; then
+ path=$p/.libs
+ else
+ path=$p
+ fi
+
+ LDFLAGS="-L$path -l$1"
AC_TRY_LINK_FUNC($2,
[
LIBS="$LIBS -L$p -l$1"