summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2002-10-29 12:23:13 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2002-10-29 12:23:13 +0000
commit19174555385eab9054e341e5000e63635dfdc48e (patch)
tree107d9c5b85987cbf7de04e77e8518052368b49d8 /m4
parent80d358b7e3ae1f413c95879d265c85609b8841bc (diff)
downloadmailutils-19174555385eab9054e341e5000e63635dfdc48e.tar.gz
mailutils-19174555385eab9054e341e5000e63635dfdc48e.tar.bz2
New file. Implements MU_ENABLE_SUPPORT defun.
Diffstat (limited to 'm4')
-rw-r--r--m4/enable.m450
1 files changed, 50 insertions, 0 deletions
diff --git a/m4/enable.m4 b/m4/enable.m4
new file mode 100644
index 000000000..75fffaf69
--- /dev/null
+++ b/m4/enable.m4
@@ -0,0 +1,50 @@
+dnl This file is part of GNU mailutils.
+dnl Copyright (C) 2001 Free Software Foundation, Inc.
+dnl
+dnl This program is free software; you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; either version 2 of the License, or
+dnl (at your option) any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+dnl GNU General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program; if not, write to the Free Software
+dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+dnl
+
+dnl MU_ENABLE_SUPPORT(feature, [action-if-true], [action-if-false])
+
+AC_DEFUN([MU_ENABLE_SUPPORT], [
+ pushdef([mu_upcase],translit($1,[a-z],[A-Z]))
+ pushdef([mu_build_files],mu_upcase[_BUILD_FILES])
+ pushdef([mu_cache_var],[mu_cv_enable_]$1)
+ AC_SUBST(mu_build_files)
+ ifelse([$2],,,AC_SUBST(mu_build_dirs))
+ AC_ARG_ENABLE($1,
+ [ --disable-]$1[ disable ]$1[ support],
+ [case "${enableval}" in
+ yes) mu_cache_var=yes;;
+ no) mu_cache_var=no;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --disable-$1) ;;
+ esac],
+ [mu_cache_var=yes])
+
+ if test x"[$]mu_cache_var" = x"yes"; then
+ AC_DEFINE([ENABLE_]mu_upcase,1,[Define this if you enable $1 support])
+ mu_build_files='[$(]mu_upcase[_FILES)]'
+ ifelse([$2],,,$2)
+ ifelse([$3],,,else
+ $2)
+ fi
+
+ popdef([mu_upcase])
+ popdef([mu_build_files])
+ popdef([mu_cache_var])
+])
+
+
+

Return to:

Send suggestions and report system problems to the System administrator.