X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=m4%2Fhave_cinttypes.m4;h=192d52ec9804f3e61b18be31be9a3efbde9b4926;hb=c8b9a1330aaf70eb9e820a3a48799c6baf606a4a;hp=3ba1316a4b6f3f264dba0c6bc7fa3626ddca7b43;hpb=b973bd495b75c6c0f7fd38d32e73a8383d4b1dc8;p=awesomized%2Flibmemcached diff --git a/m4/have_cinttypes.m4 b/m4/have_cinttypes.m4 index 3ba1316a..192d52ec 100644 --- a/m4/have_cinttypes.m4 +++ b/m4/have_cinttypes.m4 @@ -40,7 +40,7 @@ # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. -#serial 2 +#serial 4 AC_DEFUN([AX_CXX_CINTTYPES], [ AC_REQUIRE([AC_PROG_CXX]) @@ -59,18 +59,22 @@ AC_DEFUN([AX_CXX_CINTTYPES], [ [ac_cxx_cinttypes_cinttypes=""]) # Look for tr1/cinttypes - AC_COMPILE_IFELSE([ - AC_LANG_PROGRAM([#include ], [ - uint32_t foo= UINT32_C(1); - ])], - [ac_cxx_cinttypes_tr1_cinttypes=""]) + AS_IF([test -z "$ac_cxx_cinttypes_cinttypes"],[ + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([#include ], [ + uint32_t foo= UINT32_C(1); + ])], + [ac_cxx_cinttypes_tr1_cinttypes=""]) # Look for boost/cinttypes.hpp - AC_COMPILE_IFELSE([ - AC_LANG_PROGRAM([#include ], [ - uint32_t foo= UINT32_C(1); - ])], - [ac_cxx_cinttypes_boost_cinttypes_hpp=""]) + AS_IF([test -z "$ac_cxx_cinttypes_tr1_cinttypes"],[ + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([#include ], [ + uint32_t foo= UINT32_C(1); + ])], + [ac_cxx_cinttypes_boost_cinttypes_hpp=""]) + ]) + ]) AC_LANG_POP AX_RESTORE_FLAGS @@ -80,12 +84,9 @@ AC_DEFUN([AX_CXX_CINTTYPES], [ [test -n "$ac_cxx_cinttypes_boost_cinttypes_hpp"], [ac_cv_cxx_cinttypes=$ac_cxx_cinttypes_boost_cinttypes_hpp]) ]) - AS_IF([ test -n "$ac_cv_cxx_cinttypes"], [ - AC_MSG_RESULT([$ac_cv_cxx_cinttypes]) - ],[ + AS_IF([ test -n "$ac_cv_cxx_cinttypes"], [:],[ ac_cv_cxx_cinttypes="" AC_MSG_WARN([Could not find a cinttypes header.]) - AC_MSG_RESULT([$ac_cv_cxx_cinttypes]) ]) AC_DEFINE([__STDC_LIMIT_MACROS],[1],[Use STDC Limit Macros in C++])