OSDN Git Service

* config/m32r/m32r-protos.h (m32r_pass_by_reference): Declare.
[pf3gnuchains/gcc-fork.git] / fastjar / aclocal.m4
1 dnl aclocal.m4 generated automatically by aclocal 1.4-p5
2
3 dnl Copyright (C) 1994, 1995-8, 1999, 2001 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 sinclude(../config/accross.m4)
14
15 dnl Define MKDIR_TAKES_ONE_ARG if mkdir accepts only one argument instead
16 dnl of the usual 2.
17 AC_DEFUN(gcc_AC_FUNC_MKDIR_TAKES_ONE_ARG,
18 [AC_CACHE_CHECK([if mkdir takes one argument], gcc_cv_mkdir_takes_one_arg,
19 [AC_TRY_COMPILE([
20 #include <sys/types.h>
21 #ifdef HAVE_SYS_STAT_H
22 # include <sys/stat.h>
23 #endif
24 #ifdef HAVE_UNISTD_H
25 # include <unistd.h>
26 #endif
27 #ifdef HAVE_DIRECT_H
28 # include <direct.h>
29 #endif], [mkdir ("foo", 0);],
30          gcc_cv_mkdir_takes_one_arg=no, gcc_cv_mkdir_takes_one_arg=yes)])
31 if test $gcc_cv_mkdir_takes_one_arg = yes ; then
32    AC_DEFINE(MKDIR_TAKES_ONE_ARG, 1, [Define if host mkdir takes a
33 single argument.])
34 fi
35 ])
36
37 # Do all the work for Automake.  This macro actually does too much --
38 # some checks are only needed if your package does certain things.
39 # But this isn't really a big deal.
40
41 # serial 1
42
43 dnl Usage:
44 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
45
46 AC_DEFUN([AM_INIT_AUTOMAKE],
47 [AC_REQUIRE([AC_PROG_INSTALL])
48 PACKAGE=[$1]
49 AC_SUBST(PACKAGE)
50 VERSION=[$2]
51 AC_SUBST(VERSION)
52 dnl test to see if srcdir already configured
53 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
54   AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
55 fi
56 ifelse([$3],,
57 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
58 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
59 AC_REQUIRE([AM_SANITY_CHECK])
60 AC_REQUIRE([AC_ARG_PROGRAM])
61 dnl FIXME This is truly gross.
62 missing_dir=`cd $ac_aux_dir && pwd`
63 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
64 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
65 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
66 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
67 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
68 AC_REQUIRE([AC_PROG_MAKE_SET])])
69
70 #
71 # Check to make sure that the build environment is sane.
72 #
73
74 AC_DEFUN([AM_SANITY_CHECK],
75 [AC_MSG_CHECKING([whether build environment is sane])
76 # Just in case
77 sleep 1
78 echo timestamp > conftestfile
79 # Do `set' in a subshell so we don't clobber the current shell's
80 # arguments.  Must try -L first in case configure is actually a
81 # symlink; some systems play weird games with the mod time of symlinks
82 # (eg FreeBSD returns the mod time of the symlink's containing
83 # directory).
84 if (
85    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
86    if test "[$]*" = "X"; then
87       # -L didn't work.
88       set X `ls -t $srcdir/configure conftestfile`
89    fi
90    if test "[$]*" != "X $srcdir/configure conftestfile" \
91       && test "[$]*" != "X conftestfile $srcdir/configure"; then
92
93       # If neither matched, then we have a broken ls.  This can happen
94       # if, for instance, CONFIG_SHELL is bash and it inherits a
95       # broken ls alias from the environment.  This has actually
96       # happened.  Such a system could not be considered "sane".
97       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
98 alias in your environment])
99    fi
100
101    test "[$]2" = conftestfile
102    )
103 then
104    # Ok.
105    :
106 else
107    AC_MSG_ERROR([newly created file is older than distributed files!
108 Check your system clock])
109 fi
110 rm -f conftest*
111 AC_MSG_RESULT(yes)])
112
113 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
114 dnl The program must properly implement --version.
115 AC_DEFUN([AM_MISSING_PROG],
116 [AC_MSG_CHECKING(for working $2)
117 # Run test in a subshell; some versions of sh will print an error if
118 # an executable is not found, even if stderr is redirected.
119 # Redirect stdin to placate older versions of autoconf.  Sigh.
120 if ($2 --version) < /dev/null > /dev/null 2>&1; then
121    $1=$2
122    AC_MSG_RESULT(found)
123 else
124    $1="$3/missing $2"
125    AC_MSG_RESULT(missing)
126 fi
127 AC_SUBST($1)])
128
129 # Like AC_CONFIG_HEADER, but automatically create stamp file.
130
131 AC_DEFUN([AM_CONFIG_HEADER],
132 [AC_PREREQ([2.12])
133 AC_CONFIG_HEADER([$1])
134 dnl When config.status generates a header, we must update the stamp-h file.
135 dnl This file resides in the same directory as the config header
136 dnl that is generated.  We must strip everything past the first ":",
137 dnl and everything past the last "/".
138 AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
139 ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
140 <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
141 <<am_indx=1
142 for am_file in <<$1>>; do
143   case " <<$>>CONFIG_HEADERS " in
144   *" <<$>>am_file "*<<)>>
145     echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
146     ;;
147   esac
148   am_indx=`expr "<<$>>am_indx" + 1`
149 done<<>>dnl>>)
150 changequote([,]))])
151
152 # Add --enable-maintainer-mode option to configure.
153 # From Jim Meyering
154
155 # serial 1
156
157 AC_DEFUN([AM_MAINTAINER_MODE],
158 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
159   dnl maintainer-mode is disabled by default
160   AC_ARG_ENABLE(maintainer-mode,
161 [  --enable-maintainer-mode enable make rules and dependencies not useful
162                           (and sometimes confusing) to the casual installer],
163       USE_MAINTAINER_MODE=$enableval,
164       USE_MAINTAINER_MODE=no)
165   AC_MSG_RESULT($USE_MAINTAINER_MODE)
166   AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
167   MAINT=$MAINTAINER_MODE_TRUE
168   AC_SUBST(MAINT)dnl
169 ]
170 )
171
172 # Define a conditional.
173
174 AC_DEFUN([AM_CONDITIONAL],
175 [AC_SUBST($1_TRUE)
176 AC_SUBST($1_FALSE)
177 if $2; then
178   $1_TRUE=
179   $1_FALSE='#'
180 else
181   $1_TRUE='#'
182   $1_FALSE=
183 fi])
184