OSDN Git Service

* acinclude.m4: Remove GC_CONFIGURE macro; move contents
[pf3gnuchains/gcc-fork.git] / boehm-gc / aclocal.m4
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
13 # Copyright (c) 1999-2001, 2002 by Red Hat, Inc. All rights reserved.
14
15 # THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
16 # OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
17
18 # Permission is hereby granted to use or copy this program
19 # for any purpose,  provided the above notices are retained on all copies.
20 # Permission to modify the code and to distribute modified code is granted,
21 # provided the above notices are retained, and a notice that the code was
22 # modified is included with the above copyright notice.
23 #
24 # Original author: Tom Tromey
25
26 sinclude(../libtool.m4)
27 dnl The line below arranges for aclocal not to bring a definition of
28 dnl AM_PROG_LIBTOOL into aclocal.m4, while still arranging for automake
29 dnl to add a definition of LIBTOOL to Makefile.in.
30 ifelse(yes,no,[AC_DEFUN([AM_PROG_LIBTOOL],[AC_SUBST(LIBTOOL)])])
31
32 # Do all the work for Automake.  This macro actually does too much --
33 # some checks are only needed if your package does certain things.
34 # But this isn't really a big deal.
35
36 # serial 1
37
38 dnl Usage:
39 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
40
41 AC_DEFUN(AM_INIT_AUTOMAKE,
42 [AC_REQUIRE([AC_PROG_INSTALL])
43 PACKAGE=[$1]
44 AC_SUBST(PACKAGE)
45 VERSION=[$2]
46 AC_SUBST(VERSION)
47 dnl test to see if srcdir already configured
48 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
49   AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
50 fi
51 ifelse([$3],,
52 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
53 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
54 AC_REQUIRE([AM_SANITY_CHECK])
55 AC_REQUIRE([AC_ARG_PROGRAM])
56 dnl FIXME This is truly gross.
57 missing_dir=`cd $ac_aux_dir && pwd`
58 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
59 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
60 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
61 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
62 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
63 AC_REQUIRE([AC_PROG_MAKE_SET])])
64
65 #
66 # Check to make sure that the build environment is sane.
67 #
68
69 AC_DEFUN(AM_SANITY_CHECK,
70 [AC_MSG_CHECKING([whether build environment is sane])
71 # Just in case
72 sleep 1
73 echo timestamp > conftestfile
74 # Do `set' in a subshell so we don't clobber the current shell's
75 # arguments.  Must try -L first in case configure is actually a
76 # symlink; some systems play weird games with the mod time of symlinks
77 # (eg FreeBSD returns the mod time of the symlink's containing
78 # directory).
79 if (
80    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
81    if test "[$]*" = "X"; then
82       # -L didn't work.
83       set X `ls -t $srcdir/configure conftestfile`
84    fi
85    if test "[$]*" != "X $srcdir/configure conftestfile" \
86       && test "[$]*" != "X conftestfile $srcdir/configure"; then
87
88       # If neither matched, then we have a broken ls.  This can happen
89       # if, for instance, CONFIG_SHELL is bash and it inherits a
90       # broken ls alias from the environment.  This has actually
91       # happened.  Such a system could not be considered "sane".
92       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
93 alias in your environment])
94    fi
95
96    test "[$]2" = conftestfile
97    )
98 then
99    # Ok.
100    :
101 else
102    AC_MSG_ERROR([newly created file is older than distributed files!
103 Check your system clock])
104 fi
105 rm -f conftest*
106 AC_MSG_RESULT(yes)])
107
108 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
109 dnl The program must properly implement --version.
110 AC_DEFUN(AM_MISSING_PROG,
111 [AC_MSG_CHECKING(for working $2)
112 # Run test in a subshell; some versions of sh will print an error if
113 # an executable is not found, even if stderr is redirected.
114 # Redirect stdin to placate older versions of autoconf.  Sigh.
115 if ($2 --version) < /dev/null > /dev/null 2>&1; then
116    $1=$2
117    AC_MSG_RESULT(found)
118 else
119    $1="$3/missing $2"
120    AC_MSG_RESULT(missing)
121 fi
122 AC_SUBST($1)])
123
124 # Add --enable-maintainer-mode option to configure.
125 # From Jim Meyering
126
127 # serial 1
128
129 AC_DEFUN(AM_MAINTAINER_MODE,
130 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
131   dnl maintainer-mode is disabled by default
132   AC_ARG_ENABLE(maintainer-mode,
133 [  --enable-maintainer-mode enable make rules and dependencies not useful
134                           (and sometimes confusing) to the casual installer],
135       USE_MAINTAINER_MODE=$enableval,
136       USE_MAINTAINER_MODE=no)
137   AC_MSG_RESULT($USE_MAINTAINER_MODE)
138   AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
139   MAINT=$MAINTAINER_MODE_TRUE
140   AC_SUBST(MAINT)dnl
141 ]
142 )
143
144 # Define a conditional.
145
146 AC_DEFUN(AM_CONDITIONAL,
147 [AC_SUBST($1_TRUE)
148 AC_SUBST($1_FALSE)
149 if $2; then
150   $1_TRUE=
151   $1_FALSE='#'
152 else
153   $1_TRUE='#'
154   $1_FALSE=
155 fi])
156