From: Jan Synacek Date: Wed, 11 Feb 2015 09:32:28 +0000 (+0100) Subject: ITS#8056 fix libdb detection with gcc 5 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f19f1c32496f3728c16c13b87d91a912e94bb7b2;p=openldap ITS#8056 fix libdb detection with gcc 5 The old cpp version generated: __db_version 5 The new output: __db_version 5 Running cpp with -P (inhibit linemarkers generation) fixes this when using gcc 5. Behavior with older versions of gcc is not changed. --- diff --git a/build/openldap.m4 b/build/openldap.m4 index caf8fc2aa6..bdcb4d6a5a 100644 --- a/build/openldap.m4 +++ b/build/openldap.m4 @@ -328,7 +328,7 @@ AC_DEFUN([OL_BDB_HEADER_VERSION], #endif __db_version DB_VERSION_MAJOR ]) - set X `eval "$ac_cpp conftest.$ac_ext" | $EGREP __db_version` none none + set X `eval "$ac_cpp -P conftest.$ac_ext" | $EGREP __db_version` none none ol_cv_bdb_major=${3} ]) case $ol_cv_bdb_major in [[1-9]]*) : ;; *) @@ -344,7 +344,7 @@ AC_CACHE_CHECK([for Berkeley DB minor version in db.h], [ol_cv_bdb_minor],[ #endif __db_version DB_VERSION_MINOR ]) - set X `eval "$ac_cpp conftest.$ac_ext" | $EGREP __db_version` none none + set X `eval "$ac_cpp -P conftest.$ac_ext" | $EGREP __db_version` none none ol_cv_bdb_minor=${3} ]) case $ol_cv_bdb_minor in [[0-9]]*) : ;; *)