Mercurial > dovecot > core-2.2
changeset 10756:ae23a1a94376 HEAD
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..
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Thu, 18 Feb 2010 18:56:52 +0200 |
parents | 912c132337ed |
children | d3697efd18f3 |
files | dovecot.m4 |
diffstat | 1 files changed, 11 insertions(+), 51 deletions(-) [+] |
line wrap: on
line diff
--- a/dovecot.m4 Thu Feb 18 09:48:56 2010 +0200 +++ b/dovecot.m4 Thu Feb 18 18:56:52 2010 +0200 @@ -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([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_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 @@ 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 <stdlib.h> - #include <stdio.h> - ]],[[ - 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 ])