From a851c9692d55fda41b5b08a298ffc49371bb603c Mon Sep 17 00:00:00 2001 From: vsr Date: Wed, 12 Aug 2009 06:30:23 +0000 Subject: [PATCH] Improve check scripts: avoid warnings with autoconf v2.63 --- .../unix/config_files/ac_cxx_depend_flag.m4 | 10 +++--- .../unix/config_files/ac_cxx_have_sstream.m4 | 33 +++++++++++-------- 2 files changed, 24 insertions(+), 19 deletions(-) diff --git a/salome_adm/unix/config_files/ac_cxx_depend_flag.m4 b/salome_adm/unix/config_files/ac_cxx_depend_flag.m4 index 3473cf26e..3625d5902 100644 --- a/salome_adm/unix/config_files/ac_cxx_depend_flag.m4 +++ b/salome_adm/unix/config_files/ac_cxx_depend_flag.m4 @@ -25,10 +25,9 @@ dnl define CXX_DEPEND_FLAG dnl @version $Id$ dnl @author Marc Tajchman dnl -AC_DEFUN([AC_DEPEND_FLAG], -[AC_CACHE_CHECK(which flag for dependency information generation, -ac_cv_depend_flag, -[AC_LANG_SAVE +AC_DEFUN([AC_DEPEND_FLAG],[ + AC_MSG_CHECKING([which flag for dependency information generation]) + AC_LANG_SAVE AC_LANG_C echo "conftest.o: conftest.c" > conftest.verif echo "int main() { return 0; }" > conftest.c @@ -213,6 +212,8 @@ dnl use g++ option -MG : asume unknown file will be construct later printf " C++ : ${DEPCXX} ${CXX_DEPEND_FLAG}" AC_LANG_RESTORE + AC_MSG_RESULT([ ... done]) + AC_SUBST(DEPCC) AC_SUBST(DEPCXX) AC_SUBST(DEPCXXFLAGS) @@ -220,4 +221,3 @@ dnl use g++ option -MG : asume unknown file will be construct later AC_SUBST(CXX_DEPEND_FLAG) AC_SUBST(MACHINE) ]) -]) diff --git a/salome_adm/unix/config_files/ac_cxx_have_sstream.m4 b/salome_adm/unix/config_files/ac_cxx_have_sstream.m4 index 24be4c5d9..852bc6ccb 100644 --- a/salome_adm/unix/config_files/ac_cxx_have_sstream.m4 +++ b/salome_adm/unix/config_files/ac_cxx_have_sstream.m4 @@ -26,18 +26,23 @@ dnl @version $Id$ dnl modified by Marc Tajchman (CEA) - 10/10/2002 dnl -AC_DEFUN([AC_CXX_HAVE_SSTREAM], -[AC_CACHE_CHECK(whether the compiler has stringstream, -HAVE_SSTREAM, -[AC_REQUIRE([AC_CXX_NAMESPACES]) - AC_LANG_SAVE - AC_LANG_CPLUSPLUS - AC_TRY_COMPILE([#include -#ifdef HAVE_NAMESPACES -using namespace std; -#endif],[stringstream message; message << "Hello"; return 0;], - HAVE_SSTREAM=yes, HAVE_SSTREAM=no) - AC_LANG_RESTORE -]) -AC_SUBST(HAVE_SSTREAM) +AC_DEFUN([AC_CXX_HAVE_SSTREAM],[ + AC_CACHE_CHECK([whether the compiler has stringstream], + [ac_cv_prog_cxx_have_sstream], + [ac_cv_prog_cxx_have_sstream=no + AC_REQUIRE([AC_CXX_NAMESPACES]) + AC_LANG_SAVE + AC_LANG_CPLUSPLUS + AC_TRY_COMPILE([ + #include + #ifdef HAVE_NAMESPACES + using namespace std; + #endif + ], + [stringstream message; message << "Hello"; return 0;], + [ac_cv_prog_cxx_have_sstream=yes],[ac_cv_prog_cxx_have_sstream=no]) + AC_LANG_RESTORE + ]) + HAVE_SSTREAM=$ac_cv_prog_cxx_have_sstream + AC_SUBST(HAVE_SSTREAM) ]) -- 2.39.2