| 1 |
|
dnl **** Process this file with autoconf to produce a configure script. |
| 2 |
|
|
| 3 |
< |
AC_INIT(OOPSE, 1.0, gezelter@nd.edu, oopse) |
| 3 |
> |
AC_INIT(OOPSE, 2.0, gezelter@nd.edu, oopse) |
| 4 |
|
AC_CONFIG_AUX_DIR(ac-tools) |
| 5 |
|
|
| 6 |
|
builtin(include, ac-tools/fortran90.m4) |
| 7 |
|
builtin(include, ac-tools/aclocal.m4) |
| 8 |
|
|
| 9 |
< |
AC_CONFIG_SRCDIR([src/oopse.cpp]) |
| 9 |
> |
AC_CONFIG_SRCDIR([src/applications/oopse/oopse.cpp]) |
| 10 |
|
|
| 11 |
|
AC_PREFIX_DEFAULT("/usr/local") |
| 12 |
|
|
| 28 |
|
# who am i |
| 29 |
|
AC_CANONICAL_HOST |
| 30 |
|
|
| 31 |
+ |
|
| 32 |
+ |
|
| 33 |
|
dnl Checks for C compiler |
| 34 |
|
AC_PROG_CC([icc xlc gcc cc]) |
| 35 |
|
|
| 99 |
|
AC_CHECK_MODSUFFIX |
| 100 |
|
dnl Fortran 90 module path specifier |
| 101 |
|
AC_CHECK_MODDIRFLAG |
| 102 |
+ |
AC_F90_MODULE_NAMES |
| 103 |
+ |
pat=`echo $ac_cv_f90_module_names | sed 's/.*\(%.*%\).*/\1/'` |
| 104 |
+ |
F90_MODULE_NAMES=empty |
| 105 |
+ |
case $pat in |
| 106 |
+ |
%MODULE%) |
| 107 |
+ |
F90_MODULE_NAMES=UPPER ;; |
| 108 |
+ |
%Module%) |
| 109 |
+ |
F90_MODULE_NAMES=Mixed ;; |
| 110 |
+ |
%module%) |
| 111 |
+ |
F90_MODULE_NAMES=lower ;; |
| 112 |
+ |
*) |
| 113 |
+ |
F90_MODULE_NAMES=unknown ;; |
| 114 |
+ |
esac |
| 115 |
+ |
AC_SUBST(F90_MODULE_NAMES) |
| 116 |
|
AC_LANG_POP |
| 117 |
|
|
| 102 |
– |
dnl check for system getopt |
| 118 |
|
AC_LANG_PUSH(C) |
| 119 |
+ |
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) |
| 120 |
+ |
AC_CHECK_FUNCS(pstat_getstatic sysmp getsysinfo sysctl table) |
| 121 |
+ |
# special check for _system_configuration because AIX <4.3.2 do not |
| 122 |
+ |
# contain the `physmem' member. |
| 123 |
+ |
AC_MSG_CHECKING([for external symbol _system_configuration]) |
| 124 |
+ |
AC_TRY_COMPILE([#include <sys/systemcfg.h>], |
| 125 |
+ |
[double x = _system_configuration.physmem;], |
| 126 |
+ |
[AC_MSG_RESULT([yes]) |
| 127 |
+ |
AC_DEFINE(HAVE__SYSTEM_CONFIGURATION, 1, |
| 128 |
+ |
[Define if you have the _system_configuration variable.])], |
| 129 |
+ |
[AC_MSG_RESULT([no])]) |
| 130 |
+ |
|
| 131 |
+ |
dnl check for system getopt |
| 132 |
|
adl_FUNC_GETOPT_LONG |
| 133 |
|
|
| 134 |
|
dnl check for strong optimization options |
| 156 |
|
exit 1 |
| 157 |
|
fi |
| 158 |
|
|
| 159 |
+ |
AC_PATH_PROG(PS, ps) |
| 160 |
+ |
AC_CACHE_CHECK([for POSIX or BSD ps syntax], ac_cv_prog_ps_syntax, [ |
| 161 |
+ |
if $PS ax -o rss > /dev/null 2>&1; then |
| 162 |
+ |
ac_cv_prog_ps_ax=yes |
| 163 |
+ |
else |
| 164 |
+ |
ac_cv_prog_ps_ax=no |
| 165 |
+ |
fi |
| 166 |
+ |
if $PS -ef -o rss > /dev/null 2>&1; then |
| 167 |
+ |
ac_cv_prog_ps_ef=yes |
| 168 |
+ |
else |
| 169 |
+ |
ac_cv_prog_ps_ef=no |
| 170 |
+ |
fi |
| 171 |
+ |
if test "$ac_cv_prog_ps_ax" = yes; then |
| 172 |
+ |
ac_cv_prog_ps_syntax=BSD |
| 173 |
+ |
else |
| 174 |
+ |
if test "$ac_cv_prog_ps_ef" = yes; then |
| 175 |
+ |
ac_cv_prog_ps_syntax=POSIX |
| 176 |
+ |
else |
| 177 |
+ |
AC_MSG_ERROR(Could not determine ps syntax) |
| 178 |
+ |
fi |
| 179 |
+ |
fi |
| 180 |
+ |
]) |
| 181 |
|
|
| 182 |
+ |
AC_DEFINE_UNQUOTED(PSCOMMAND, $PS, [Path to ps program]) |
| 183 |
+ |
|
| 184 |
+ |
if test "$ac_cv_prog_ps_syntax" = BSD; then |
| 185 |
+ |
AC_DEFINE(PSTYPE_IS_BSD, 1) |
| 186 |
+ |
else |
| 187 |
+ |
if test "$ac_cv_prog_ps_syntax" = POSIX; then |
| 188 |
+ |
AC_DEFINE(PSTYPE_IS_POSIX, 1) |
| 189 |
+ |
else |
| 190 |
+ |
AC_MSG_ERROR(Unknown ps syntax type!) |
| 191 |
+ |
fi |
| 192 |
+ |
fi |
| 193 |
+ |
|
| 194 |
|
AC_ARG_WITH(mpi, |
| 195 |
|
[AC_HELP_STRING([--with-mpi=<prefix>], |
| 196 |
|
[compile with MPI installed in <prefix> [default=no]])], |
| 210 |
|
fi |
| 211 |
|
AC_SUBST(USE_MPI) |
| 212 |
|
|
| 213 |
< |
AC_ARG_WITH(sprng, |
| 214 |
< |
[AC_HELP_STRING([--with-sprng=<prefix>], |
| 215 |
< |
[compile with SPRNG installed in <prefix> [default=/usr/local]])], |
| 216 |
< |
with_sprng=$withval, |
| 217 |
< |
with_sprng="/usr/local") |
| 213 |
> |
dnl AC_ARG_WITH(sprng, |
| 214 |
> |
dnl [AC_HELP_STRING([--with-sprng=<prefix>], |
| 215 |
> |
dnl [compile with SPRNG installed in <prefix> [default=/usr/local]])], |
| 216 |
> |
dnl with_sprng=$withval, |
| 217 |
> |
dnl with_sprng="/usr/local") |
| 218 |
> |
dnl |
| 219 |
> |
dnl case "x$with_sprng" in |
| 220 |
> |
dnl xyes | "x") USE_SPRNG=yes;; |
| 221 |
> |
dnl xno) USE_SPRNG=no ;; |
| 222 |
> |
dnl *) SPRNG="$with_sprng"; USE_SPRNG=yes ;; |
| 223 |
> |
dnl esac |
| 224 |
> |
dnl if test "$USE_SPRNG" = "yes" -a -z "$with_sprng"; then |
| 225 |
> |
dnl SPRNG="/usr/local" |
| 226 |
> |
dnl fi |
| 227 |
> |
dnl if test "$USE_SPRNG" = "yes"; then |
| 228 |
> |
dnl ACX_SPRNG |
| 229 |
> |
dnl fi |
| 230 |
> |
dnl AC_SUBST(USE_SPRNG) |
| 231 |
|
|
| 232 |
< |
case "x$with_sprng" in |
| 158 |
< |
xyes | "x") USE_SPRNG=yes;; |
| 159 |
< |
xno) USE_SPRNG=no ;; |
| 160 |
< |
*) SPRNG="$with_sprng"; USE_SPRNG=yes ;; |
| 161 |
< |
esac |
| 162 |
< |
if test "$USE_SPRNG" = "yes" -a -z "$with_sprng"; then |
| 163 |
< |
SPRNG="/usr/local" |
| 164 |
< |
fi |
| 165 |
< |
if test "$USE_SPRNG" = "yes"; then |
| 166 |
< |
ACX_SPRNG |
| 167 |
< |
fi |
| 168 |
< |
AC_SUBST(USE_SPRNG) |
| 232 |
> |
dnl CHECK_MKL |
| 233 |
|
|
| 234 |
+ |
BB_ENABLE_DOXYGEN |
| 235 |
|
|
| 171 |
– |
CHECK_MKL |
| 172 |
– |
|
| 173 |
– |
|
| 236 |
|
AC_EXEEXT |
| 237 |
|
AC_OBJEXT |
| 238 |
|
OBJEXT=".$OBJEXT" |
| 257 |
|
|
| 258 |
|
MKINSTALLDIRS=`pwd`/ac-tools/"shtool mkdir -p -f" |
| 259 |
|
|
| 198 |
– |
dnl **** Final list of subdirs |
| 199 |
– |
SUBDIRS="libBASS libmdtools src forceFields samples utils utils/sysbuilder third-party " |
| 200 |
– |
|
| 260 |
|
dnl **** Define CFLAGS etc empty to prevent configure from setting them |
| 261 |
|
CFLAGS=${CFLAGS-""} |
| 262 |
|
CXXFLAGS=${CXXFLAGS-""} |
| 291 |
|
AC_SUBST(LDFLAGS) |
| 292 |
|
AC_SUBST(PREPFLAG) |
| 293 |
|
AC_SUBST(PREPDEFFLAG) |
| 294 |
< |
AC_CONFIG_HEADER([libBASS/config.h libmdtools/config.h]) |
| 295 |
< |
AC_CONFIG_FILES([Makefile |
| 296 |
< |
libBASS/Makefile libmdtools/Makefile src/Makefile utils/Makefile |
| 238 |
< |
utils/sysbuilder/Makefile forceFields/Makefile samples/Makefile |
| 239 |
< |
third-party/Makefile |
| 240 |
< |
samples/alkane/Makefile samples/argon/Makefile |
| 241 |
< |
samples/lipid/Makefile samples/minimizer/Makefile |
| 242 |
< |
samples/metals/Makefile samples/water/Makefile |
| 243 |
< |
samples/water/dimer/Makefile samples/water/spce/Makefile |
| 244 |
< |
samples/water/ssd/Makefile samples/water/ssde/Makefile |
| 245 |
< |
samples/water/tip4p/Makefile samples/water/tip3p_ice/Makefile |
| 246 |
< |
samples/zcons/Makefile |
| 247 |
< |
]) |
| 294 |
> |
AC_SUBST(F90_MODULE_NAMES) |
| 295 |
> |
AC_CONFIG_HEADER([src/config.h]) |
| 296 |
> |
AC_CONFIG_FILES([make/Makefile src/utils/Makefile]) |
| 297 |
|
|
| 298 |
|
AC_OUTPUT |