summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Schink <swo-dev@marcschink.de>2017-06-06 12:24:12 +0200
committerMarc Schink <swo-dev@marcschink.de>2017-07-11 10:15:26 +0200
commit6a548457d12e154bdf7820303189f27d5bc146bd (patch)
treed50d96a1378f20e2e83463130d359ce5e61467e3
parent7d9dcb9135dd0850cbf00ef7c68490242e9f1adb (diff)
configure.ac: Code cleanup
-rw-r--r--configure.ac86
1 files changed, 35 insertions, 51 deletions
diff --git a/configure.ac b/configure.ac
index 91557bf..888b65d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -98,62 +98,46 @@ AC_ARG_ENABLE([python], AS_HELP_STRING([--enable-python],
[enable Python bindings [default=yes]]),
[], [enable_python="yes"])
-if test "x$enable_cxx" != "xno"; then
- enable_cxx="yes"
-fi
+AS_IF([test "x$enable_cxx" != "xno"],
+ [enable_cxx="yes"])
-if test "x$enable_python" != "xno"; then
- enable_python="yes"
-fi
+AS_IF([test "x$enable_python" != "xno"],
+ [enable_python="yes"])
cxx_msg=""
python_msg=""
-if test "x$HAVE_CXX" = "xno"; then
- cxx_msg="C++ compiler required"
-fi
-
-if test "x$enable_cxx" = "xno"; then
- cxx_msg="disabled"
-fi
-
-if test -z "$cxx_msg"; then
- BINDINGS_CXX=$enable_cxx
-else
- BINDINGS_CXX="no"
- cxx_msg=" ($cxx_msg)"
-fi
-
-if test "x$HAVE_PYMOD_SETUPTOOLS" = "xno"; then
- python_msg="Python setuptools required"
-fi
-
-if test "x$SWIG" = "x"; then
- python_msg="SWIG required"
-fi
-
-if test "x$HAVE_PYTHON_DEV" = "xno"; then
- python_msg="Python development files required"
-fi
-
-if test "x$HAVE_PYTHON" = "xno"; then
- python_msg="Python interpreter required"
-fi
-
-if test "x$enable_python$BINDINGS_CXX" = "xyesno"; then
- python_msg="C++ bindings required"
-fi
-
-if test "x$enable_python" = "xno"; then
- python_msg="disabled"
-fi
-
-if test -z "$python_msg"; then
- BINDINGS_PYTHON=$enable_python
-else
- BINDINGS_PYTHON="no"
- python_msg=" ($python_msg)"
-fi
+AS_IF([test "x$HAVE_CXX" = "xno"],
+ [cxx_msg="C++ compiler required"])
+
+AS_IF([test "x$enable_cxx" = "xno"],
+ [cxx_msg="disabled"])
+
+AS_IF([test -z "$cxx_msg"],
+ [BINDINGS_CXX=$enable_cxx],
+ [BINDINGS_CXX="no"; cxx_msg=" ($cxx_msg)"])
+
+AS_IF([test "x$HAVE_PYMOD_SETUPTOOLS" = "xno"],
+ [python_msg="Python setuptools required"])
+
+AS_IF([test "x$SWIG" = "x"],
+ [python_msg="SWIG required"])
+
+AS_IF([test "x$HAVE_PYTHON_DEV" = "xno"],
+ [python_msg="Python development files required"])
+
+AS_IF([test "x$HAVE_PYTHON" = "xno"],
+ [python_msg="Python interpreter required"])
+
+AS_IF([test "x$enable_python$BINDINGS_CXX" = "xyesno"],
+ [python_msg="C++ bindings required"])
+
+AS_IF([test "x$enable_python" = "xno"],
+ [python_msg="disabled"])
+
+AS_IF([test -z "$python_msg"],
+ [BINDINGS_PYTHON=$enable_python],
+ [BINDINGS_PYTHON="no"; python_msg=" ($python_msg)"])
AM_CONDITIONAL([BINDINGS_CXX], [test "x$BINDINGS_CXX" = "xyes"])
AM_CONDITIONAL([BINDINGS_PYTHON], [test "x$BINDINGS_PYTHON" = "xyes"])