1 dnl We define the macro GLIBC_PROVIDES to do an AC_PROVIDE for each macro
2 dnl which appears in configure.in before the sysdep configure scripts are run.
3 dnl Each sysdep configure.in does GLIBC_PROVIDES first, to avoid any
4 dnl AC_REQUIREs or AC_BEFOREs duplicating their code.
6 define([GLIBC_PROVIDES], [dnl
7 AC_PROVIDE([_AS_ECHO_N_PREPARE])dnl
8 AC_PROVIDE([_AS_CR_PREPARE])dnl
9 AC_PROVIDE([_AS_TR_SH_PREPARE])dnl
10 AC_PROVIDE([AC_PROG_INSTALL])dnl
11 AC_PROVIDE([AC_PROG_RANLIB])dnl
12 AC_PROVIDE([AC_PROG_CC])dnl
13 AC_PROVIDE([AC_PROG_CPP])dnl
14 AC_PROVIDE([_AS_PATH_SEPARATOR_PREPARE])dnl
15 AC_PROVIDE([_AS_TEST_PREPARE])dnl
16 define([AS_MESSAGE_LOG_FD],5)dnl
17 define([AS_MESSAGE_FD],6)dnl
18 dnl Ripped out of AS_INIT, which does more cruft we do not want.
19 m4_wrap([m4_divert_pop([BODY])[]])
20 m4_divert_push([BODY])[]dnl
21 dnl End of ripped out of AS_INIT.
22 # This file is generated from configure.in by Autoconf. DO NOT EDIT!
23 define([_AC_LANG], [C])dnl
26 dnl Check for a symbol
28 AC_DEFUN([AC_CHECK_SYMBOL], [dnl
29 AC_MSG_CHECKING(for $1)
30 AC_CACHE_VAL(ac_cv_check_symbol_$1, [dnl
33 extern char *$1[]; puts(*$1);,
35 ac_cv_check_symbol_$1=yes, ac_cv_check_symbol_$1=no)])
36 if test "$ac_cv_check_symbol_$1" = yes; then
38 ac_tr_symbol=`echo $1 | tr '[a-z]' '[A-Z]'`
40 AC_DEFINE_UNQUOTED(HAVE_${ac_tr_symbol})
42 AC_MSG_RESULT($ac_cv_check_symbol_$1)])dnl
45 dnl Locate a program and check that its version is acceptable.
46 dnl AC_PROG_CHECK_VER(var, namelist, version-switch,
47 dnl [version-extract-regexp], version-glob [, do-if-fail])
48 AC_DEFUN([AC_CHECK_PROG_VER],
49 [AC_CHECK_PROGS([$1], [$2])
50 if test -z "[$]$1"; then
53 # Found it, now check the version.
54 AC_MSG_CHECKING([version of [$]$1])
56 ac_prog_version=`<<$>>$1 $3 2>&1 ifelse(<<$4>>,,,
57 <<| sed -n 's/^.*patsubst(<<$4>>,/,\/).*$/\1/p'>>)`
58 case $ac_prog_version in
59 '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
62 ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
63 *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
66 AC_MSG_RESULT([$ac_prog_version])
69 [if test $ac_verc_fail = yes; then
74 dnl These modifications are to allow for an empty cross compiler tree.
75 define([_AC_COMPILER_EXEEXT], [EXEEXT=
78 AC_DEFUN([LIBC_PROG_FOO_GNU],
79 [# Most GNU programs take a -v and spit out some text including
80 # the word 'GNU'. Some try to read stdin, so give them /dev/null.
81 if $1 -o conftest -v </dev/null 2>&1 | grep GNU > /dev/null 2>&1; then
88 AC_DEFUN([LIBC_PROG_BINUTILS],
89 [# Was a --with-binutils option given?
90 if test -n "$path_binutils"; then
91 # Make absolute; ensure a single trailing slash.
92 path_binutils=`(cd $path_binutils; pwd) | sed 's%/*$%/%'`
93 CC="$CC -B$path_binutils"
95 AS=`$CC -print-prog-name=as`
96 LD=`$CC -print-prog-name=ld`
97 AR=`$CC -print-prog-name=ar`
99 OBJDUMP=`$CC -print-prog-name=objdump`
102 # ranlib has to be treated a bit differently since it might not exist at all.
103 ac_ranlib=`$CC -print-prog-name=ranlib`
104 if test "x$ac_ranlib" = xranlib; then
105 # This extra check has to happen since gcc simply echos the parameter in
106 # case it cannot find the value in its own directories.
107 AC_CHECK_TOOL(RANLIB, ranlib, :)
113 # Determine whether we are using GNU binutils.
114 AC_CACHE_CHECK(whether $AS is GNU as, libc_cv_prog_as_gnu,
115 [LIBC_PROG_FOO_GNU($AS, libc_cv_prog_as_gnu=yes, libc_cv_prog_as_gnu=no)])
117 gnu_as=$libc_cv_prog_as_gnu
119 AC_CACHE_CHECK(whether $LD is GNU ld, libc_cv_prog_ld_gnu,
120 [LIBC_PROG_FOO_GNU($LD, libc_cv_prog_ld_gnu=yes, libc_cv_prog_ld_gnu=no)])
121 gnu_ld=$libc_cv_prog_ld_gnu