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.
This commit is contained in:
Chris Wilson 2007-04-12 02:29:33 +01:00
parent 632ec8088c
commit a8974223dc
2 changed files with 15 additions and 6 deletions

View file

@ -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!

View file

@ -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