--- trunk/OOPSE_old/configure.ac 2003/02/13 20:37:36 267 +++ trunk/OOPSE_old/configure.ac 2003/03/19 17:29:41 366 @@ -1,4 +1,4 @@ -AC_INIT([OOPSE],0.5) +AC_INIT([oopse],0.5) AC_CONFIG_SRCDIR(src/mySrc) AM_CONFIG_HEADER(./config.h) AM_INIT_AUTOMAKE @@ -10,4 +10,57 @@ AC_OUTPUT([Makefile src/Makefile src/mdtools/Makefile AC_PROG_YACC AC_PROG_RANLIB AC_PROG_INSTALL -AC_OUTPUT([Makefile src/Makefile src/mdtools/Makefile src/mdtools/libBASS/Makefile]) + +dnl ***************************************************** +dnl set up compiler and machine dependent fortran files +dnl ***************************************************** + +case $F77 in + ifc) fortran_machine_defs='Linux_ifc_machdep.$(OBJEXT)' flibs_extra='-lPEPCF90' ;; + *) AC_MSG_ERROR([currently only ifc is supported as the fortran compiler. See README for details]) ;; +esac +AC_SUBST([fortran_machine_defs]) +AC_SUBST([flibs_extra]) + +dnl ***************************************************** +dnl check for libs and headers +dnl ****************************************************** + + +AC_ARG_WITH(sprng_include, + AC_HELP_STRING([--with-sprng_include=], + [specify the location of the sprng headers (default is /usr/local/include/sprng)]), + [sprng_include="$withval"], [sprng_include="/usr/local/include/sprng"] ) +AC_SUBST(sprng_include) +AC_CHECK_HEADERS([$sprng_include/sprng.h], + AC_DEFINE(USE_SPRNG, 1, [define whether we have the sprng libraries]), + AC_MSG_ERROR(sprng header files not found.)) + +AC_ARG_WITH(sprng_libdir, + AC_HELP_STRING([--with-sprng_libdir=], + [specify the location of the sprng libraries (default is /usr/local/lib)]), + [sprng_libdir="$withval"], [sprng_libdir="/usr/local/lib"] ) +AC_SUBST(sprng_libdir) +AC_CHECK_FILE([$sprng_libdir/libsprng.a],, + AC_MSG_ERROR(libsprng.a not found.)) + +AC_ARG_WITH(mpich_include, + AC_HELP_STRING([--with-mpich_include=], + [specify the location of the mpich headers (default is /usr/local/include)]), + [mpich_include="$withval"], [mpich_include="/usr/local/include"] ) +AC_SUBST(mpich_include) +AC_CHECK_HEADERS([$mpich_include/mpi.h], + AC_DEFINE(HAVE_MPICH, 1, [define whether we have the mpich libraries]), + AC_MSG_ERROR(mpich header files not found.)) + +AC_ARG_WITH(mpich_libdir, + AC_HELP_STRING([--with-mpich_libdir=], + [specify the location of the mpuch libraries (default is /usr/local/lib)]), + [mpich_libdir="$withval"], [mpich_libdir="/usr/local/lib"] ) +AC_SUBST(mpich_libdir) +AC_CHECK_FILE([$mpich_libdir/libmpich.a],, + AC_MSG_ERROR(libmpi.a not found.)) + + +AC_OUTPUT([Makefile forceFields/Makefile src/Makefile src/mdtools/Makefile src/mdtools/libBASS/Makefile src/mdtools/libmdCode/Makefile\ + src/oose/Makefile src/oopse/Makefile])