--- trunk/OOPSE-3.0/ac-tools/configure.in 2005/04/15 22:03:16 2203 +++ trunk/OOPSE-3.0/ac-tools/configure.in 2005/12/16 21:52:50 2518 @@ -5,6 +5,9 @@ builtin(include, ac-tools/aclocal.m4) builtin(include, ac-tools/fortran90.m4) builtin(include, ac-tools/aclocal.m4) +builtin(include, ac-tools/AC_CXX_HAVE_STL.m4) +builtin(include, ac-tools/AC_CXX_NAMESPACES.m4) +builtin(include, ac-tools/AC_CXX_STD.m4) AC_CONFIG_SRCDIR([src/applications/oopse/oopse.cpp]) @@ -31,11 +34,17 @@ AC_PROG_CC([icc xlc gcc cc]) dnl Checks for C compiler -AC_PROG_CC([icc xlc gcc cc]) +AC_PROG_CC([pathcc icc xlc gcc cc]) dnl Checks for C++ compiler -AC_PROG_CXX([icpc icc xlc++ xlC CC g++ c++]) +AC_PROG_CXX([pathCC icpc icc xlc++ xlC CC g++ c++]) +dnl Checks for C preprocessor +AC_PROG_CPP + +dnl Checks for grep and egrep +AC_PROG_EGREP + dnl If we are not running g++ then we might need some other flags dnl to get the templates compiled correctly OOPSE_TEMPLATE_FLAGS="" @@ -83,7 +92,7 @@ AC_PROG_F90([ifort ifc f90 xlf90 pgf90 epcf90 f95 xlf9 dnl Fortran 90 compilation checks are next -AC_PROG_F90([ifort ifc f90 xlf90 pgf90 epcf90 f95 xlf95 lf95 fort g95]) +AC_PROG_F90([pathf95 ifort ifc f90 xlf90 pgf90 epcf90 f95 xlf95 lf95 fort g95]) dnl Check the flag for Fortran90 preprocessing ACX_PROG_F90_PREPFLAG dnl Check to see if a flag is required for preprocessing defines @@ -115,9 +124,21 @@ AC_LANG_PUSH(C) AC_SUBST(F90_MODULE_NAMES) AC_LANG_POP -AC_LANG_PUSH(C) -AC_CHECK_HEADERS(unistd.h sys/pstat.h sys/sysmp.h sys/sysinfo.h sys/table.h sys/param.h sys/sysctl.h sys/sytemcfg.h machine/hal_sysinfo.h) -AC_CHECK_FUNCS(pstat_getstatic sysmp getsysinfo sysctl table) +AC_LANG_CPLUSPLUS +AC_HEADER_STDC +AC_CXX_NAMESPACES +AC_CXX_STD + +dnl Checks for libraries. +AC_CHECK_LIB(m, asin, , exit) + +ACX_CHECK_ZLIB +dnl Checks for header files. +AC_CHECK_HEADERS([stdlib.h string.h sys/param.h unistd.h sys/time.h stdio.h conio.h strstream.h iostream.h fstream.h math.h time.h sys/pstat.h sys/sysmp.h sys/sysinfo.h sys/table.h sys/sysctl.h sys/sytemcfg.h machine/hal_sysinfo.h]) +AC_LANG_CPLUSPLUS +AC_CHECK_HEADERS([ctype.h iostream fstream sstream strstream]) +AC_LANG_C +AC_CHECK_FUNCS([rint snprintf sranddev strcasecmp strncasecmp stricmp strnicmp pstat_getstatic sysmp getsysinfo sysctl table]) # special check for _system_configuration because AIX <4.3.2 do not # contain the `physmem' member. AC_MSG_CHECKING([for external symbol _system_configuration]) @@ -127,7 +148,14 @@ AC_TRY_COMPILE([#include ], AC_DEFINE(HAVE__SYSTEM_CONFIGURATION, 1, [Define if you have the _system_configuration variable.])], [AC_MSG_RESULT([no])]) +AC_HEADER_TIME +dnl Checks for typedefs, structures, and compiler characteristics. +AC_CHECK_TYPES(clock_t) +AC_C_CONST +AC_C_INLINE + + dnl check for system getopt adl_FUNC_GETOPT_LONG @@ -142,6 +170,37 @@ esac ACX_PROG_F90_MAXOPT ;; esac + +AC_LANG_CPLUSPLUS +# AC_CPP_FUNC +# ------------------ # +# Checks to see if ANSI C99 CPP variable __func__ works. +# If not, perhaps __FUNCTION__ works instead. +# If not, we'll just define __func__ to "". +AC_DEFUN([AC_CPP_FUNC], +[AC_REQUIRE([AC_PROG_CC_STDC])dnl +AC_CACHE_CHECK([for an ANSI C99-conforming __func__], ac_cv_cpp_func, +[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], +[[const char *foo = __func__;]])], + [ac_cv_cpp_func=yes], + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], +[[const char *foo = __FUNCTION__;]])], + [ac_cv_cpp_func=__FUNCTION__], + [ac_cv_cpp_func=no])])]) +if test $ac_cv_cpp_func = __FUNCTION__; then + AC_DEFINE(__func__,__FUNCTION__, + [Define to __FUNCTION__ or "" if `__func__' does not conform to +ANSI C.]) +elif test $ac_cv_cpp_func = no; then + AC_DEFINE(__func__,"", + [Define to __FUNCTION__ or "" if `__func__' does not conform to +ANSI C.]) +fi +])# AC_CPP_FUNC + +AC_CPP_FUNC +AC_SUBST(__func__) +AC_LANG_C AC_PROG_INSTALL AC_PROG_LN_S @@ -181,12 +240,14 @@ AC_DEFINE_UNQUOTED(PSCOMMAND, $PS, [Path to ps program ]) AC_DEFINE_UNQUOTED(PSCOMMAND, $PS, [Path to ps program]) +AC_DEFINE([OBAPI], [], [Used to export symbols for DLL / shared library builds]) + if test "$ac_cv_prog_ps_syntax" = BSD; then - AC_DEFINE(PSTYPE_IS_BSD, 1) + AC_DEFINE(PSTYPE_IS_BSD, 1, [ps uses BSD-style arguments]) else if test "$ac_cv_prog_ps_syntax" = POSIX; then - AC_DEFINE(PSTYPE_IS_POSIX, 1) + AC_DEFINE(PSTYPE_IS_POSIX, 1, [ps uses POSIX-style arguments]) else AC_MSG_ERROR(Unknown ps syntax type!) fi