]>
Commit | Line | Data |
---|---|---|
28f540f4 RM |
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. | |
5 | dnl | |
3a12e572 | 6 | define([GLIBC_PROVIDES], [dnl |
b9cb349f | 7 | AC_PROVIDE([_AS_ECHO_N_PREPARE])dnl |
2d37ce0f RM |
8 | AC_PROVIDE([_AS_CR_PREPARE])dnl |
9 | AC_PROVIDE([_AS_TR_SH_PREPARE])dnl | |
28f540f4 RM |
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 | |
3a12e572 UD |
14 | define([AS_MESSAGE_LOG_FD],5)dnl |
15 | define([AS_MESSAGE_FD],6)dnl | |
52a0d149 RM |
16 | dnl Ripped out of AS_INIT, which does more cruft we do not want. |
17 | m4_wrap([m4_divert_pop([BODY])[]]) | |
18 | m4_divert_push([BODY])[]dnl | |
19 | dnl End of ripped out of AS_INIT. | |
20 | # This file is generated from configure.in by Autoconf. DO NOT EDIT! | |
b9cb349f | 21 | define([_AC_LANG], [C])dnl |
28f540f4 RM |
22 | ])dnl |
23 | dnl | |
24 | dnl Check for a symbol | |
25 | dnl | |
3a12e572 | 26 | AC_DEFUN([AC_CHECK_SYMBOL], [dnl |
28f540f4 RM |
27 | AC_MSG_CHECKING(for $1) |
28 | AC_CACHE_VAL(ac_cv_check_symbol_$1, [dnl | |
7cfb2d8b | 29 | AC_TRY_LINK(, |
28f540f4 RM |
30 | changequote(,)dnl |
31 | extern char *$1[]; puts(*$1);, | |
32 | changequote([,])dnl | |
33 | ac_cv_check_symbol_$1=yes, ac_cv_check_symbol_$1=no)]) | |
34 | if test "$ac_cv_check_symbol_$1" = yes; then | |
35 | changequote(,)dnl | |
36 | ac_tr_symbol=`echo $1 | tr '[a-z]' '[A-Z]'` | |
37 | changequote([,])dnl | |
38 | AC_DEFINE_UNQUOTED(HAVE_${ac_tr_symbol}) | |
39 | fi | |
40 | AC_MSG_RESULT($ac_cv_check_symbol_$1)])dnl | |
41 | dnl | |
ebbad4cc | 42 | |
63bda0c1 UD |
43 | dnl Locate a program and check that its version is acceptable. |
44 | dnl AC_PROG_CHECK_VER(var, namelist, version-switch, | |
4bca4c17 | 45 | dnl [version-extract-regexp], version-glob [, do-if-fail]) |
3a12e572 | 46 | AC_DEFUN([AC_CHECK_PROG_VER], |
4bca4c17 UD |
47 | [AC_CHECK_PROGS([$1], [$2]) |
48 | if test -z "[$]$1"; then | |
49 | ac_verc_fail=yes | |
63bda0c1 | 50 | else |
4bca4c17 UD |
51 | # Found it, now check the version. |
52 | AC_MSG_CHECKING([version of [$]$1]) | |
63bda0c1 | 53 | changequote(<<,>>)dnl |
4bca4c17 UD |
54 | ac_prog_version=`<<$>>$1 $3 2>&1 ifelse(<<$4>>,,, |
55 | <<| sed -n 's/^.*patsubst(<<$4>>,/,\/).*$/\1/p'>>)` | |
56 | case $ac_prog_version in | |
57 | '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; | |
58 | <<$5>>) | |
63bda0c1 | 59 | changequote([,])dnl |
4bca4c17 UD |
60 | ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; |
61 | *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; | |
62 | ||
63bda0c1 | 63 | esac |
4bca4c17 | 64 | AC_MSG_RESULT([$ac_prog_version]) |
63bda0c1 | 65 | fi |
4bca4c17 UD |
66 | ifelse([$6],,, |
67 | [if test $ac_verc_fail = yes; then | |
68 | $6 | |
69 | fi]) | |
63bda0c1 UD |
70 | ]) |
71 | ||
ebbad4cc | 72 | dnl These modifications are to allow for an empty cross compiler tree. |
3a12e572 | 73 | define([_AC_COMPILER_EXEEXT], [EXEEXT= |
ebbad4cc | 74 | ]) |
650425ce | 75 | |
3a12e572 | 76 | AC_DEFUN([LIBC_PROG_FOO_GNU], |
650425ce UD |
77 | [# Most GNU programs take a -v and spit out some text including |
78 | # the word 'GNU'. Some try to read stdin, so give them /dev/null. | |
256705f4 | 79 | if $1 -o conftest -v </dev/null 2>&1 | grep GNU > /dev/null 2>&1; then |
650425ce UD |
80 | $2 |
81 | else | |
82 | $3 | |
256705f4 UD |
83 | fi |
84 | rm -fr contest*]) | |
650425ce | 85 | |
3a12e572 | 86 | AC_DEFUN([LIBC_PROG_BINUTILS], |
650425ce UD |
87 | [# Was a --with-binutils option given? |
88 | if test -n "$path_binutils"; then | |
89 | # Make absolute; ensure a single trailing slash. | |
90 | path_binutils=`(cd $path_binutils; pwd) | sed 's%/*$%/%'` | |
63bda0c1 | 91 | CC="$CC -B$path_binutils" |
650425ce | 92 | fi |
6916c5e1 UD |
93 | AS=`$CC -print-prog-name=as` |
94 | LD=`$CC -print-prog-name=ld` | |
5edb9387 UD |
95 | AR=`$CC -print-prog-name=ar` |
96 | AC_SUBST(AR) | |
97 | ||
98 | # ranlib has to be treated a bit differently since it might not exist at all. | |
70d633a0 RM |
99 | ac_ranlib=`$CC -print-prog-name=ranlib` |
100 | if test "x$ac_ranlib" = xranlib; then | |
5edb9387 UD |
101 | # This extra check has to happen since gcc simply echos the parameter in |
102 | # case it cannot find the value in its own directories. | |
103 | AC_CHECK_TOOL(RANLIB, ranlib, :) | |
70d633a0 RM |
104 | else |
105 | RANLIB=$ac_ranlib | |
5edb9387 UD |
106 | fi |
107 | AC_SUBST(RANLIB) | |
650425ce UD |
108 | |
109 | # Determine whether we are using GNU binutils. | |
110 | AC_CACHE_CHECK(whether $AS is GNU as, libc_cv_prog_as_gnu, | |
111 | [LIBC_PROG_FOO_GNU($AS, libc_cv_prog_as_gnu=yes, libc_cv_prog_as_gnu=no)]) | |
a5a0310d | 112 | rm -f a.out |
650425ce UD |
113 | gnu_as=$libc_cv_prog_as_gnu |
114 | ||
115 | AC_CACHE_CHECK(whether $LD is GNU ld, libc_cv_prog_ld_gnu, | |
116 | [LIBC_PROG_FOO_GNU($LD, libc_cv_prog_ld_gnu=yes, libc_cv_prog_ld_gnu=no)]) | |
63bda0c1 UD |
117 | gnu_ld=$libc_cv_prog_ld_gnu |
118 | ]) |