OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [newlib/] [newlib/] [libc/] [machine/] [d10v/] [aclocal.m4] - Blame information for rev 57

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 56 joel
dnl aclocal.m4 generated automatically by aclocal 1.3b
2
 
3
dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 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
dnl This provides configure definitions used by all the newlib
14
dnl configure.in files.
15
 
16
dnl Basic newlib configury.  This calls basic introductory stuff,
17
dnl including AM_INIT_AUTOMAKE and AC_CANONICAL_HOST.  It also runs
18
dnl configure.host.  The only argument is the relative path to the top
19
dnl newlib directory.
20
 
21
AC_DEFUN(NEWLIB_CONFIGURE,
22
[
23
dnl Default to --enable-multilib
24
AC_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
 
32
dnl Support --enable-target-optspace
33
AC_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
40
 
41
dnl Support --enable-newlib-mb
42
AC_ARG_ENABLE(newlib-mb,
43
[  --enable-newlib-mb        enable multibyte support],
44
[case "${enableval}" in
45
  yes) newlib_mb=yes ;;
46
  no)  newlib_mb=no ;;
47
  *)   AC_MSG_ERROR(bad value ${enableval} for newlib-mb option) ;;
48
 esac], [newlib_mb=no])dnl
49
 
50
dnl We may get other options which we don't document:
51
dnl --with-target-subdir, --with-multisrctop, --with-multisubdir
52
 
53
test -z "[$]{with_target_subdir}" && with_target_subdir=.
54
 
55
if test "[$]{srcdir}" = "."; then
56
  if test "[$]{with_target_subdir}" != "."; then
57
    newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}../$1"
58
  else
59
    newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}$1"
60
  fi
61
else
62
  newlib_basedir="[$]{srcdir}/$1"
63
fi
64
AC_SUBST(newlib_basedir)
65
 
66
AC_CANONICAL_HOST
67
 
68
AM_INIT_AUTOMAKE(newlib, 1.8.1)
69
 
70
# FIXME: We temporarily define our own version of AC_PROG_CC.  This is
71
# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS.  We
72
# are probably using a cross compiler, which will not be able to fully
73
# link an executable.  This should really be fixed in autoconf
74
# itself.
75
 
76
AC_DEFUN(LIB_AC_PROG_CC,
77
[AC_BEFORE([$0], [AC_PROG_CPP])dnl
78
AC_CHECK_PROG(CC, gcc, gcc)
79
if test -z "$CC"; then
80
  AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
81
  test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
82
fi
83
 
84
AC_PROG_CC_GNU
85
 
86
if test $ac_cv_prog_gcc = yes; then
87
  GCC=yes
88
dnl Check whether -g works, even if CFLAGS is set, in case the package
89
dnl plays around with CFLAGS (such as to build both debugging and
90
dnl normal versions of a library), tasteless as that idea is.
91
  ac_test_CFLAGS="${CFLAGS+set}"
92
  ac_save_CFLAGS="$CFLAGS"
93
  CFLAGS=
94
  AC_PROG_CC_G
95
  if test "$ac_test_CFLAGS" = set; then
96
    CFLAGS="$ac_save_CFLAGS"
97
  elif test $ac_cv_prog_cc_g = yes; then
98
    CFLAGS="-g -O2"
99
  else
100
    CFLAGS="-O2"
101
  fi
102
else
103
  GCC=
104
  test "${CFLAGS+set}" = set || CFLAGS="-g"
105
fi
106
])
107
 
108
LIB_AC_PROG_CC
109
 
110
# AC_CHECK_TOOL does AC_REQUIRE (AC_CANONICAL_BUILD).  If we don't
111
# run it explicitly here, it will be run implicitly before
112
# NEWLIB_CONFIGURE, which doesn't work because that means that it will
113
# be run before AC_CANONICAL_HOST.
114
AC_CANONICAL_BUILD
115
 
116
AC_CHECK_TOOL(AS, as)
117
AC_CHECK_TOOL(AR, ar)
118
AC_CHECK_TOOL(RANLIB, ranlib, :)
119
 
120
AM_PROG_INSTALL
121
 
122
AM_MAINTAINER_MODE
123
 
124
# We need AM_EXEEXT to keep automake happy in cygnus mode.  However,
125
# at least currently, we never actually build a program, so we never
126
# need to use $(EXEEXT).  Moreover, the test for EXEEXT normally
127
# fails, because we are probably configuring with a cross compiler
128
# which can't create executables.  So we include AM_EXEEXT to keep
129
# automake happy, but we don't execute it, since we don't care about
130
# the result.
131
if false; then
132
  AM_EXEEXT
133
fi
134
 
135
. [$]{newlib_basedir}/configure.host
136
 
137
case [$]{newlib_basedir} in
138
/* | [A-Za-z]:[/\\]*) newlib_flagbasedir=[$]{newlib_basedir} ;;
139
*) newlib_flagbasedir='[$](top_builddir)/'[$]{newlib_basedir} ;;
140
esac
141
 
142
newlib_cflags="[$]{newlib_cflags} -I"'[$](top_builddir)'"/$1/targ-include -I[$]{newlib_flagbasedir}/libc/include"
143
case "${host}" in
144
  *-*-cygwin32*)
145
    newlib_cflags="[$]{newlib_cflags} -I[$]{newlib_flagbasedir}/../winsup/include"
146
    ;;
147
esac
148
 
149
newlib_cflags="[$]{newlib_cflags} -fno-builtin"
150
 
151
NEWLIB_CFLAGS=${newlib_cflags}
152
AC_SUBST(NEWLIB_CFLAGS)
153
 
154
AC_SUBST(machine_dir)
155
AC_SUBST(sys_dir)
156
])
157
 
158
# Do all the work for Automake.  This macro actually does too much --
159
# some checks are only needed if your package does certain things.
160
# But this isn't really a big deal.
161
 
162
# serial 1
163
 
164
dnl Usage:
165
dnl AM_INIT_AUTOMAKE(package,version, [no-define])
166
 
167
AC_DEFUN(AM_INIT_AUTOMAKE,
168
[AC_REQUIRE([AM_PROG_INSTALL])
169
PACKAGE=[$1]
170
AC_SUBST(PACKAGE)
171
VERSION=[$2]
172
AC_SUBST(VERSION)
173
dnl test to see if srcdir already configured
174
if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
175
  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
176
fi
177
ifelse([$3],,
178
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
179
AC_DEFINE_UNQUOTED(VERSION, "$VERSION"))
180
AC_REQUIRE([AM_SANITY_CHECK])
181
AC_REQUIRE([AC_ARG_PROGRAM])
182
dnl FIXME This is truly gross.
183
missing_dir=`cd $ac_aux_dir && pwd`
184
AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
185
AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
186
AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
187
AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
188
AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
189
AC_REQUIRE([AC_PROG_MAKE_SET])])
190
 
191
 
192
# serial 1
193
 
194
AC_DEFUN(AM_PROG_INSTALL,
195
[AC_REQUIRE([AC_PROG_INSTALL])
196
test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
197
AC_SUBST(INSTALL_SCRIPT)dnl
198
])
199
 
200
#
201
# Check to make sure that the build environment is sane.
202
#
203
 
204
AC_DEFUN(AM_SANITY_CHECK,
205
[AC_MSG_CHECKING([whether build environment is sane])
206
# Just in case
207
sleep 1
208
echo timestamp > conftestfile
209
# Do `set' in a subshell so we don't clobber the current shell's
210
# arguments.  Must try -L first in case configure is actually a
211
# symlink; some systems play weird games with the mod time of symlinks
212
# (eg FreeBSD returns the mod time of the symlink's containing
213
# directory).
214
if (
215
   set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
216
   if test "[$]*" = "X"; then
217
      # -L didn't work.
218
      set X `ls -t $srcdir/configure conftestfile`
219
   fi
220
   if test "[$]*" != "X $srcdir/configure conftestfile" \
221
      && test "[$]*" != "X conftestfile $srcdir/configure"; then
222
 
223
      # If neither matched, then we have a broken ls.  This can happen
224
      # if, for instance, CONFIG_SHELL is bash and it inherits a
225
      # broken ls alias from the environment.  This has actually
226
      # happened.  Such a system could not be considered "sane".
227
      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
228
alias in your environment])
229
   fi
230
 
231
   test "[$]2" = conftestfile
232
   )
233
then
234
   # Ok.
235
   :
236
else
237
   AC_MSG_ERROR([newly created file is older than distributed files!
238
Check your system clock])
239
fi
240
rm -f conftest*
241
AC_MSG_RESULT(yes)])
242
 
243
dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
244
dnl The program must properly implement --version.
245
AC_DEFUN(AM_MISSING_PROG,
246
[AC_MSG_CHECKING(for working $2)
247
# Run test in a subshell; some versions of sh will print an error if
248
# an executable is not found, even if stderr is redirected.
249
# Redirect stdin to placate older versions of autoconf.  Sigh.
250
if ($2 --version) < /dev/null > /dev/null 2>&1; then
251
   $1=$2
252
   AC_MSG_RESULT(found)
253
else
254
   $1="$3/missing $2"
255
   AC_MSG_RESULT(missing)
256
fi
257
AC_SUBST($1)])
258
 
259
# Add --enable-maintainer-mode option to configure.
260
# From Jim Meyering
261
 
262
# serial 1
263
 
264
AC_DEFUN(AM_MAINTAINER_MODE,
265
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
266
  dnl maintainer-mode is disabled by default
267
  AC_ARG_ENABLE(maintainer-mode,
268
[  --enable-maintainer-mode enable make rules and dependencies not useful
269
                          (and sometimes confusing) to the casual installer],
270
      USE_MAINTAINER_MODE=$enableval,
271
      USE_MAINTAINER_MODE=no)
272
  AC_MSG_RESULT($USE_MAINTAINER_MODE)
273
  if test $USE_MAINTAINER_MODE = yes; then
274
    MAINT=
275
  else
276
    MAINT='#M#'
277
  fi
278
  AC_SUBST(MAINT)dnl
279
]
280
)
281
 
282
# Check to see if we're running under Win32, without using
283
# AC_CANONICAL_*.  If so, set output variable EXEEXT to ".exe".
284
# Otherwise set it to "".
285
 
286
dnl AM_EXEEXT()
287
dnl This knows we add .exe if we're building in the Cygwin32
288
dnl environment. But if we're not, then it compiles a test program
289
dnl to see if there is a suffix for executables.
290
AC_DEFUN(AM_EXEEXT,
291
[AC_REQUIRE([AM_CYGWIN32])
292
AC_REQUIRE([AM_MINGW32])
293
AC_MSG_CHECKING([for executable suffix])
294
AC_CACHE_VAL(am_cv_exeext,
295
[if test "$CYGWIN32" = yes || test "$MINGW32" = yes; then
296
am_cv_exeext=.exe
297
else
298
cat > am_c_test.c << 'EOF'
299
int main() {
300
/* Nothing needed here */
301
}
302
EOF
303
${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5
304
am_cv_exeext=
305
for file in am_c_test.*; do
306
   case $file in
307
    *.c) ;;
308
    *.o) ;;
309
    *) am_cv_exeext=`echo $file | sed -e s/am_c_test//` ;;
310
   esac
311
done
312
rm -f am_c_test*])
313
test x"${am_cv_exeext}" = x && am_cv_exeext=no
314
fi
315
EXEEXT=""
316
test x"${am_cv_exeext}" != xno && EXEEXT=${am_cv_exeext}
317
AC_MSG_RESULT(${am_cv_exeext})
318
AC_SUBST(EXEEXT)])
319
 
320
# Check to see if we're running under Cygwin32, without using
321
# AC_CANONICAL_*.  If so, set output variable CYGWIN32 to "yes".
322
# Otherwise set it to "no".
323
 
324
dnl AM_CYGWIN32()
325
AC_DEFUN(AM_CYGWIN32,
326
[AC_CACHE_CHECK(for Cygwin32 environment, am_cv_cygwin32,
327
[AC_TRY_COMPILE(,[return __CYGWIN32__;],
328
am_cv_cygwin32=yes, am_cv_cygwin32=no)
329
rm -f conftest*])
330
CYGWIN32=
331
test "$am_cv_cygwin32" = yes && CYGWIN32=yes])
332
 
333
# Check to see if we're running under Mingw, without using
334
# AC_CANONICAL_*.  If so, set output variable MINGW32 to "yes".
335
# Otherwise set it to "no".
336
 
337
dnl AM_MINGW32()
338
AC_DEFUN(AM_MINGW32,
339
[AC_CACHE_CHECK(for Mingw32 environment, am_cv_mingw32,
340
[AC_TRY_COMPILE(,[return __MINGW32__;],
341
am_cv_mingw32=yes, am_cv_mingw32=no)
342
rm -f conftest*])
343
MINGW32=
344
test "$am_cv_mingw32" = yes && MINGW32=yes])
345
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.