summaryrefslogtreecommitdiff
path: root/devel/libcheck/files/patch-check.m4
blob: a8d6427cc07cf6104c557af7313199a108ef35b3 (plain) (blame)
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
--- check.m4.orig	2008-12-29 21:48:46.000000000 +0800
+++ check.m4	2009-01-07 09:02:41.452952376 +0800
@@ -21,8 +21,20 @@
       CHECK_CFLAGS="-I$with_check/include"
       CHECK_LIBS="-L$with_check/lib -lcheck"
     else
-      CHECK_CFLAGS=""
-      CHECK_LIBS="-lcheck"
+      for check_includedir in /usr/local/include /usr/local/include/check /usr/include $prefix/include
+      do
+        if test -e $check_includedir/check.h ; then
+          CHECK_CFLAGS="-I${check_includedir}"
+          break
+        fi
+      done
+      for check_libdir in /usr/local/lib /usr/local/lib/check /usr/lib $prefix/lib
+      do
+        if test -e $check_libdir/libcheck.a ; then
+          CHECK_LIBS="-L${check_libdir} -lcheck"
+          break
+        fi
+      done
     fi
 
     ac_save_CFLAGS="$CFLAGS"