diff options
author | James Peach <jpeach@samba.org> | 2007-04-22 03:17:31 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:19:34 -0500 |
commit | aa14900f8291a017aa7fab2bbb9a6c79b12889b2 (patch) | |
tree | 381894795338625407c531ee5f0f0de38ed29060 /source/m4/cond.m4 | |
parent | 0890cb941ed5d87a919edb5a896f331e900af007 (diff) | |
download | samba-aa14900f8291a017aa7fab2bbb9a6c79b12889b2.tar.gz samba-aa14900f8291a017aa7fab2bbb9a6c79b12889b2.tar.xz samba-aa14900f8291a017aa7fab2bbb9a6c79b12889b2.zip |
r22441: Add automatic dependency tracking. The dependency generation is
toolchain independent, but since there's no portable method for
doing makefile includes, we can actually use the dependencies with
GNU make. It's easy to add this for other makes, but I don't have
any to test.
This also moves as much m4 as possible into the m4 directory where
no-one has to look at it. AFAICT, there's no way to hide depcomp
in there too, which is unfortunate.
Diffstat (limited to 'source/m4/cond.m4')
-rw-r--r-- | source/m4/cond.m4 | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/source/m4/cond.m4 b/source/m4/cond.m4 new file mode 100644 index 00000000000..d9a58d2f39a --- /dev/null +++ b/source/m4/cond.m4 @@ -0,0 +1,34 @@ +# AM_CONDITIONAL -*- Autoconf -*- + +# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 8 + +# AM_CONDITIONAL(NAME, SHELL-CONDITION) +# ------------------------------------- +# Define a conditional. +AC_DEFUN([AM_CONDITIONAL], +[AC_PREREQ(2.52)dnl + ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi +AC_CONFIG_COMMANDS_PRE( +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR([[conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]]) +fi])]) |