From: Karl Fleischmann Date: Tue, 21 Jun 2022 07:26:19 +0000 (+0200) Subject: m4: glibc.m4 - Improve glibc-check X-Git-Tag: 2.4.0~3902 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c214d98acda3bcd97a1cbb6cc7e832086fd695ed;p=thirdparty%2Fdovecot%2Fcore.git m4: glibc.m4 - Improve glibc-check The previous check was based on a compilation error and negating the value. This updated check is more clear as it runs the preprocessor with the appropriate header file and checks if the output matches, which in turn allows for a more forward readable definition of the i_cv_have_glibc value. --- diff --git a/m4/glibc.m4 b/m4/glibc.m4 index ce228093e1..0976938717 100644 --- a/m4/glibc.m4 +++ b/m4/glibc.m4 @@ -1,14 +1,14 @@ AC_DEFUN([DOVECOT_GLIBC], [ AC_CACHE_CHECK([whether we have glibc],i_cv_have_glibc,[ - AC_TRY_COMPILE([ - #include - #ifdef __GLIBC__ + AC_EGREP_CPP([we have glibc], [ + #include + #ifdef __GNU_LIBRARY__ we have glibc #endif - ],, [ - i_cv_have_glibc=no ], [ i_cv_have_glibc=yes + ], [ + i_cv_have_glibc=no ]) ]) AS_IF([test "$i_cv_have_glibc" = "yes"], [