]> sourceware.org Git - newlib-cygwin.git/blame - newlib/libc/sys/go32/aclocal.m4
* libm/common/s_fdim.c: New file.
[newlib-cygwin.git] / newlib / libc / sys / go32 / aclocal.m4
CommitLineData
8a0efa53
CF
1dnl aclocal.m4 generated automatically by aclocal 1.4
2
3dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
4dnl This file is free software; the Free Software Foundation
5dnl gives unlimited permission to copy and/or distribute it,
6dnl with or without modifications, as long as this notice is preserved.
7
8dnl This program is distributed in the hope that it will be useful,
9dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
10dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11dnl PARTICULAR PURPOSE.
12
13dnl This provides configure definitions used by all the newlib
14dnl configure.in files.
15
16dnl Basic newlib configury. This calls basic introductory stuff,
17dnl including AM_INIT_AUTOMAKE and AC_CANONICAL_HOST. It also runs
18dnl configure.host. The only argument is the relative path to the top
19dnl newlib directory.
20
21AC_DEFUN(NEWLIB_CONFIGURE,
22[
23dnl Default to --enable-multilib
24AC_ARG_ENABLE(multilib,
25[ --enable-multilib build many library versions (default)],
26[case "${enableval}" in
27 yes) multilib=yes ;;
28 no) multilib=no ;;
29 *) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
30 esac], [multilib=yes])dnl
31
32dnl Support --enable-target-optspace
33AC_ARG_ENABLE(target-optspace,
34[ --enable-target-optspace optimize for space],
35[case "${enableval}" in
36 yes) target_optspace=yes ;;
37 no) target_optspace=no ;;
38 *) AC_MSG_ERROR(bad value ${enableval} for target-optspace option) ;;
39 esac], [target_optspace=])dnl
3ac6f3a7
JJ
40
41dnl Support --enable-malloc-debugging - currently only supported for Cygwin
42AC_ARG_ENABLE(malloc-debugging,
43[ --enable-malloc-debugging indicate malloc debugging requested],
44[case "${enableval}" in
45 yes) malloc_debugging=yes ;;
46 no) malloc_debugging=no ;;
47 *) AC_MSG_ERROR(bad value ${enableval} for malloc-debugging option) ;;
48 esac], [malloc_debugging=])dnl
8a0efa53
CF
49
50dnl Support --enable-newlib-mb
51AC_ARG_ENABLE(newlib-mb,
52[ --enable-newlib-mb enable multibyte support],
53[case "${enableval}" in
54 yes) newlib_mb=yes ;;
55 no) newlib_mb=no ;;
56 *) AC_MSG_ERROR(bad value ${enableval} for newlib-mb option) ;;
57 esac], [newlib_mb=no])dnl
58
0c048a9a
TF
59dnl Support --enable-newlib-multithread
60AC_ARG_ENABLE(newlib-multithread,
61[ --enable-newlib-multithread enable support for multiple threads],
62[case "${enableval}" in
63 yes) newlib_multithread=yes ;;
64 no) newlib_multithread=no ;;
65 *) AC_MSG_ERROR(bad value ${enableval} for newlib-multithread option) ;;
66 esac], [newlib_multithread=yes])dnl
67
afecf2fa
JJ
68dnl Support --disable-newlib-io-float
69AC_ARG_ENABLE(newlib-io-float,
70[ --disable-newlib-io-float disable printf/scanf family float support],
71[case "${enableval}" in
72 yes) newlib_io_float=yes ;;
73 no) newlib_io_float=no ;;
74 *) AC_MSG_ERROR(bad value ${enableval} for newlib-io-float option) ;;
75 esac], [newlib_io_float=yes])dnl
76
77
8a0efa53
CF
78dnl We may get other options which we don't document:
79dnl --with-target-subdir, --with-multisrctop, --with-multisubdir
80
81test -z "[$]{with_target_subdir}" && with_target_subdir=.
82
83if test "[$]{srcdir}" = "."; then
84 if test "[$]{with_target_subdir}" != "."; then
85 newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}../$1"
86 else
87 newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}$1"
88 fi
89else
90 newlib_basedir="[$]{srcdir}/$1"
91fi
92AC_SUBST(newlib_basedir)
93
eaa75b70 94AC_CANONICAL_SYSTEM
8a0efa53 95
2e1a7175 96AM_INIT_AUTOMAKE(newlib, 1.10.0)
8a0efa53
CF
97
98# FIXME: We temporarily define our own version of AC_PROG_CC. This is
99# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
100# are probably using a cross compiler, which will not be able to fully
101# link an executable. This should really be fixed in autoconf
102# itself.
103
104AC_DEFUN(LIB_AC_PROG_CC,
105[AC_BEFORE([$0], [AC_PROG_CPP])dnl
106AC_CHECK_PROG(CC, gcc, gcc)
107if test -z "$CC"; then
108 AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
109 test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
110fi
111
112AC_PROG_CC_GNU
113
114if test $ac_cv_prog_gcc = yes; then
115 GCC=yes
116dnl Check whether -g works, even if CFLAGS is set, in case the package
117dnl plays around with CFLAGS (such as to build both debugging and
118dnl normal versions of a library), tasteless as that idea is.
119 ac_test_CFLAGS="${CFLAGS+set}"
120 ac_save_CFLAGS="$CFLAGS"
121 CFLAGS=
122 AC_PROG_CC_G
123 if test "$ac_test_CFLAGS" = set; then
124 CFLAGS="$ac_save_CFLAGS"
125 elif test $ac_cv_prog_cc_g = yes; then
126 CFLAGS="-g -O2"
127 else
128 CFLAGS="-O2"
129 fi
130else
131 GCC=
132 test "${CFLAGS+set}" = set || CFLAGS="-g"
133fi
134])
135
136LIB_AC_PROG_CC
137
8a0efa53
CF
138AC_CHECK_TOOL(AS, as)
139AC_CHECK_TOOL(AR, ar)
140AC_CHECK_TOOL(RANLIB, ranlib, :)
141
142AC_PROG_INSTALL
143
144AM_MAINTAINER_MODE
145
146# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
147# at least currently, we never actually build a program, so we never
148# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
149# fails, because we are probably configuring with a cross compiler
150# which can't create executables. So we include AC_EXEEXT to keep
151# automake happy, but we don't execute it, since we don't care about
152# the result.
153if false; then
154 AC_EXEEXT
155fi
156
157. [$]{newlib_basedir}/configure.host
158
8a0efa53
CF
159newlib_cflags="[$]{newlib_cflags} -fno-builtin"
160
161NEWLIB_CFLAGS=${newlib_cflags}
162AC_SUBST(NEWLIB_CFLAGS)
163
2e1a7175
TF
164LDFLAGS=${ldflags}
165AC_SUBST(LDFLAGS)
166
167AM_CONDITIONAL(USE_LIBTOOL, test x[$]{use_libtool} = xyes)
0953fe64
TF
168
169# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
170# use oext, which is set in configure.host based on the target platform.
171OBJEXT=${oext}
172
173AC_SUBST(OBJEXT)
2e1a7175
TF
174AC_SUBST(oext)
175AC_SUBST(aext)
176
177AC_SUBST(libm_machine_dir)
8a0efa53
CF
178AC_SUBST(machine_dir)
179AC_SUBST(sys_dir)
180])
181
182# Do all the work for Automake. This macro actually does too much --
183# some checks are only needed if your package does certain things.
184# But this isn't really a big deal.
185
186# serial 1
187
188dnl Usage:
189dnl AM_INIT_AUTOMAKE(package,version, [no-define])
190
191AC_DEFUN(AM_INIT_AUTOMAKE,
192[AC_REQUIRE([AC_PROG_INSTALL])
193PACKAGE=[$1]
194AC_SUBST(PACKAGE)
195VERSION=[$2]
196AC_SUBST(VERSION)
197dnl test to see if srcdir already configured
198if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
199 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
200fi
201ifelse([$3],,
202AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
203AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
204AC_REQUIRE([AM_SANITY_CHECK])
205AC_REQUIRE([AC_ARG_PROGRAM])
206dnl FIXME This is truly gross.
207missing_dir=`cd $ac_aux_dir && pwd`
208AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
209AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
210AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
211AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
212AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
213AC_REQUIRE([AC_PROG_MAKE_SET])])
214
215#
216# Check to make sure that the build environment is sane.
217#
218
219AC_DEFUN(AM_SANITY_CHECK,
220[AC_MSG_CHECKING([whether build environment is sane])
221# Just in case
222sleep 1
223echo timestamp > conftestfile
224# Do `set' in a subshell so we don't clobber the current shell's
225# arguments. Must try -L first in case configure is actually a
226# symlink; some systems play weird games with the mod time of symlinks
227# (eg FreeBSD returns the mod time of the symlink's containing
228# directory).
229if (
230 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
231 if test "[$]*" = "X"; then
232 # -L didn't work.
233 set X `ls -t $srcdir/configure conftestfile`
234 fi
235 if test "[$]*" != "X $srcdir/configure conftestfile" \
236 && test "[$]*" != "X conftestfile $srcdir/configure"; then
237
238 # If neither matched, then we have a broken ls. This can happen
239 # if, for instance, CONFIG_SHELL is bash and it inherits a
240 # broken ls alias from the environment. This has actually
241 # happened. Such a system could not be considered "sane".
242 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
243alias in your environment])
244 fi
245
246 test "[$]2" = conftestfile
247 )
248then
249 # Ok.
250 :
251else
252 AC_MSG_ERROR([newly created file is older than distributed files!
253Check your system clock])
254fi
255rm -f conftest*
256AC_MSG_RESULT(yes)])
257
258dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
259dnl The program must properly implement --version.
260AC_DEFUN(AM_MISSING_PROG,
261[AC_MSG_CHECKING(for working $2)
262# Run test in a subshell; some versions of sh will print an error if
263# an executable is not found, even if stderr is redirected.
264# Redirect stdin to placate older versions of autoconf. Sigh.
265if ($2 --version) < /dev/null > /dev/null 2>&1; then
266 $1=$2
267 AC_MSG_RESULT(found)
268else
269 $1="$3/missing $2"
270 AC_MSG_RESULT(missing)
271fi
272AC_SUBST($1)])
273
274# Add --enable-maintainer-mode option to configure.
275# From Jim Meyering
276
277# serial 1
278
279AC_DEFUN(AM_MAINTAINER_MODE,
280[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
281 dnl maintainer-mode is disabled by default
282 AC_ARG_ENABLE(maintainer-mode,
283[ --enable-maintainer-mode enable make rules and dependencies not useful
284 (and sometimes confusing) to the casual installer],
285 USE_MAINTAINER_MODE=$enableval,
286 USE_MAINTAINER_MODE=no)
287 AC_MSG_RESULT($USE_MAINTAINER_MODE)
288 AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
289 MAINT=$MAINTAINER_MODE_TRUE
290 AC_SUBST(MAINT)dnl
291]
292)
293
294# Define a conditional.
295
296AC_DEFUN(AM_CONDITIONAL,
297[AC_SUBST($1_TRUE)
298AC_SUBST($1_FALSE)
299if $2; then
300 $1_TRUE=
301 $1_FALSE='#'
302else
303 $1_TRUE='#'
304 $1_FALSE=
305fi])
306
This page took 0.081771 seconds and 5 git commands to generate.