ports/devel/libcheck/files/patch-check.m4
Sean Chittenden 90862d3405 Update libcheck (C unit testing library) to 0.9.3. Port changes
include:

*) Update check.m4 to search for libraries and headers in /usr/local/*
   and $prefix/*.  Ports/programs that use libcheck now work with the
   configure arg `--with-check` without needing to specify the
   location as an argument.  Someone with more autofoo may want to
   review this.  Patch submitted upstream.
*) Removed incorporated patches.
*) Installing docs and examples in their proper location.
*) Removed a description of the benefits of unit testing in pkg-descr.
*) No longer installing COPYING.

Approved by:    mikeh (maintainer)
2006-07-05 18:30:08 +00:00

26 lines
786 B
Text

--- check.m4.orig Tue Mar 1 01:25:26 2005
+++ check.m4 Sun Jul 2 21:13:20 2006
@@ -19,8 +19,21 @@
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"