From: Aki Tuomi Date: Mon, 25 Apr 2022 19:50:01 +0000 (+0300) Subject: m4: want_nss.m4 - Modernize m4 syntax X-Git-Tag: 2.4.0~3876 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5af7d0dc463bbc8aa792896201aa0db277ee0d1e;p=thirdparty%2Fdovecot%2Fcore.git m4: want_nss.m4 - Modernize m4 syntax --- diff --git a/m4/want_nss.m4 b/m4/want_nss.m4 index 1c87963bc0..05656697cd 100644 --- a/m4/want_nss.m4 +++ b/m4/want_nss.m4 @@ -1,36 +1,36 @@ AC_DEFUN([DOVECOT_WANT_NSS], [ have_nss=no - if test $want_nss != no; then - if test $have_modules != yes; then - if test $want_nss = yes; then + AS_IF([test $want_nss != no], [ + AS_IF([test $have_modules != yes], [ + AS_IF([test $want_nss = yes], [ AC_ERROR([Can't build with NSS support: Dynamic modules not supported]) - fi - else + ]) + ], [ AC_CACHE_CHECK([for NSS support],i_cv_have_nss,[ - AC_TRY_COMPILE([ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include - ], [ + ]], [[ enum nss_status status = NSS_STATUS_TRYAGAIN; - ], [ + ]])],[ i_cv_have_nss=yes ], [ i_cv_have_nss=no ]) ]) - if test $i_cv_have_nss = yes; then + AS_IF([test $i_cv_have_nss = yes], [ AC_DEFINE(USERDB_NSS,, [Build with NSS module support]) have_nss=yes - else - if test $want_nss = yes; then + ], [ + AS_IF([test $want_nss = yes], [ AC_ERROR([Can't build with NSS support: nss.h not found or not usable]) - fi - fi - fi - fi + ]) + ]) + ]) + ]) - if test $have_nss = no; then + AS_IF([test $have_nss = no], [ not_userdb="$not_userdb nss" - else + ], [ userdb="$userdb nss" - fi + ]) ])