]>
Commit | Line | Data |
---|---|---|
dfac8a13 TT |
1 | dnl aclocal.m4 generated automatically by aclocal 1.4 |
2 | ||
3 | dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. | |
4 | dnl This file is free software; the Free Software Foundation | |
5 | dnl gives unlimited permission to copy and/or distribute it, | |
6 | dnl with or without modifications, as long as this notice is preserved. | |
7 | ||
8 | dnl This program is distributed in the hope that it will be useful, | |
9 | dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without | |
10 | dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A | |
11 | dnl PARTICULAR PURPOSE. | |
12 | ||
a8aea176 | 13 | sinclude(../config/no-executables.m4) |
0fd91e0a AO |
14 | sinclude(../libtool.m4) |
15 | dnl The lines below arrange for aclocal not to bring libtool.m4 | |
16 | dnl AM_PROG_LIBTOOL into aclocal.m4, while still arranging for automake | |
17 | dnl to add a definition of LIBTOOL to Makefile.in. | |
18 | ifelse(yes,no,[ | |
19 | AC_DEFUN([AM_PROG_LIBTOOL],) | |
20 | AC_SUBST(LIBTOOL) | |
21 | ]) | |
22 | ||
dfac8a13 TT |
23 | # Do all the work for Automake. This macro actually does too much -- |
24 | # some checks are only needed if your package does certain things. | |
25 | # But this isn't really a big deal. | |
26 | ||
27 | # serial 1 | |
28 | ||
29 | dnl Usage: | |
30 | dnl AM_INIT_AUTOMAKE(package,version, [no-define]) | |
31 | ||
32 | AC_DEFUN(AM_INIT_AUTOMAKE, | |
33 | [AC_REQUIRE([AC_PROG_INSTALL]) | |
34 | PACKAGE=[$1] | |
35 | AC_SUBST(PACKAGE) | |
36 | VERSION=[$2] | |
37 | AC_SUBST(VERSION) | |
38 | dnl test to see if srcdir already configured | |
39 | if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then | |
40 | AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) | |
41 | fi | |
42 | ifelse([$3],, | |
43 | AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) | |
44 | AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])) | |
45 | AC_REQUIRE([AM_SANITY_CHECK]) | |
46 | AC_REQUIRE([AC_ARG_PROGRAM]) | |
47 | dnl FIXME This is truly gross. | |
48 | missing_dir=`cd $ac_aux_dir && pwd` | |
49 | AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir) | |
50 | AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) | |
51 | AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir) | |
52 | AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) | |
53 | AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) | |
54 | AC_REQUIRE([AC_PROG_MAKE_SET])]) | |
55 | ||
56 | # | |
57 | # Check to make sure that the build environment is sane. | |
58 | # | |
59 | ||
60 | AC_DEFUN(AM_SANITY_CHECK, | |
61 | [AC_MSG_CHECKING([whether build environment is sane]) | |
62 | # Just in case | |
63 | sleep 1 | |
64 | echo timestamp > conftestfile | |
65 | # Do `set' in a subshell so we don't clobber the current shell's | |
66 | # arguments. Must try -L first in case configure is actually a | |
67 | # symlink; some systems play weird games with the mod time of symlinks | |
68 | # (eg FreeBSD returns the mod time of the symlink's containing | |
69 | # directory). | |
70 | if ( | |
71 | set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` | |
72 | if test "[$]*" = "X"; then | |
73 | # -L didn't work. | |
74 | set X `ls -t $srcdir/configure conftestfile` | |
75 | fi | |
76 | if test "[$]*" != "X $srcdir/configure conftestfile" \ | |
77 | && test "[$]*" != "X conftestfile $srcdir/configure"; then | |
78 | ||
79 | # If neither matched, then we have a broken ls. This can happen | |
80 | # if, for instance, CONFIG_SHELL is bash and it inherits a | |
81 | # broken ls alias from the environment. This has actually | |
82 | # happened. Such a system could not be considered "sane". | |
83 | AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken | |
84 | alias in your environment]) | |
85 | fi | |
86 | ||
87 | test "[$]2" = conftestfile | |
88 | ) | |
89 | then | |
90 | # Ok. | |
91 | : | |
92 | else | |
93 | AC_MSG_ERROR([newly created file is older than distributed files! | |
94 | Check your system clock]) | |
95 | fi | |
96 | rm -f conftest* | |
97 | AC_MSG_RESULT(yes)]) | |
98 | ||
99 | dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) | |
100 | dnl The program must properly implement --version. | |
101 | AC_DEFUN(AM_MISSING_PROG, | |
102 | [AC_MSG_CHECKING(for working $2) | |
103 | # Run test in a subshell; some versions of sh will print an error if | |
104 | # an executable is not found, even if stderr is redirected. | |
105 | # Redirect stdin to placate older versions of autoconf. Sigh. | |
106 | if ($2 --version) < /dev/null > /dev/null 2>&1; then | |
107 | $1=$2 | |
108 | AC_MSG_RESULT(found) | |
109 | else | |
110 | $1="$3/missing $2" | |
111 | AC_MSG_RESULT(missing) | |
112 | fi | |
113 | AC_SUBST($1)]) | |
114 | ||
115 | # Add --enable-maintainer-mode option to configure. | |
116 | # From Jim Meyering | |
117 | ||
118 | # serial 1 | |
119 | ||
120 | AC_DEFUN(AM_MAINTAINER_MODE, | |
121 | [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) | |
122 | dnl maintainer-mode is disabled by default | |
123 | AC_ARG_ENABLE(maintainer-mode, | |
124 | [ --enable-maintainer-mode enable make rules and dependencies not useful | |
125 | (and sometimes confusing) to the casual installer], | |
126 | USE_MAINTAINER_MODE=$enableval, | |
127 | USE_MAINTAINER_MODE=no) | |
128 | AC_MSG_RESULT($USE_MAINTAINER_MODE) | |
129 | AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes) | |
130 | MAINT=$MAINTAINER_MODE_TRUE | |
131 | AC_SUBST(MAINT)dnl | |
132 | ] | |
133 | ) | |
134 | ||
135 | # Define a conditional. | |
136 | ||
137 | AC_DEFUN(AM_CONDITIONAL, | |
138 | [AC_SUBST($1_TRUE) | |
139 | AC_SUBST($1_FALSE) | |
140 | if $2; then | |
141 | $1_TRUE= | |
142 | $1_FALSE='#' | |
143 | else | |
144 | $1_TRUE='#' | |
145 | $1_FALSE= | |
146 | fi]) | |
147 |