summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikhail Zabaluev <mikhail.zabaluev@gmail.com>2012-09-12 14:22:56 +0300
committerMikhail Zabaluev <mikhail.zabaluev@gmail.com>2012-09-12 14:22:56 +0300
commit5430f1c7dae4cad41906b4bab274955c43287e64 (patch)
treebe6f095e173c9e80b0247d4d2b121265f23dc21e
parentb0d9f44e34d9a86efa80ad1d51551a08273437f8 (diff)
Converted all if statements in configure.ac to AS_IFautoconfiscate
-rw-r--r--configure.ac31
1 files changed, 19 insertions, 12 deletions
diff --git a/configure.ac b/configure.ac
index bad1b3e..a26589c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -70,17 +70,19 @@ AC_SUBST([ERROR_CFLAGS])
# these aren't really error flags but they serve a similar purpose for us -
# making the toolchain stricter
-if test "x$enable_fatal_warnings" = xyes; then
+AS_IF([test "x$enable_fatal_warnings" = xyes],
+[
TP_ADD_LINKER_FLAG([ERROR_LDFLAGS], [-Wl,--no-copy-dt-needed-entries])
-fi
+])
AC_ARG_ENABLE(debug,
AS_HELP_STRING([--disable-debug],[omit debug code]),
enable_debug=$enableval, enable_debug=yes )
-if test x$enable_debug = xyes; then
+AS_IF([test x$enable_debug = xyes],
+[
AC_DEFINE(ENABLE_DEBUG, [], [Enable debug code])
-fi
+])
AM_CONDITIONAL([ENABLE_DEBUG], [test "x$enable_debug" = xyes])
AC_C_INLINE
@@ -106,38 +108,43 @@ AC_ARG_WITH(iphb,
[],
[with_iphb=no]
)
-if test "x$with_iphb" != xno; then
+AS_IF([test "x$with_iphb" != xno],
+[
PKG_CHECK_MODULES(IPHB, [libiphb >= 0.61.31],
[
AC_DEFINE([HAVE_LIBIPHB], [], [IP heartbeat library is available])
]
)
-else
+],
+[
IPHB_CFLAGS=
IPHB_LIBS=
-fi
+])
AC_SUBST(IPHB_CFLAGS)
AC_SUBST(IPHB_LIBS)
dnl Check for code generation tools
XSLTPROC=
AC_CHECK_PROGS([XSLTPROC], [xsltproc])
-if test -z "$XSLTPROC"; then
+AS_IF([test -z "$XSLTPROC"],
+[
AC_MSG_ERROR([xsltproc (from the libxslt source package) is required])
-fi
+])
AM_PATH_PYTHON([2.3],[],
[AC_MSG_ERROR([Python is required to compile this package])]
)
dnl Check for twisted python for tests
AC_MSG_CHECKING([for TwistedPython with SIP protocol support])
-if $PYTHON -c "import twisted.protocols.sip, twisted.internet.reactor" >/dev/null 2>&1; then
+AS_IF([$PYTHON -c "import twisted.protocols.sip, twisted.internet.reactor" >/dev/null 2>&1],
+[
AC_MSG_RESULT([yes])
AM_CONDITIONAL([WANT_TWISTED_TESTS], true)
-else
+],
+[
AC_MSG_RESULT([no])
AM_CONDITIONAL([WANT_TWISTED_TESTS], false)
-fi
+])
AC_CONFIG_FILES([
Makefile