--- trunk/OOPSE-3.0/ac-tools/configure.in 2004/09/28 22:14:11 1499 +++ trunk/OOPSE-3.0/ac-tools/configure.in 2005/03/04 15:29:03 2081 @@ -6,7 +6,7 @@ AC_CONFIG_SRCDIR([src/applications/oopse.cpp]) builtin(include, ac-tools/fortran90.m4) builtin(include, ac-tools/aclocal.m4) -AC_CONFIG_SRCDIR([src/applications/oopse.cpp]) +AC_CONFIG_SRCDIR([src/applications/oopse/oopse.cpp]) AC_PREFIX_DEFAULT("/usr/local") @@ -28,6 +28,8 @@ dnl Checks for C compiler # who am i AC_CANONICAL_HOST + + dnl Checks for C compiler AC_PROG_CC([icc xlc gcc cc]) @@ -97,10 +99,36 @@ AC_LANG_POP AC_CHECK_MODSUFFIX dnl Fortran 90 module path specifier AC_CHECK_MODDIRFLAG +AC_F90_MODULE_NAMES +pat=`echo $ac_cv_f90_module_names | sed 's/.*\(%.*%\).*/\1/'` +F90_MODULE_NAMES=empty +case $pat in + %MODULE%) + F90_MODULE_NAMES=UPPER ;; + %Module%) + F90_MODULE_NAMES=Mixed ;; + %module%) + F90_MODULE_NAMES=lower ;; + *) + F90_MODULE_NAMES=unknown ;; +esac +AC_SUBST(F90_MODULE_NAMES) AC_LANG_POP -dnl check for system getopt 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) +# special check for _system_configuration because AIX <4.3.2 do not +# contain the `physmem' member. +AC_MSG_CHECKING([for external symbol _system_configuration]) +AC_TRY_COMPILE([#include ], + [double x = _system_configuration.physmem;], + [AC_MSG_RESULT([yes]) + AC_DEFINE(HAVE__SYSTEM_CONFIGURATION, 1, + [Define if you have the _system_configuration variable.])], + [AC_MSG_RESULT([no])]) + +dnl check for system getopt adl_FUNC_GETOPT_LONG dnl check for strong optimization options @@ -128,7 +156,41 @@ fi exit 1 fi +AC_PATH_PROG(PS, ps) +AC_CACHE_CHECK([for POSIX or BSD ps syntax], ac_cv_prog_ps_syntax, [ + if $PS ax -o rss > /dev/null 2>&1; then + ac_cv_prog_ps_ax=yes + else + ac_cv_prog_ps_ax=no + fi + if $PS -ef -o rss > /dev/null 2>&1; then + ac_cv_prog_ps_ef=yes + else + ac_cv_prog_ps_ef=no + fi + if test "$ac_cv_prog_ps_ax" = yes; then + ac_cv_prog_ps_syntax=BSD + else + if test "$ac_cv_prog_ps_ef" = yes; then + ac_cv_prog_ps_syntax=POSIX + else + AC_MSG_ERROR(Could not determine ps syntax) + fi + fi +]) +AC_DEFINE_UNQUOTED(PSCOMMAND, $PS, [Path to ps program]) + +if test "$ac_cv_prog_ps_syntax" = BSD; then + AC_DEFINE(PSTYPE_IS_BSD, 1) +else + if test "$ac_cv_prog_ps_syntax" = POSIX; then + AC_DEFINE(PSTYPE_IS_POSIX, 1) + else + AC_MSG_ERROR(Unknown ps syntax type!) + fi +fi + AC_ARG_WITH(mpi, [AC_HELP_STRING([--with-mpi=], [compile with MPI installed in [default=no]])], @@ -148,29 +210,29 @@ AC_ARG_WITH(sprng, fi AC_SUBST(USE_MPI) -AC_ARG_WITH(sprng, - [AC_HELP_STRING([--with-sprng=], - [compile with SPRNG installed in [default=/usr/local]])], - with_sprng=$withval, - with_sprng="/usr/local") +dnl AC_ARG_WITH(sprng, +dnl [AC_HELP_STRING([--with-sprng=], +dnl [compile with SPRNG installed in [default=/usr/local]])], +dnl with_sprng=$withval, +dnl with_sprng="/usr/local") +dnl +dnl case "x$with_sprng" in +dnl xyes | "x") USE_SPRNG=yes;; +dnl xno) USE_SPRNG=no ;; +dnl *) SPRNG="$with_sprng"; USE_SPRNG=yes ;; +dnl esac +dnl if test "$USE_SPRNG" = "yes" -a -z "$with_sprng"; then +dnl SPRNG="/usr/local" +dnl fi +dnl if test "$USE_SPRNG" = "yes"; then +dnl ACX_SPRNG +dnl fi +dnl AC_SUBST(USE_SPRNG) -case "x$with_sprng" in - xyes | "x") USE_SPRNG=yes;; - xno) USE_SPRNG=no ;; - *) SPRNG="$with_sprng"; USE_SPRNG=yes ;; -esac -if test "$USE_SPRNG" = "yes" -a -z "$with_sprng"; then - SPRNG="/usr/local" -fi -if test "$USE_SPRNG" = "yes"; then - ACX_SPRNG -fi -AC_SUBST(USE_SPRNG) +dnl CHECK_MKL +BB_ENABLE_DOXYGEN -CHECK_MKL - - AC_EXEEXT AC_OBJEXT OBJEXT=".$OBJEXT" @@ -229,7 +291,8 @@ AC_CONFIG_HEADER([src/config.h]) AC_SUBST(LDFLAGS) AC_SUBST(PREPFLAG) AC_SUBST(PREPDEFFLAG) +AC_SUBST(F90_MODULE_NAMES) AC_CONFIG_HEADER([src/config.h]) -AC_CONFIG_FILES([make/Make.conf]) +AC_CONFIG_FILES([make/Makefile src/utils/Makefile]) AC_OUTPUT