]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
dovecot.m4: Don't use any AS_*() macros.
authorTimo Sirainen <tss@iki.fi>
Thu, 18 Feb 2010 16:56:52 +0000 (18:56 +0200)
committerTimo Sirainen <tss@iki.fi>
Thu, 18 Feb 2010 16:56:52 +0000 (18:56 +0200)
Also removed version checking because it was done with AS_* macro.
RHEL5 doesn't have new enough autoconf..

--HG--
branch : HEAD

dovecot.m4

index 735d4885a0905b904a127c3ad8c168e5e2373bf9..4cc877a48e5b1c20d23938288ed154851e481382 100644 (file)
@@ -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 <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
 ])