[cairo-commit] configure.in test/Makefile.am

Chris Wilson ickle at kemper.freedesktop.org
Wed Apr 11 18:31:03 PDT 2007


 configure.in     |    9 +++++++++
 test/Makefile.am |   12 ++++++------
 2 files changed, 15 insertions(+), 6 deletions(-)

New commits:
diff-tree a8974223dc6376a11588c6ecf1e54da5329b9c72 (from 632ec8088cef5e9d4c2ff2886cfd550d706433e4)
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Thu Apr 12 02:29:33 2007 +0100

    Check for find and xargs during configure
    
    Replace hard-coded find, xargs and rm with the paths determined during
    configure. This also gives us an opportunity to detect missing programs
    and inform the developer.

diff --git a/configure.in b/configure.in
index 60bb3cd..befcff6 100644
--- a/configure.in
+++ b/configure.in
@@ -48,6 +48,15 @@ AC_SUBST(CAIRO_VERSION_MAJOR)
 AC_SUBST(CAIRO_VERSION_MINOR)
 AC_SUBST(CAIRO_VERSION_MICRO)
 
+dnl ===========================================================================
+
+AC_PATH_PROG(FIND, find,
+	     AC_MSG_ERROR([Cairo requires a POSIX compatible 'find'.]))
+AC_PATH_PROG(XARGS, xargs,
+	     AC_MSG_ERROR([Cairo requires 'xargs'.]))
+
+dnl ===========================================================================
+
 AC_PROG_CC
 AC_PROG_CPP
 AC_PROG_LIBTOOL dnl required version (1.4) DON'T REMOVE!
diff --git a/test/Makefile.am b/test/Makefile.am
index 3a7deae..a6adec7 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -525,12 +525,12 @@ CLEANFILES =					\
 
 # most systems cannot handle all of our clean files together
 clean-local:
-	-find . -name '*.ps' -print | xargs rm
-	-find . -name '*.pdf' -print | xargs rm
-	-find . -name '*.svg' -print | xargs rm
-	-find . -name '*-out.png' -print | xargs rm
-	-find . -name '*-diff.png' -print | xargs rm
-	-find . -name '*.log' -print | xargs rm
+	-${FIND} . -name '*.ps' -print       | ${XARGS} ${RM}
+	-${FIND} . -name '*.pdf' -print      | ${XARGS} ${RM}
+	-${FIND} . -name '*.svg' -print      | ${XARGS} ${RM}
+	-${FIND} . -name '*-out.png' -print  | ${XARGS} ${RM}
+	-${FIND} . -name '*-diff.png' -print | ${XARGS} ${RM}
+	-${FIND} . -name '*.log' -print      | ${XARGS} ${RM}
 
 # Check tests under valgrind
 # Saves log to valgrind-log


More information about the cairo-commit mailing list