]> sourceware.org Git - newlib-cygwin.git/blame - newlib/libc/sys/w65/aclocal.m4
2004-01-23 Artem B. Bityuckiy <abitytsky@softminecorp.com>
[newlib-cygwin.git] / newlib / libc / sys / w65 / 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) ;;
a8615092 57 esac], [newlib_mb=])dnl
8a0efa53 58
786ab12c
JJ
59dnl Support --enable-newlib-iconv
60AC_ARG_ENABLE(newlib-iconv,
61[ --enable-newlib-iconv enable iconv library support],
62[case "${enableval}" in
63 yes) newlib_iconv=yes ;;
64 no) newlib_iconv=no ;;
65 *) AC_MSG_ERROR(bad value ${enableval} for newlib-iconv option) ;;
66 esac], [newlib_iconv=])dnl
67
68dnl Support --enable-newlib-builtin-converters
69AC_ARG_ENABLE(newlib-builtin-converters,
70[ --enable-newlib-builtin-converters enable specific comma-separated list of iconv converters to be built-in],
71[if test x${enableval} = x; then
72 AC_MSG_ERROR(bad value ${enableval} for newlib-builtin-converters option - use comma-separated list)
73 fi
74 builtin_converters=${enableval}
75 ], [builtin_converters=])dnl
76
0c048a9a
TF
77dnl Support --enable-newlib-multithread
78AC_ARG_ENABLE(newlib-multithread,
79[ --enable-newlib-multithread enable support for multiple threads],
80[case "${enableval}" in
81 yes) newlib_multithread=yes ;;
82 no) newlib_multithread=no ;;
83 *) AC_MSG_ERROR(bad value ${enableval} for newlib-multithread option) ;;
84 esac], [newlib_multithread=yes])dnl
85
a8615092
JJ
86dnl Support --enable-newlib-elix-level
87AC_ARG_ENABLE(newlib-elix-level,
88[ --enable-newlib-elix-level supply desired elix library level (1-4)],
89[case "${enableval}" in
90 0) newlib_elix_level=0 ;;
91 1) newlib_elix_level=1 ;;
92 2) newlib_elix_level=2 ;;
93 3) newlib_elix_level=3 ;;
94 4) newlib_elix_level=4 ;;
95 *) AC_MSG_ERROR(bad value ${enableval} for newlib-elix-level option) ;;
96 esac], [newlib_elix_level=0])dnl
97
afecf2fa
JJ
98dnl Support --disable-newlib-io-float
99AC_ARG_ENABLE(newlib-io-float,
100[ --disable-newlib-io-float disable printf/scanf family float support],
101[case "${enableval}" in
102 yes) newlib_io_float=yes ;;
103 no) newlib_io_float=no ;;
104 *) AC_MSG_ERROR(bad value ${enableval} for newlib-io-float option) ;;
105 esac], [newlib_io_float=yes])dnl
106
313f1349
JJ
107dnl Support --disable-newlib-supplied-syscalls
108AC_ARG_ENABLE(newlib-supplied-syscalls,
109[ --disable-newlib-supplied-syscalls disable newlib from supplying syscalls],
110[case "${enableval}" in
111 yes) newlib_may_supply_syscalls=yes ;;
112 no) newlib_may_supply_syscalls=no ;;
113 *) AC_MSG_ERROR(bad value ${enableval} for newlib-supplied-syscalls option) ;;
114 esac], [newlib_may_supply_syscalls=yes])dnl
115
116AM_CONDITIONAL(MAY_SUPPLY_SYSCALLS, test x[$]{newlib_may_supply_syscalls} = xyes)
afecf2fa 117
8a0efa53
CF
118dnl We may get other options which we don't document:
119dnl --with-target-subdir, --with-multisrctop, --with-multisubdir
120
121test -z "[$]{with_target_subdir}" && with_target_subdir=.
122
123if test "[$]{srcdir}" = "."; then
124 if test "[$]{with_target_subdir}" != "."; then
125 newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}../$1"
126 else
127 newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}$1"
128 fi
129else
130 newlib_basedir="[$]{srcdir}/$1"
131fi
132AC_SUBST(newlib_basedir)
133
eaa75b70 134AC_CANONICAL_SYSTEM
8a0efa53 135
60b0838f 136AM_INIT_AUTOMAKE(newlib, 1.11.0)
8a0efa53
CF
137
138# FIXME: We temporarily define our own version of AC_PROG_CC. This is
139# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
140# are probably using a cross compiler, which will not be able to fully
141# link an executable. This should really be fixed in autoconf
142# itself.
143
144AC_DEFUN(LIB_AC_PROG_CC,
145[AC_BEFORE([$0], [AC_PROG_CPP])dnl
146AC_CHECK_PROG(CC, gcc, gcc)
147if test -z "$CC"; then
148 AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
149 test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
150fi
151
152AC_PROG_CC_GNU
153
154if test $ac_cv_prog_gcc = yes; then
155 GCC=yes
156dnl Check whether -g works, even if CFLAGS is set, in case the package
157dnl plays around with CFLAGS (such as to build both debugging and
158dnl normal versions of a library), tasteless as that idea is.
159 ac_test_CFLAGS="${CFLAGS+set}"
160 ac_save_CFLAGS="$CFLAGS"
161 CFLAGS=
162 AC_PROG_CC_G
163 if test "$ac_test_CFLAGS" = set; then
164 CFLAGS="$ac_save_CFLAGS"
165 elif test $ac_cv_prog_cc_g = yes; then
166 CFLAGS="-g -O2"
167 else
168 CFLAGS="-O2"
169 fi
170else
171 GCC=
172 test "${CFLAGS+set}" = set || CFLAGS="-g"
173fi
174])
175
176LIB_AC_PROG_CC
177
8a0efa53
CF
178AC_CHECK_TOOL(AS, as)
179AC_CHECK_TOOL(AR, ar)
180AC_CHECK_TOOL(RANLIB, ranlib, :)
181
182AC_PROG_INSTALL
183
184AM_MAINTAINER_MODE
185
186# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
187# at least currently, we never actually build a program, so we never
188# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
189# fails, because we are probably configuring with a cross compiler
190# which can't create executables. So we include AC_EXEEXT to keep
191# automake happy, but we don't execute it, since we don't care about
192# the result.
193if false; then
194 AC_EXEEXT
195fi
196
197. [$]{newlib_basedir}/configure.host
198
8a0efa53
CF
199newlib_cflags="[$]{newlib_cflags} -fno-builtin"
200
201NEWLIB_CFLAGS=${newlib_cflags}
202AC_SUBST(NEWLIB_CFLAGS)
203
2e1a7175
TF
204LDFLAGS=${ldflags}
205AC_SUBST(LDFLAGS)
206
a8615092
JJ
207AM_CONDITIONAL(ELIX_LEVEL_0, test x[$]{newlib_elix_level} = x0)
208AM_CONDITIONAL(ELIX_LEVEL_1, test x[$]{newlib_elix_level} = x1)
209AM_CONDITIONAL(ELIX_LEVEL_2, test x[$]{newlib_elix_level} = x2)
210AM_CONDITIONAL(ELIX_LEVEL_3, test x[$]{newlib_elix_level} = x3)
211AM_CONDITIONAL(ELIX_LEVEL_4, test x[$]{newlib_elix_level} = x4)
212
2e1a7175 213AM_CONDITIONAL(USE_LIBTOOL, test x[$]{use_libtool} = xyes)
0953fe64
TF
214
215# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
216# use oext, which is set in configure.host based on the target platform.
217OBJEXT=${oext}
218
219AC_SUBST(OBJEXT)
2e1a7175
TF
220AC_SUBST(oext)
221AC_SUBST(aext)
222
223AC_SUBST(libm_machine_dir)
8a0efa53
CF
224AC_SUBST(machine_dir)
225AC_SUBST(sys_dir)
226])
227
228# Do all the work for Automake. This macro actually does too much --
229# some checks are only needed if your package does certain things.
230# But this isn't really a big deal.
231
232# serial 1
233
234dnl Usage:
235dnl AM_INIT_AUTOMAKE(package,version, [no-define])
236
237AC_DEFUN(AM_INIT_AUTOMAKE,
238[AC_REQUIRE([AC_PROG_INSTALL])
239PACKAGE=[$1]
240AC_SUBST(PACKAGE)
241VERSION=[$2]
242AC_SUBST(VERSION)
243dnl test to see if srcdir already configured
244if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
245 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
246fi
247ifelse([$3],,
248AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
249AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
250AC_REQUIRE([AM_SANITY_CHECK])
251AC_REQUIRE([AC_ARG_PROGRAM])
252dnl FIXME This is truly gross.
253missing_dir=`cd $ac_aux_dir && pwd`
254AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
255AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
256AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
257AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
258AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
259AC_REQUIRE([AC_PROG_MAKE_SET])])
260
261#
262# Check to make sure that the build environment is sane.
263#
264
265AC_DEFUN(AM_SANITY_CHECK,
266[AC_MSG_CHECKING([whether build environment is sane])
267# Just in case
268sleep 1
269echo timestamp > conftestfile
270# Do `set' in a subshell so we don't clobber the current shell's
271# arguments. Must try -L first in case configure is actually a
272# symlink; some systems play weird games with the mod time of symlinks
273# (eg FreeBSD returns the mod time of the symlink's containing
274# directory).
275if (
276 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
277 if test "[$]*" = "X"; then
278 # -L didn't work.
279 set X `ls -t $srcdir/configure conftestfile`
280 fi
281 if test "[$]*" != "X $srcdir/configure conftestfile" \
282 && test "[$]*" != "X conftestfile $srcdir/configure"; then
283
284 # If neither matched, then we have a broken ls. This can happen
285 # if, for instance, CONFIG_SHELL is bash and it inherits a
286 # broken ls alias from the environment. This has actually
287 # happened. Such a system could not be considered "sane".
288 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
289alias in your environment])
290 fi
291
292 test "[$]2" = conftestfile
293 )
294then
295 # Ok.
296 :
297else
298 AC_MSG_ERROR([newly created file is older than distributed files!
299Check your system clock])
300fi
301rm -f conftest*
302AC_MSG_RESULT(yes)])
303
304dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
305dnl The program must properly implement --version.
306AC_DEFUN(AM_MISSING_PROG,
307[AC_MSG_CHECKING(for working $2)
308# Run test in a subshell; some versions of sh will print an error if
309# an executable is not found, even if stderr is redirected.
310# Redirect stdin to placate older versions of autoconf. Sigh.
311if ($2 --version) < /dev/null > /dev/null 2>&1; then
312 $1=$2
313 AC_MSG_RESULT(found)
314else
315 $1="$3/missing $2"
316 AC_MSG_RESULT(missing)
317fi
318AC_SUBST($1)])
319
313f1349
JJ
320# Define a conditional.
321
322AC_DEFUN(AM_CONDITIONAL,
323[AC_SUBST($1_TRUE)
324AC_SUBST($1_FALSE)
325if $2; then
326 $1_TRUE=
327 $1_FALSE='#'
328else
329 $1_TRUE='#'
330 $1_FALSE=
331fi])
332
8a0efa53
CF
333# Add --enable-maintainer-mode option to configure.
334# From Jim Meyering
335
336# serial 1
337
338AC_DEFUN(AM_MAINTAINER_MODE,
339[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
340 dnl maintainer-mode is disabled by default
341 AC_ARG_ENABLE(maintainer-mode,
342[ --enable-maintainer-mode enable make rules and dependencies not useful
343 (and sometimes confusing) to the casual installer],
344 USE_MAINTAINER_MODE=$enableval,
345 USE_MAINTAINER_MODE=no)
346 AC_MSG_RESULT($USE_MAINTAINER_MODE)
347 AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
348 MAINT=$MAINTAINER_MODE_TRUE
349 AC_SUBST(MAINT)dnl
350]
351)
352
This page took 0.127314 seconds and 5 git commands to generate.