diff options
author | Diego Elio 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2009-11-20 21:37:16 +0100 |
---|---|---|
committer | Diego Elio 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2009-11-20 21:37:16 +0100 |
commit | 5150a101efbf46d5235813e4bb6651a3a108bb78 (patch) | |
tree | 50914d9e9b354dd803a8d09c0e88aaeade8da62a /configure.ac | |
parent | 4923f3ca773662b2d147bc374995571b5dacdc7f (diff) |
Check for stow using AC_CHECK_PROG rather than type -p.
The type -p check is not compatible with POSIX shells, and indeed fails
when used with the FreeBSD 8 default shell. Instead the AC_CHECK_PROG macro
is written properly to look for the command.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index a3a97a63..fdc66625 100644 --- a/configure.ac +++ b/configure.ac @@ -61,10 +61,12 @@ AC_SUBST(LIBPULSE_MAINLOOP_GLIB_VERSION_INFO, [0:4:0]) AC_CANONICAL_HOST AC_DEFINE_UNQUOTED([CANONICAL_HOST], "$host", [Canonical host string.]) -if type -p stow > /dev/null && test -d /usr/local/stow ; then +AC_CHECK_PROG([STOW], [stow], [yes], [no]) + +AS_IF([test "x$STOW" = "xyes" && test -d /usr/local/stow], [ AC_MSG_NOTICE([*** Found /usr/local/stow: default install prefix set to /usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION} ***]) ac_default_prefix="/usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION}" -fi +]) AM_SILENT_RULES([yes]) |