annotate aclocal.m4 @ 2:7bf4a164d5bb default tip

fix bug: long_options have to be zero terminated
author Peter Meerwald <p.meerwald@bct-electronic.com>
date Fri, 20 Jul 2012 11:28:30 +0200
parents b8f7423e385c
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
1 dnl aclocal.m4 generated automatically by aclocal 1.4-p4
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
2
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
3 dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
4 dnl This file is free software; the Free Software Foundation
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
5 dnl gives unlimited permission to copy and/or distribute it,
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
6 dnl with or without modifications, as long as this notice is preserved.
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
7
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
8 dnl This program is distributed in the hope that it will be useful,
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
9 dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
10 dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
11 dnl PARTICULAR PURPOSE.
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
12
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
13 dnl
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
14 dnl Add macros
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
15 dnl JAPHAR_GREP_CFLAGS
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
16 dnl
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
17
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
18 dnl
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
19 dnl JAPHAR_GREP_CFLAGS(flag, cmd_if_missing, cmd_if_present)
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
20 dnl
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
21 dnl From Japhar. Report changes to japhar@hungry.com
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
22 dnl
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
23 AC_DEFUN(JAPHAR_GREP_CFLAGS,
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
24 [case "$CFLAGS" in
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
25 "$1" | "$1 "* | *" $1" | *" $1 "* )
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
26 ifelse($#, 3, [$3], [:])
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
27 ;;
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
28 *)
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
29 $2
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
30 ;;
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
31 esac
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
32 ])
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
33
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
34 AC_DEFUN(CHRPATH_LDRPATH_OPTION,
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
35 [AC_REQUIRE([AC_CANONICAL_TARGET])[]dnl
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
36 case "$target" in
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
37 *-linux*)
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
38 LDRPATH=-Wl,-rpath,
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
39 ;;
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
40 *-*-irix*|*-*-osf*)
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
41 LDRPATH="-rpath "
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
42 ;;
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
43 *-*-hpux*)
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
44 # Hm, this seem to set runpath on ia64, not rpath
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
45 LDRPATH="-Wl,+b,"
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
46 ;;
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
47 *-*-darwin*)
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
48 # No idea how to add rpath/runpath on Darwin
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
49 LDRPATH=""
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
50 ;;
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
51 *)
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
52 LDRPATH="-R "
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
53 ;;
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
54 esac
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
55 AC_SUBST(LDRPATH)
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
56 ])
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
57
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
58 # Do all the work for Automake. This macro actually does too much --
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
59 # some checks are only needed if your package does certain things.
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
60 # But this isn't really a big deal.
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
61
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
62 # serial 1
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
63
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
64 dnl Usage:
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
65 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
66
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
67 AC_DEFUN(AM_INIT_AUTOMAKE,
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
68 [AC_REQUIRE([AC_PROG_INSTALL])
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
69 PACKAGE=[$1]
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
70 AC_SUBST(PACKAGE)
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
71 VERSION=[$2]
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
72 AC_SUBST(VERSION)
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
73 dnl test to see if srcdir already configured
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
74 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
75 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
76 fi
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
77 ifelse([$3],,
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
78 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
79 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
80 AC_REQUIRE([AM_SANITY_CHECK])
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
81 AC_REQUIRE([AC_ARG_PROGRAM])
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
82 dnl FIXME This is truly gross.
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
83 missing_dir=`cd $ac_aux_dir && pwd`
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
84 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
85 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
86 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
87 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
88 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
89 AC_REQUIRE([AC_PROG_MAKE_SET])])
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
90
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
91 #
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
92 # Check to make sure that the build environment is sane.
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
93 #
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
94
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
95 AC_DEFUN(AM_SANITY_CHECK,
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
96 [AC_MSG_CHECKING([whether build environment is sane])
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
97 # Just in case
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
98 sleep 1
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
99 echo timestamp > conftestfile
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
100 # Do `set' in a subshell so we don't clobber the current shell's
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
101 # arguments. Must try -L first in case configure is actually a
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
102 # symlink; some systems play weird games with the mod time of symlinks
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
103 # (eg FreeBSD returns the mod time of the symlink's containing
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
104 # directory).
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
105 if (
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
106 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
107 if test "[$]*" = "X"; then
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
108 # -L didn't work.
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
109 set X `ls -t $srcdir/configure conftestfile`
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
110 fi
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
111 if test "[$]*" != "X $srcdir/configure conftestfile" \
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
112 && test "[$]*" != "X conftestfile $srcdir/configure"; then
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
113
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
114 # If neither matched, then we have a broken ls. This can happen
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
115 # if, for instance, CONFIG_SHELL is bash and it inherits a
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
116 # broken ls alias from the environment. This has actually
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
117 # happened. Such a system could not be considered "sane".
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
118 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
119 alias in your environment])
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
120 fi
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
121
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
122 test "[$]2" = conftestfile
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
123 )
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
124 then
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
125 # Ok.
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
126 :
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
127 else
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
128 AC_MSG_ERROR([newly created file is older than distributed files!
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
129 Check your system clock])
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
130 fi
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
131 rm -f conftest*
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
132 AC_MSG_RESULT(yes)])
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
133
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
134 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
135 dnl The program must properly implement --version.
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
136 AC_DEFUN(AM_MISSING_PROG,
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
137 [AC_MSG_CHECKING(for working $2)
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
138 # Run test in a subshell; some versions of sh will print an error if
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
139 # an executable is not found, even if stderr is redirected.
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
140 # Redirect stdin to placate older versions of autoconf. Sigh.
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
141 if ($2 --version) < /dev/null > /dev/null 2>&1; then
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
142 $1=$2
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
143 AC_MSG_RESULT(found)
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
144 else
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
145 $1="$3/missing $2"
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
146 AC_MSG_RESULT(missing)
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
147 fi
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
148 AC_SUBST($1)])
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
149
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
150 # Like AC_CONFIG_HEADER, but automatically create stamp file.
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
151
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
152 AC_DEFUN(AM_CONFIG_HEADER,
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
153 [AC_PREREQ([2.12])
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
154 AC_CONFIG_HEADER([$1])
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
155 dnl When config.status generates a header, we must update the stamp-h file.
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
156 dnl This file resides in the same directory as the config header
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
157 dnl that is generated. We must strip everything past the first ":",
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
158 dnl and everything past the last "/".
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
159 AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
160 ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
161 <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
162 <<am_indx=1
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
163 for am_file in <<$1>>; do
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
164 case " <<$>>CONFIG_HEADERS " in
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
165 *" <<$>>am_file "*<<)>>
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
166 echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
167 ;;
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
168 esac
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
169 am_indx=`expr "<<$>>am_indx" + 1`
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
170 done<<>>dnl>>)
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
171 changequote([,]))])
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
172
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
173 # Add --enable-maintainer-mode option to configure.
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
174 # From Jim Meyering
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
175
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
176 # serial 1
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
177
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
178 AC_DEFUN(AM_MAINTAINER_MODE,
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
179 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
180 dnl maintainer-mode is disabled by default
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
181 AC_ARG_ENABLE(maintainer-mode,
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
182 [ --enable-maintainer-mode enable make rules and dependencies not useful
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
183 (and sometimes confusing) to the casual installer],
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
184 USE_MAINTAINER_MODE=$enableval,
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
185 USE_MAINTAINER_MODE=no)
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
186 AC_MSG_RESULT($USE_MAINTAINER_MODE)
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
187 AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
188 MAINT=$MAINTAINER_MODE_TRUE
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
189 AC_SUBST(MAINT)dnl
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
190 ]
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
191 )
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
192
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
193 # Define a conditional.
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
194
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
195 AC_DEFUN(AM_CONDITIONAL,
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
196 [AC_SUBST($1_TRUE)
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
197 AC_SUBST($1_FALSE)
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
198 if $2; then
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
199 $1_TRUE=
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
200 $1_FALSE='#'
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
201 else
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
202 $1_TRUE='#'
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
203 $1_FALSE=
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
204 fi])
b8f7423e385c import 0.13
Peter Meerwald <pmeerw@pmeerw.net>
parents:
diff changeset
205

Repositories maintained by Peter Meerwald, pmeerw@pmeerw.net.