From: Timo Sirainen Date: Thu, 18 Feb 2010 16:56:52 +0000 (+0200) Subject: dovecot.m4: Don't use any AS_*() macros. X-Git-Tag: 2.0.beta3~42 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9c163723f69c85e84505c85ec05ff709de802167;p=thirdparty%2Fdovecot%2Fcore.git dovecot.m4: Don't use any AS_*() macros. Also removed version checking because it was done with AS_* macro. RHEL5 doesn't have new enough autoconf.. --HG-- branch : HEAD --- diff --git a/dovecot.m4 b/dovecot.m4 index 735d4885a0..4cc877a48e 100644 --- a/dovecot.m4 +++ b/dovecot.m4 @@ -9,15 +9,15 @@ AC_DEFUN([DC_PLUGIN_DEPS],[ _plugin_deps=yes AC_MSG_CHECKING([whether OS supports plugin dependencies]) - AS_CASE([$host_os], - [darwin*],[ - # OSX loads the plugins twice, which breaks stuff - _plugin_deps=no - ] - ) + case "$host_os" in + darwin*) + # OSX loads the plugins twice, which breaks stuff + _plugin_deps=no + ;; + esac AC_MSG_RESULT([$_plugin_deps]) AM_CONDITIONAL([DOVECOT_PLUGIN_DEPS], [test "x$_plugin_deps" = "xyes"]) - AS_UNSET([_plugin_deps]) + unset _plugin_deps ]) # Substitute every var in the given comma seperated list @@ -27,7 +27,7 @@ AC_DEFUN([AX_SUBST_L],[ AC_DEFUN([DC_DOVECOT],[ AC_ARG_WITH(dovecot, - AS_HELP_STRING([--with-dovecot=DIR],[Dovecot base directory [LIBDIR/dovecot]]), + [ --with-dovecot=DIR Dovecot base directory], [ dovecotdir="$withval" ], [ dc_prefix=$prefix test "x$dc_prefix" = xNONE && dc_prefix=$ac_default_prefix @@ -36,14 +36,14 @@ AC_DEFUN([DC_DOVECOT],[ ) AC_MSG_CHECKING([for dovecot-config in "$dovecotdir"]) - AS_IF([test -f "$dovecotdir/dovecot-config"],[ + if test -f "$dovecotdir/dovecot-config"; then AC_MSG_RESULT([$dovecotdir/dovecot-config]) - ],[ + else AC_MSG_RESULT([not found]) AC_MSG_NOTICE([]) AC_MSG_NOTICE([Use --with-dovecot=DIR to provide the path to the dovecot-config file.]) AC_MSG_ERROR([dovecot-config not found]) - ]) + fi eval `grep \ -e ^dovecot_[[a-z]]*= \ @@ -54,45 +54,5 @@ AC_DEFUN([DC_DOVECOT],[ AX_SUBST_L([LIBDOVECOT_DEPS], [LIBDOVECOT_LOGIN_DEPS], [LIBDOVECOT_SQL_DEPS], [LIBDOVECOT_STORAGE_DEPS]) AX_SUBST_L([LIBDOVECOT_INCLUDE], [LIBDOVECOT_LDA_INCLUDE], [LIBDOVECOT_SERVICE_INCLUDE], [LIBDOVECOT_STORAGE_INCLUDE], [LIBDOVECOT_LOGIN_INCLUDE]) - _cppflags=$CPPFLAGS - CPPFLAGS=$LIBDOVECOT_INCLUDE - AC_MSG_CHECKING([dovecot version]) - AC_RUN_IFELSE([ - AC_LANG_PROGRAM([[ - /* needed for dovecot to include its own config.h ... */ - #define HAVE_CONFIG_H - #include "lib.h" - #include - #include - ]],[[ - printf("%s\n", DOVECOT_VERSION); - ]]) - ],[ - DOVECOT_VERSION=`./conftest$EXEEXT` - ],[ - AC_MSG_FAILURE([unable to determine dovecot version]) - ]) - AC_SUBST([DOVECOT_VERSION]) - CPPFLAGS=$_cppflags - AS_UNSET([_cppflags]) - - m4_foreach_w([__flag__],[$1],[ - # Inside m4_foreach __flag__ is a variable! - # This expands *entirely* for every flag in the argument list! - AS_CASE([__flag__], - [ - # assume an unknown flag is a version number - AC_MSG_CHECKING([whether dovecot is newer than __flag__]) - AS_VERSION_COMPARE([$DOVECOT_VERSION],[__flag__],[ - AC_MSG_RESULT([no]) - AC_MSG_ERROR([at least dovecot-flag is required, your version seems older]) - ],[ - AC_MSG_RESULT([yes]) - ],[ - AC_MSG_RESULT([yes]) - ]) - ]) - ]) - DC_PLUGIN_DEPS ])