summaryrefslogtreecommitdiffstats
path: root/src/build_macros.m4
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2012-11-15 18:22:29 +0100
committerJakub Hrozek <jhrozek@redhat.com>2012-11-16 18:34:05 +0100
commita7b3c030510277e16baf4cc0619c877a584b2eec (patch)
tree56b717e9ba57db4f1fa1e496c4185fcbf9c8464d /src/build_macros.m4
parent2faa9ecad5a45a949be5ea95aa9e140eeba0fe68 (diff)
downloadsssd-a7b3c030510277e16baf4cc0619c877a584b2eec.tar.gz
sssd-a7b3c030510277e16baf4cc0619c877a584b2eec.tar.xz
sssd-a7b3c030510277e16baf4cc0619c877a584b2eec.zip
Provide AM_COND_IF-combatible implementation for old automake systems
AM_COND_IF is a very handy construct that is not present on old automake systems such as the one in RHEL5. The original author of the code is Ralf Corsepius <rc040203 -at- freenet.de>
Diffstat (limited to 'src/build_macros.m4')
-rw-r--r--src/build_macros.m415
1 files changed, 15 insertions, 0 deletions
diff --git a/src/build_macros.m4 b/src/build_macros.m4
index 37d964392..8cd2d3cde 100644
--- a/src/build_macros.m4
+++ b/src/build_macros.m4
@@ -19,3 +19,18 @@ AC_DEFUN([BUILD_WITH_AUX_INFO],
[Build with -aux-info output])])
])
AM_CONDITIONAL([WANT_AUX_INFO], [test x$with_aux_info = xyes])
+
+dnl AC_CONFIG_FILES conditionalization requires using AM_COND_IF, however
+dnl dnl AM_COND_IF is new to Automake 1.11. To use it on new Automake without
+dnl dnl requiring same, a fallback implementation for older Autoconf is provided.
+dnl dnl Note that disabling of AC_CONFIG_FILES requires Automake 1.11, this code
+dnl dnl is correct only in terms of m4sh generated script.
+m4_ifndef([AM_COND_IF], [AC_DEFUN([AM_COND_IF], [
+if test -z "$$1_TRUE"; then :
+m4_n([$2])[]dnl
+m4_ifval([$3],
+[else
+$3
+])dnl
+fi[]dnl
+])])