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