Simplify x86 strcmp-sse4 unwind info.
[glibc.git] / aclocal.m4
blob06adbaaae644a44f057c4ae8115ee3e523bfe04a
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
6 define([GLIBC_PROVIDES], [dnl
7 AC_PROVIDE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
8 AC_PROVIDE([AC_CONFIG_SUBDIRS])dnl
9 AC_PROVIDE([_AS_ECHO_N_PREPARE])dnl
10 AC_PROVIDE([_AS_ECHO_PREPARE])dnl
11 AC_PROVIDE([_AS_CR_PREPARE])dnl
12 AC_PROVIDE([_AS_TR_SH_PREPARE])dnl
13 AC_PROVIDE([AC_PROG_INSTALL])dnl
14 AC_PROVIDE([AC_PROG_RANLIB])dnl
15 AC_PROVIDE([AC_PROG_CC])dnl
16 AC_PROVIDE([AC_PROG_CPP])dnl
17 AC_PROVIDE([_AS_PATH_SEPARATOR_PREPARE])dnl
18 AC_PROVIDE([_AS_TEST_PREPARE])dnl
19 define([AS_MESSAGE_LOG_FD],5)dnl
20 define([AS_MESSAGE_FD],6)dnl
21 dnl Ripped out of AS_INIT, which does more cruft we do not want.
22 m4_wrap([m4_divert_pop([BODY])[]])
23 m4_divert_push([BODY])[]dnl
24 dnl End of ripped out of AS_INIT.
25 # This file is generated from configure.in by Autoconf.  DO NOT EDIT!
26 define([_AC_LANG], [C])dnl
27 ])dnl
28 dnl
29 dnl Check for a symbol
30 dnl
31 AC_DEFUN([AC_CHECK_SYMBOL], [dnl
32 AC_MSG_CHECKING(for $1)
33 AC_CACHE_VAL(ac_cv_check_symbol_$1, [dnl
34 AC_TRY_LINK(,
35 changequote(,)dnl
36 extern char *$1[]; puts(*$1);,
37 changequote([,])dnl
38             ac_cv_check_symbol_$1=yes, ac_cv_check_symbol_$1=no)])
39 if test "$ac_cv_check_symbol_$1" = yes; then
40 changequote(,)dnl
41   ac_tr_symbol=`echo $1 | tr '[a-z]' '[A-Z]'`
42 changequote([,])dnl
43   AC_DEFINE_UNQUOTED(HAVE_${ac_tr_symbol})
45 AC_MSG_RESULT($ac_cv_check_symbol_$1)])dnl
46 dnl
48 dnl Locate a program and check that its version is acceptable.
49 dnl AC_PROG_CHECK_VER(var, namelist, version-switch,
50 dnl                   [version-extract-regexp], version-glob [, do-if-fail])
51 AC_DEFUN([AC_CHECK_PROG_VER],
52 [AC_CHECK_PROGS([$1], [$2])
53 if test -z "[$]$1"; then
54   ac_verc_fail=yes
55 else
56   # Found it, now check the version.
57   AC_MSG_CHECKING([version of [$]$1])
58 changequote(<<,>>)dnl
59   ac_prog_version=`<<$>>$1 $3 2>&1 ifelse(<<$4>>,,,
60                    <<| sed -n 's/^.*patsubst(<<$4>>,/,\/).*$/\1/p'>>)`
61   case $ac_prog_version in
62     '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
63     <<$5>>)
64 changequote([,])dnl
65        ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
66     *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
68   esac
69   AC_MSG_RESULT([$ac_prog_version])
71 ifelse([$6],,,
72 [if test $ac_verc_fail = yes; then
73   $6
74 fi])
77 dnl These modifications are to allow for an empty cross compiler tree.
78 define([_AC_COMPILER_EXEEXT], [EXEEXT=
81 AC_DEFUN([LIBC_PROG_FOO_GNU],
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.
84 if $1 -o conftest -v </dev/null 2>&1 | grep GNU > /dev/null 2>&1; then
85   $2
86 else
87   $3
89 rm -fr contest*])
91 AC_DEFUN([LIBC_PROG_BINUTILS],
92 [# Was a --with-binutils option given?
93 if test -n "$path_binutils"; then
94     # Make absolute; ensure a single trailing slash.
95     path_binutils=`(cd $path_binutils; pwd) | sed 's%/*$%/%'`
96     CC="$CC -B$path_binutils"
98 AS=`$CC -print-prog-name=as`
99 LD=`$CC -print-prog-name=ld`
100 AR=`$CC -print-prog-name=ar`
101 AC_SUBST(AR)
102 OBJDUMP=`$CC -print-prog-name=objdump`
103 AC_SUBST(OBJDUMP)
105 # ranlib has to be treated a bit differently since it might not exist at all.
106 ac_ranlib=`$CC -print-prog-name=ranlib`
107 if test "x$ac_ranlib" = xranlib; then
108 # This extra check has to happen since gcc simply echos the parameter in
109 # case it cannot find the value in its own directories.
110 AC_CHECK_TOOL(RANLIB, ranlib, :)
111 else
112   RANLIB=$ac_ranlib
114 AC_SUBST(RANLIB)
116 # Determine whether we are using GNU binutils.
117 AC_CACHE_CHECK(whether $AS is GNU as, libc_cv_prog_as_gnu,
118 [LIBC_PROG_FOO_GNU($AS, libc_cv_prog_as_gnu=yes, libc_cv_prog_as_gnu=no)])
119 rm -f a.out
120 gnu_as=$libc_cv_prog_as_gnu
122 AC_CACHE_CHECK(whether $LD is GNU ld, libc_cv_prog_ld_gnu,
123 [LIBC_PROG_FOO_GNU($LD, libc_cv_prog_ld_gnu=yes, libc_cv_prog_ld_gnu=no)])
124 gnu_ld=$libc_cv_prog_ld_gnu