From 8793f180d6aee6c46a4102cab30b9eb64aa87805 Mon Sep 17 00:00:00 2001 From: eschnett Date: Wed, 24 Oct 2012 20:59:34 +0000 Subject: Don't use OpenMP options unless OpenMP is enabled for the build git-svn-id: http://svn.cactuscode.org/projects/ExternalLibraries/LORENE/trunk@39 5c1b1641-b641-47ec-b3d9-0f93d4c445ee --- configure.sh | 45 +++++++++++++++++++++++++++++++-------------- 1 file changed, 31 insertions(+), 14 deletions(-) diff --git a/configure.sh b/configure.sh index 59335a1..7e0bcad 100644 --- a/configure.sh +++ b/configure.sh @@ -80,8 +80,25 @@ then if echo '' ${ARFLAGS} | grep 64 > /dev/null 2>&1; then export OBJECT_MODE=64 fi + + ####################################################################### + # determine OPENMP_MODE from the OPENMP option + # if this option isn't set, then OPENMP_MODE will default to 'no' + OPENMP_MODE='no' + if test -n "${OPENMP}"; then + + OPENMP=`echo ${OPENMP} | tr '[:upper:]' '[:lower:]'` + + if test "${OPENMP}" != 'yes' -a "${OPENMP}" != 'no'; then + echo 'BEGIN ERROR' + echo "configure: error: Didn't recognize setting of OPENMP=\"$OPENMP\" (should be either \"yes\" or \"no\")" + echo 'END ERROR' + exit 1 + fi + OPENMP_MODE="${OPENMP}" + fi - echo "HDF5: Preparing directory structure..." + echo "LORENE: Preparing directory structure..." mkdir build external done 2> /dev/null || true rm -rf ${BUILD_DIR} ${INSTALL_DIR} mkdir ${BUILD_DIR} ${INSTALL_DIR} @@ -99,12 +116,12 @@ then # exit code. So we use this patch to test for this ${PATCH?} -p0 < ${SRCDIR}/dist/patchtest.patch if [ ! -e Lorene/.patch_tmp ]; then - echo 'BEGIN ERROR' - echo 'The version of patch is too old to understand this patch format.' - echo 'Please set the PATCH environment variable to a more recent ' - echo 'version of the patch command.' - echo 'END ERROR' - exit 1 + echo 'BEGIN ERROR' + echo 'The version of patch is too old to understand this patch format.' + echo 'Please set the PATCH environment variable to a more recent ' + echo 'version of the patch command.' + echo 'END ERROR' + exit 1 fi rm -f Lorene/.patch_tmp # Prevent overly long lines @@ -127,11 +144,11 @@ then export HOME_LORENE=${BUILD_DIR}/${NAME} cat > local_settings < ${DONE_FILE} echo "LORENE: Done." -- cgit v1.2.3