From 60a60e79cdf809984c16e55d6dfb1cb6b3c58485 Mon Sep 17 00:00:00 2001 From: "Benjamin S. Kirk" Date: Mon, 4 Feb 2013 11:16:35 -0800 Subject: [PATCH] case statement is clearer --- configure | 29 +++++++++++++++++------------ m4/exodus.m4 | 33 +++++++++++++++++++-------------- 2 files changed, 36 insertions(+), 26 deletions(-) diff --git a/configure b/configure index c82b08b64aa..9838d5338ac 100755 --- a/configure +++ b/configure @@ -31791,28 +31791,33 @@ fi exodusversion=no fi - if (test "x$exodusversion" = "xv5.09"); then - # The EXODUS API is distributed with libmesh, so we don't have to guess - # where it might be installed... - EXODUS_INCLUDE="-I\$(top_srcdir)/contrib/exodusii/$exodusversion/include" + case "${exodusversion}" in + + "v5.09") + # The EXODUS API is distributed with libmesh, so we don't have to guess + # where it might be installed... + EXODUS_INCLUDE="-I\$(top_srcdir)/contrib/exodusii/$exodusversion/include" $as_echo "#define HAVE_EXODUS_API 1" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with Exodus version $exodusversion support >>>" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with Exodus version $exodusversion support >>>" >&5 $as_echo "<<< Configuring library with Exodus version $exodusversion support >>>" >&6; } + ;; - elif (test "x$exodusversion" = "xv5.22"); then - EXODUS_INCLUDE="-I\$(top_srcdir)/contrib/exodusii/$exodusversion/exodus/cbind/include" + "v5.22") + EXODUS_INCLUDE="-I\$(top_srcdir)/contrib/exodusii/$exodusversion/exodus/cbind/include" $as_echo "#define HAVE_EXODUS_API 1" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with Exodus version $exodusversion support >>>" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with Exodus version $exodusversion support >>>" >&5 $as_echo "<<< Configuring library with Exodus version $exodusversion support >>>" >&6; } + ;; - else - EXODUS_INCLUDE="" - enableexodus=no - fi + *) + EXODUS_INCLUDE="" + enableexodus=no + ;; + esac ac_config_files="$ac_config_files contrib/exodusii/v5.09/Makefile" diff --git a/m4/exodus.m4 b/m4/exodus.m4 index f68a803c3dc..12e31bd1d1f 100644 --- a/m4/exodus.m4 +++ b/m4/exodus.m4 @@ -20,22 +20,27 @@ AC_DEFUN([CONFIGURE_EXODUS], exodusversion=no fi - if (test "x$exodusversion" = "xv5.09"); then - # The EXODUS API is distributed with libmesh, so we don't have to guess - # where it might be installed... - EXODUS_INCLUDE="-I\$(top_srcdir)/contrib/exodusii/$exodusversion/include" - AC_DEFINE(HAVE_EXODUS_API, 1, [Flag indicating whether the library will be compiled with Exodus support]) - AC_MSG_RESULT(<<< Configuring library with Exodus version $exodusversion support >>>) + case "${exodusversion}" in + + "v5.09") + # The EXODUS API is distributed with libmesh, so we don't have to guess + # where it might be installed... + EXODUS_INCLUDE="-I\$(top_srcdir)/contrib/exodusii/$exodusversion/include" + AC_DEFINE(HAVE_EXODUS_API, 1, [Flag indicating whether the library will be compiled with Exodus support]) + AC_MSG_RESULT(<<< Configuring library with Exodus version $exodusversion support >>>) + ;; - elif (test "x$exodusversion" = "xv5.22"); then - EXODUS_INCLUDE="-I\$(top_srcdir)/contrib/exodusii/$exodusversion/exodus/cbind/include" - AC_DEFINE(HAVE_EXODUS_API, 1, [Flag indicating whether the library will be compiled with Exodus support]) - AC_MSG_RESULT(<<< Configuring library with Exodus version $exodusversion support >>>) + "v5.22") + EXODUS_INCLUDE="-I\$(top_srcdir)/contrib/exodusii/$exodusversion/exodus/cbind/include" + AC_DEFINE(HAVE_EXODUS_API, 1, [Flag indicating whether the library will be compiled with Exodus support]) + AC_MSG_RESULT(<<< Configuring library with Exodus version $exodusversion support >>>) + ;; - else - EXODUS_INCLUDE="" - enableexodus=no - fi + *) + EXODUS_INCLUDE="" + enableexodus=no + ;; + esac AC_CONFIG_FILES([contrib/exodusii/v5.09/Makefile]) AC_CONFIG_FILES([contrib/exodusii/v5.22/exodus/cbind/Makefile])