aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2005-09-10 20:18:24 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2005-09-10 20:18:24 +0000
commit271a45a4224f9a0095baac3d8981193694f33ce7 (patch)
tree59fd9ecd1fbb4c29c6f496bc00bb2aa7d29497d2 /configure.ac
parente28c42f72f95e3c5761ec3837431c4479f314e60 (diff)
downloadgsc-271a45a4224f9a0095baac3d8981193694f33ce7.tar.gz
gsc-271a45a4224f9a0095baac3d8981193694f33ce7.tar.bz2
Autodetect sendmail cf directory
git-svn-id: file:///svnroot/gsc/trunk@142 d2de0444-eb31-0410-8365-af798a554d48
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac23
1 files changed, 20 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index ca5129f..a10d8bc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -51,9 +51,26 @@ AC_ARG_WITH([sendmail-cfdir],
[Specify full name of Sendmail cf directory (e.g.: /usr/src/sendmail-8.13.1/cf/cf). Overrides --with-sendmail-version])],
[SENDMAIL_CFDIR=$withval],
[SENDMAIL_CFDIR=])
-
-
-
+
+AC_MSG_CHECKING([for Sendmail cf directory])
+if test -n "$SENDMAIL_CFDIR"; then
+ AC_MSG_RESULT([$SENDMAIL_CFDIR])
+elif test -n "$SENDMAIL_VERSION"; then
+ AC_MSG_RESULT([none, use version $SENDMAIL_VERSION])
+else
+ SENDMAIL_CFDIR=`find /usr/src/ /usr/local/src/ -name sendmail-* -type d -maxdepth 1 |
+ sed 's/.*sendmail-\(.*\)/\1 &/' |
+ sort +0 -1 -r |
+ while read VERSION DIR
+ do
+ if test -r $DIR/cf/cf/Makefile; then
+ echo "$DIR"
+ break
+ fi
+ done`
+ AC_MSG_RESULT([${SENDMAIL_CFDIR:-none}])
+fi
+
# Check for Emacs site-lisp directory
AM_PATH_LISPDIR

Return to:

Send suggestions and report system problems to the System administrator.