-AC_CACHE_CHECK([where to stash Autoconf macros], [aclocaldir], [
- aclocaldir=`aclocal --print-ac-dir`
- if test $? -ne 0; then AC_MSG_ERROR([aclocal not installed]); fi
-])
+dnl--------------------------------------------------------------------------
+dnl Finding installation directories.
+
+AC_ARG_WITH(
+ [aclocaldir],
+ AS_HELP_STRING([--with-aclocaldir=DIR],
+ [store autoconf snippets in DIR]),
+ [aclocaldir=$withval],
+ [AC_CACHE_CHECK([where to stash Autoconf macros], [mdw_cv_aclocaldir], [
+ mdw_cv_aclocaldir=$(aclocal --print-ac-dir)
+ if test $? -ne 0; then AC_MSG_ERROR([aclocal not installed]); fi
+ ])
+ aclocaldir=$mdw_cv_aclocaldir])