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