https://github.com/geodynamics/citcoms
Revision 0f33eded334e24c7e68c58202eaafb8a7b242bc4 authored by Leif Strand on 28 September 2005, 23:26:16 UTC, committed by Leif Strand on 28 September 2005, 23:26:16 UTC
that installing multiple packages to a single PREFIX "just works". This also attempts to simulate the final installation environment, which might make a difference in unusual cases. Also, 'sed' the install-time PYTHONPATH into CitComS scripts (instead of an explicit list of @pythondir@'s). Added _getPrivateDepositoryLocations() and CitcomS.pml. Changed "etc/citcoms" to "etc/CitcomS" for consistency with the Python package name. Add PACKAGE_VERSION to __init__.py, and added pyconfig-generated config.py. Freeze the full path to 'mpirun' and 'mpipython.exe' at 'configure' time. First crack at batch system configuration.
1 parent 76bf816
Tip revision: 0f33eded334e24c7e68c58202eaafb8a7b242bc4 authored by Leif Strand on 28 September 2005, 23:26:16 UTC
Add ${pythondir} to PYTHONPATH before checking for Python modules, so
Add ${pythondir} to PYTHONPATH before checking for Python modules, so
Tip revision: 0f33ede
configure.ac
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
# $Id$
AC_PREREQ(2.59)
AC_INIT([CitcomS], [2.1.0], [cig-mc@geodynamics.org], [CitcomS])
AC_CONFIG_AUX_DIR([./aux-config])
AC_CONFIG_SRCDIR([drivers/Citcom.c])
AC_CONFIG_HEADER([portinfo])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([foreign])
# 'configure' options
AC_ARG_VAR(PYTHON, [Python interpreter])
AC_ARG_VAR(PYTHONPATH, [Python module search path])
AC_ARG_VAR(MPIRUN, [command to run MPI programs])
AC_ARG_VAR(BSUB, [command to submit LSF batch jobs])
AC_ARG_VAR(QSUB, [command to submit PBS batch jobs])
AC_ARG_VAR(GLOBUSRUN, [command to submit Globus batch jobs])
AC_ARG_VAR(BATCHTYPE, [default batch system (lsf, pbs, or globus)])
AC_ARG_WITH([pyre],
[AC_HELP_STRING([--with-pyre],
[build Pyre modules @<:@default=yes@:>@])],
[want_pyre="$withval"],
[want_pyre=yes])
AM_CONDITIONAL([COND_PYRE], [test "$want_pyre" = yes])
# Checks for programs.
if test "$want_pyre" = yes; then
AM_PATH_PYTHON([2.3])
CIT_PYTHON_INCDIR
AC_PATH_PROG([MPIRUN], [mpirun])
if test -z "$MPIRUN"; then
AC_MSG_ERROR([program 'mpirun' not found])
fi
AC_PATH_PROG([BSUB], [bsub])
AC_PATH_PROG([QSUB], [qsub])
AC_PATH_PROG([GLOBUSRUN], [globusrun])
if test -z "$BATCHTYPE"; then
if test -n "$BSUB"; then
LAUNCHER="lsf"
elif test -n "$QSUB"; then
LAUNCHER="pbs"
elif test -n "$GLOBUSRUN"; then
LAUNCHER="globus"
else
if $MPIRUN --help 2>&1 | grep machinefile >/dev/null; then
LAUNCHER="mpich"
else
LAUNCHER="lam-mpi"
fi
fi
test -z "$BSUB" && BSUB="bsub"
test -z "$QSUB" && QSUB="qsub"
test -z "$GLOBUSRUN" && GLOBUSRUN="globusrun"
else
case "$BATCHTYPE" in
lsf | pbs | globus) LAUNCHER=$BATCHTYPE ;;
*) AC_MSG_ERROR([BATCHTYPE=$BATCHTYPE is invalid]) ;;
esac
fi
AC_SUBST([LAUNCHER])
fi
CIT_PROG_MPICC
CIT_PROG_MPICXX
AC_PROG_LIBTOOL
CIT_PROG_PYCONFIG
AC_SUBST([pkgsysconfdir], [\${sysconfdir}/$PACKAGE])
# Checks for Python modules and packages.
if test "$want_pyre" = yes; then
PYTHONPATH="${pythondir}${PYTHONPATH:+:${PYTHONPATH}}"; export PYTHONPATH
CIT_PATH_PYTHIA([0.8], [mpi])
CIT_PATH_EXCHANGER([1.0])
AC_SUBST([PYTHONPATH])
fi
# Checks for libraries.
CIT_CHECK_LIB_MPI
# Checks for header files.
CIT_HEADER_MPI
AC_CHECK_HEADERS([malloc.h])
# Checks for typedefs, structures, and compiler characteristics.
# Checks for library functions.
AC_ARG_VAR(LIBM, [math library])
if test -z "$LIBM"; then
AC_CHECK_FUNC(sqrt, , [
AC_CHECK_LIB(m, sqrt, [
LIBM="-lm"
])
])
fi
AC_SUBST(LIBM)
AC_CONFIG_FILES([Makefile
drivers/Makefile
etc/Makefile
examples/Makefile
lib/Makefile
lib/Common/Makefile
lib/Full/Makefile
lib/Regional/Makefile
module/Makefile
module/Exchanger/Makefile
module/Full/Makefile
module/Regional/Makefile
pyre/Makefile
tests/Makefile
visual/Makefile])
if test "$want_pyre" = yes; then
AC_CONFIG_SUBDIRS([pythia-0.8 Exchanger])
fi
AC_OUTPUT
dnl end of configure.ac
Computing file changes ...