r117: *** empty log message ***
[ctsim.git] / aclocal.m4
1 dnl aclocal.m4 generated automatically by aclocal 1.4a
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
13 # Do all the work for Automake.  This macro actually does too much --
14 # some checks are only needed if your package does certain things.
15 # But this isn't really a big deal.
16
17 # serial 1
18
19 dnl Usage:
20 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
21
22 AC_DEFUN(AM_INIT_AUTOMAKE,
23 [AC_REQUIRE([AC_PROG_INSTALL])
24 dnl We require 2.13 because we rely on SHELL being computed by configure.
25 AC_PREREQ([2.13])
26 PACKAGE=[$1]
27 AC_SUBST(PACKAGE)
28 VERSION=[$2]
29 AC_SUBST(VERSION)
30 dnl test to see if srcdir already configured
31 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
32   AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
33 fi
34 ifelse([$3],,
35 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
36 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
37 AC_REQUIRE([AM_SANITY_CHECK])
38 AC_REQUIRE([AC_ARG_PROGRAM])
39 dnl FIXME This is truly gross.
40 missing_dir=`cd $ac_aux_dir && pwd`
41 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
42 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
43 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
44 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
45 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
46 AC_REQUIRE([AC_PROG_MAKE_SET])])
47
48 #
49 # Check to make sure that the build environment is sane.
50 #
51
52 AC_DEFUN(AM_SANITY_CHECK,
53 [AC_MSG_CHECKING([whether build environment is sane])
54 # Just in case
55 sleep 1
56 echo timestamp > conftestfile
57 # Do `set' in a subshell so we don't clobber the current shell's
58 # arguments.  Must try -L first in case configure is actually a
59 # symlink; some systems play weird games with the mod time of symlinks
60 # (eg FreeBSD returns the mod time of the symlink's containing
61 # directory).
62 if (
63    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
64    if test "[$]*" = "X"; then
65       # -L didn't work.
66       set X `ls -t $srcdir/configure conftestfile`
67    fi
68    if test "[$]*" != "X $srcdir/configure conftestfile" \
69       && test "[$]*" != "X conftestfile $srcdir/configure"; then
70
71       # If neither matched, then we have a broken ls.  This can happen
72       # if, for instance, CONFIG_SHELL is bash and it inherits a
73       # broken ls alias from the environment.  This has actually
74       # happened.  Such a system could not be considered "sane".
75       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
76 alias in your environment])
77    fi
78
79    test "[$]2" = conftestfile
80    )
81 then
82    # Ok.
83    :
84 else
85    AC_MSG_ERROR([newly created file is older than distributed files!
86 Check your system clock])
87 fi
88 rm -f conftest*
89 AC_MSG_RESULT(yes)])
90
91 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
92 dnl The program must properly implement --version.
93 AC_DEFUN(AM_MISSING_PROG,
94 [AC_MSG_CHECKING(for working $2)
95 # Run test in a subshell; some versions of sh will print an error if
96 # an executable is not found, even if stderr is redirected.
97 # Redirect stdin to placate older versions of autoconf.  Sigh.
98 if ($2 --version) < /dev/null > /dev/null 2>&1; then
99    $1=$2
100    AC_MSG_RESULT(found)
101 else
102    $1="$3/missing $2"
103    AC_MSG_RESULT(missing)
104 fi
105 AC_SUBST($1)])
106
107 # Like AC_CONFIG_HEADER, but automatically create stamp file.
108
109 AC_DEFUN(AM_CONFIG_HEADER,
110 [AC_PREREQ([2.12])
111 AC_CONFIG_HEADER([$1])
112 dnl When config.status generates a header, we must update the stamp-h file.
113 dnl This file resides in the same directory as the config header
114 dnl that is generated.  We must strip everything past the first ":",
115 dnl and everything past the last "/".
116 AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
117 ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
118 <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
119 <<am_indx=1
120 for am_file in <<$1>>; do
121   case " <<$>>CONFIG_HEADERS " in
122   *" <<$>>am_file "*<<)>>
123     echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
124     ;;
125   esac
126   am_indx=`expr "<<$>>am_indx" + 1`
127 done<<>>dnl>>)
128 changequote([,]))])
129
130 # Define a conditional.
131
132 AC_DEFUN(AM_CONDITIONAL,
133 [AC_SUBST($1_TRUE)
134 AC_SUBST($1_FALSE)
135 if $2; then
136   $1_TRUE=
137   $1_FALSE='#'
138 else
139   $1_TRUE='#'
140   $1_FALSE=
141 fi])
142