aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--aclocal.m42
-rw-r--r--configure.in29
2 files changed, 26 insertions, 5 deletions
diff --git a/aclocal.m4 b/aclocal.m4
index 0a2a0fc..c50de12 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -6,7 +6,7 @@ dnl
dnl Like AC_PATH_PROGS, but add to the .h file as well
dnl --------------------------------------------------------------------------
AC_DEFUN(AF_PATH_INCLUDE,
-[AC_PATH_PROGS($1,$2)
+[AC_PATH_PROGS($1,$2,$3,$4)
if test -n "$$1"; then
AC_DEFINE(HAVE_$1)
AC_DEFINE_UNQUOTED(PATH_$1, "$$1")
diff --git a/configure.in b/configure.in
index 9e3324e..ab48130 100644
--- a/configure.in
+++ b/configure.in
@@ -1,6 +1,12 @@
# $Id$
# configure.in for the autofs daemon
+#
+# Disable caching (the script is tiny, and it doesn't work with --with-path)
+# then start autofs
+#
+define([AC_CACHE_LOAD], )dnl
+define([AC_CACHE_SAVE], )dnl
AC_INIT(.autofs-0.3.15)
#
@@ -9,12 +15,27 @@ AC_INIT(.autofs-0.3.15)
AC_PREFIX_DEFAULT(/usr)
#
+# The user can specify --with-path=PATH rather than relying on the default
+#
+searchpath="${PATH}:/bin:/usr/bin:/sbin:/usr/sbin"
+AC_ARG_WITH(path,
+--with-path=PATH look in PATH for binaries needed by the automounter,
+ if test -z "$withval" -o "$withval" = "yes" -o "$withval" = "no"
+ then
+ :
+ else
+ searchpath="${withval}"
+ fi
+)
+echo "checking for binaries in... ${searchpath}"
+
+#
# Programs needed for various system functions or modules
#
-AF_PATH_INCLUDE(MOUNT, mount, /bin/mount, $PATH:/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin:/etc:/usr/etc)
-AF_PATH_INCLUDE(UMOUNT, umount, /bin/umount, $PATH:/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin:/etc:/usr/etc)
-AF_PATH_INCLUDE(E2FSCK, fsck.ext2 e2fsck, , $PATH:/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin:/etc:/usr/etc)
-AF_PATH_INCLUDE(SMBMOUNT, smbmount, , $PATH:/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin:/etc:/usr/etc)
+AF_PATH_INCLUDE(MOUNT, mount, /bin/mount, $searchpath)
+AF_PATH_INCLUDE(UMOUNT, umount, /bin/umount, $searchpath)
+AF_PATH_INCLUDE(E2FSCK, fsck.ext2 e2fsck, , $searchpath)
+AF_PATH_INCLUDE(SMBMOUNT, smbmount, , $searchpath)
AC_SUBST(HAVE_SMBMOUNT)
#