]> code.delx.au - pulseaudio/commitdiff
Check for stow using AC_CHECK_PROG rather than type -p.
authorDiego Elio 'Flameeyes' Pettenò <flameeyes@gmail.com>
Fri, 20 Nov 2009 20:37:16 +0000 (21:37 +0100)
committerDiego Elio 'Flameeyes' Pettenò <flameeyes@gmail.com>
Fri, 20 Nov 2009 20:37:16 +0000 (21:37 +0100)
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.

configure.ac

index a3a97a630b2d13b0048707e7a52867f770183b2c..fdc666252945cf3ecb3e7fd92136a6fc3cc0f612 100644 (file)
@@ -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])