From cb8a6dbd176ee59d61068bed92e2c8d22bd28b13 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Wed, 30 Oct 2013 13:20:52 +1000 Subject: rename configure.in to configure.ac Autoconf has been deprecating configure.in for quite a long time. Rename all our configure.in and preconfigure.in files to .ac. Signed-off-by: Mike Frysinger --- sysdeps/gnu/configure | 2 +- sysdeps/gnu/configure.ac | 47 ++++++ sysdeps/gnu/configure.in | 47 ------ sysdeps/i386/configure | 2 +- sysdeps/i386/configure.ac | 93 ++++++++++++ sysdeps/i386/configure.in | 93 ------------ sysdeps/ieee754/ldbl-opt/configure | 2 +- sysdeps/ieee754/ldbl-opt/configure.ac | 19 +++ sysdeps/ieee754/ldbl-opt/configure.in | 19 --- sysdeps/mach/configure | 2 +- sysdeps/mach/configure.ac | 126 ++++++++++++++++ sysdeps/mach/configure.in | 126 ---------------- sysdeps/mach/hurd/configure | 2 +- sysdeps/mach/hurd/configure.ac | 31 ++++ sysdeps/mach/hurd/configure.in | 31 ---- sysdeps/powerpc/configure | 2 +- sysdeps/powerpc/configure.ac | 21 +++ sysdeps/powerpc/configure.in | 21 --- sysdeps/powerpc/powerpc32/configure | 2 +- sysdeps/powerpc/powerpc32/configure.ac | 32 ++++ sysdeps/powerpc/powerpc32/configure.in | 32 ---- sysdeps/powerpc/powerpc64/configure | 2 +- sysdeps/powerpc/powerpc64/configure.ac | 42 ++++++ sysdeps/powerpc/powerpc64/configure.in | 42 ------ sysdeps/s390/s390-32/configure | 2 +- sysdeps/s390/s390-32/configure.ac | 6 + sysdeps/s390/s390-32/configure.in | 6 - sysdeps/s390/s390-64/configure | 2 +- sysdeps/s390/s390-64/configure.ac | 6 + sysdeps/s390/s390-64/configure.in | 6 - sysdeps/sh/configure | 2 +- sysdeps/sh/configure.ac | 6 + sysdeps/sh/configure.in | 6 - sysdeps/sparc/configure | 2 +- sysdeps/sparc/configure.ac | 59 ++++++++ sysdeps/sparc/configure.in | 59 -------- sysdeps/unix/sysv/linux/configure | 2 +- sysdeps/unix/sysv/linux/configure.ac | 215 +++++++++++++++++++++++++++ sysdeps/unix/sysv/linux/configure.in | 215 --------------------------- sysdeps/unix/sysv/linux/powerpc/configure | 2 +- sysdeps/unix/sysv/linux/powerpc/configure.ac | 37 +++++ sysdeps/unix/sysv/linux/powerpc/configure.in | 37 ----- sysdeps/x86_64/configure | 2 +- sysdeps/x86_64/configure.ac | 57 +++++++ sysdeps/x86_64/configure.in | 57 ------- sysdeps/x86_64/preconfigure | 2 +- sysdeps/x86_64/preconfigure.ac | 20 +++ sysdeps/x86_64/preconfigure.in | 20 --- 48 files changed, 833 insertions(+), 833 deletions(-) create mode 100644 sysdeps/gnu/configure.ac delete mode 100644 sysdeps/gnu/configure.in create mode 100644 sysdeps/i386/configure.ac delete mode 100644 sysdeps/i386/configure.in create mode 100644 sysdeps/ieee754/ldbl-opt/configure.ac delete mode 100644 sysdeps/ieee754/ldbl-opt/configure.in create mode 100644 sysdeps/mach/configure.ac delete mode 100644 sysdeps/mach/configure.in create mode 100644 sysdeps/mach/hurd/configure.ac delete mode 100644 sysdeps/mach/hurd/configure.in create mode 100644 sysdeps/powerpc/configure.ac delete mode 100644 sysdeps/powerpc/configure.in create mode 100644 sysdeps/powerpc/powerpc32/configure.ac delete mode 100644 sysdeps/powerpc/powerpc32/configure.in create mode 100644 sysdeps/powerpc/powerpc64/configure.ac delete mode 100644 sysdeps/powerpc/powerpc64/configure.in create mode 100644 sysdeps/s390/s390-32/configure.ac delete mode 100644 sysdeps/s390/s390-32/configure.in create mode 100644 sysdeps/s390/s390-64/configure.ac delete mode 100644 sysdeps/s390/s390-64/configure.in create mode 100644 sysdeps/sh/configure.ac delete mode 100644 sysdeps/sh/configure.in create mode 100644 sysdeps/sparc/configure.ac delete mode 100644 sysdeps/sparc/configure.in create mode 100644 sysdeps/unix/sysv/linux/configure.ac delete mode 100644 sysdeps/unix/sysv/linux/configure.in create mode 100644 sysdeps/unix/sysv/linux/powerpc/configure.ac delete mode 100644 sysdeps/unix/sysv/linux/powerpc/configure.in create mode 100644 sysdeps/x86_64/configure.ac delete mode 100644 sysdeps/x86_64/configure.in create mode 100644 sysdeps/x86_64/preconfigure.ac delete mode 100644 sysdeps/x86_64/preconfigure.in (limited to 'sysdeps') diff --git a/sysdeps/gnu/configure b/sysdeps/gnu/configure index 70aaa90191..e7f0e43959 100644 --- a/sysdeps/gnu/configure +++ b/sysdeps/gnu/configure @@ -1,4 +1,4 @@ -# This file is generated from configure.in by Autoconf. DO NOT EDIT! +# This file is generated from configure.ac by Autoconf. DO NOT EDIT! # Local configure fragment for sysdeps/gnu. diff --git a/sysdeps/gnu/configure.ac b/sysdeps/gnu/configure.ac new file mode 100644 index 0000000000..ce251df0c5 --- /dev/null +++ b/sysdeps/gnu/configure.ac @@ -0,0 +1,47 @@ +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. + +# Local configure fragment for sysdeps/gnu. + +# The Filesystem Hierarchy Standard prescribes where to place "essential" +# files. I.e., when the installation prefix is "/usr" we have to place +# shared library objects and the configuration files on the root partition +# in /lib and /etc. +case "$prefix" in +/usr | /usr/) + # 64-bit libraries on bi-arch platforms go in /lib64 instead of /lib. + # Allow earlier configure scripts to handle libc_cv_slibdir, + # libc_cv_rtlddir, libdir, and libc_cv_localedir. + test -n "$libc_cv_slibdir" || \ + case $machine in + sparc/sparc64 | x86_64* | powerpc/powerpc64 | s390/s390-64) + libc_cv_slibdir=/lib64 + case $machine in + s390/s390-64) + libc_cv_rtlddir=/lib + ;; + esac + if test "$libdir" = '${exec_prefix}/lib'; then + libdir='${exec_prefix}/lib64'; + # Locale data can be shared between 32bit and 64bit libraries + libc_cv_localedir='${exec_prefix}/lib/locale' + fi + ;; + *) + libc_cv_slibdir=/lib + ;; + esac + # Allow the user to override the path with --sysconfdir. + if test "$sysconfdir" = '${prefix}/etc'; then + libc_cv_sysconfdir=/etc + else + libc_cv_sysconfdir=$sysconfdir + fi + # Allow the user to override the path with --localstatedir. + if test "$localstatedir" = '${prefix}/var'; then + libc_cv_localstatedir=/var + else + libc_cv_localstatedir=$localstatedir + fi + libc_cv_rootsbindir=/sbin + ;; +esac diff --git a/sysdeps/gnu/configure.in b/sysdeps/gnu/configure.in deleted file mode 100644 index ce251df0c5..0000000000 --- a/sysdeps/gnu/configure.in +++ /dev/null @@ -1,47 +0,0 @@ -GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. - -# Local configure fragment for sysdeps/gnu. - -# The Filesystem Hierarchy Standard prescribes where to place "essential" -# files. I.e., when the installation prefix is "/usr" we have to place -# shared library objects and the configuration files on the root partition -# in /lib and /etc. -case "$prefix" in -/usr | /usr/) - # 64-bit libraries on bi-arch platforms go in /lib64 instead of /lib. - # Allow earlier configure scripts to handle libc_cv_slibdir, - # libc_cv_rtlddir, libdir, and libc_cv_localedir. - test -n "$libc_cv_slibdir" || \ - case $machine in - sparc/sparc64 | x86_64* | powerpc/powerpc64 | s390/s390-64) - libc_cv_slibdir=/lib64 - case $machine in - s390/s390-64) - libc_cv_rtlddir=/lib - ;; - esac - if test "$libdir" = '${exec_prefix}/lib'; then - libdir='${exec_prefix}/lib64'; - # Locale data can be shared between 32bit and 64bit libraries - libc_cv_localedir='${exec_prefix}/lib/locale' - fi - ;; - *) - libc_cv_slibdir=/lib - ;; - esac - # Allow the user to override the path with --sysconfdir. - if test "$sysconfdir" = '${prefix}/etc'; then - libc_cv_sysconfdir=/etc - else - libc_cv_sysconfdir=$sysconfdir - fi - # Allow the user to override the path with --localstatedir. - if test "$localstatedir" = '${prefix}/var'; then - libc_cv_localstatedir=/var - else - libc_cv_localstatedir=$localstatedir - fi - libc_cv_rootsbindir=/sbin - ;; -esac diff --git a/sysdeps/i386/configure b/sysdeps/i386/configure index 53b6a619d3..5dcc159900 100644 --- a/sysdeps/i386/configure +++ b/sysdeps/i386/configure @@ -29,7 +29,7 @@ $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile -# This file is generated from configure.in by Autoconf. DO NOT EDIT! +# This file is generated from configure.ac by Autoconf. DO NOT EDIT! # Local configure fragment for sysdeps/i386. # We no longer support i386 since it lacks the atomic instructions diff --git a/sysdeps/i386/configure.ac b/sysdeps/i386/configure.ac new file mode 100644 index 0000000000..96ab7b0f5a --- /dev/null +++ b/sysdeps/i386/configure.ac @@ -0,0 +1,93 @@ +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. +# Local configure fragment for sysdeps/i386. + +# We no longer support i386 since it lacks the atomic instructions +# required to implement NPTL threading. +if test "$config_machine" = i386; then + AC_MSG_ERROR([ +*** ERROR: Support for i386 is deprecated. +*** Please use host i786, i686, i585 or i486. +*** For example: /src/glibc/configure --host=i686-pc-linux-gnu ..."]) +fi + +# The GNU C Library can't be built for i386. There are several reasons for +# this restriction. The primary reason is that i386 lacks the atomic +# operations required to support the current NPTL implementation. While it is +# possible that such atomic operations could be emulated in the kernel to date +# no such work has been done to enable this. Even with NPTL disabled you still +# have no atomic.h implementation. Given the declining use of i386 we disable +# support for building with `-march=i386' or `-mcpu=i386.' We don't explicitly +# check for i386, instead we make sure the compiler has support for inlining +# the builtin __sync_val_compare_and_swap. If it does then we should have no +# problem building for i386. +LIBC_COMPILER_BUILTIN_INLINED( + [__sync_val_compare_and_swap], + [int a, b, c; __sync_val_compare_and_swap (&a, b, c);], + [-O0], + [libc_cv_unsupported_i386=no], + [AC_MSG_ERROR([ +*** Building with -march=i386/-mcpu=i386 is not supported. +*** Please use host i786, i686, i586, or i486. +*** For example: /source/glibc/configure CFLAGS='-O2 -march=i686' ...])]) + +AC_CHECK_HEADER([cpuid.h], , + [AC_MSG_ERROR([gcc must provide the header])], + [/* No default includes. */]) + +dnl Check if -msse4 works. +AC_CACHE_CHECK(for SSE4 support, libc_cv_cc_sse4, [dnl +LIBC_TRY_CC_OPTION([-msse4], [libc_cv_cc_sse4=yes], [libc_cv_cc_sse4=no]) +]) +if test $libc_cv_cc_sse4 = yes; then + AC_DEFINE(HAVE_SSE4_SUPPORT) +fi +LIBC_CONFIG_VAR([config-cflags-sse4], [$libc_cv_cc_sse4]) + +dnl Check if -Wa,-mtune=i686 works. +AC_CACHE_CHECK(for assembler -mtune=i686 support, libc_cv_as_i686, [dnl +LIBC_TRY_CC_OPTION([-Wa,-mtune=i686], + [libc_cv_as_i686=yes], + [libc_cv_as_i686=no]) +]) +LIBC_CONFIG_VAR([config-asflags-i686], [$libc_cv_as_i686]) + +dnl Check if -mavx works. +AC_CACHE_CHECK(for AVX support, libc_cv_cc_avx, [dnl +LIBC_TRY_CC_OPTION([-mavx], [libc_cv_cc_avx=yes], [libc_cv_cc_avx=no]) +]) +if test $libc_cv_cc_avx = yes; then + AC_DEFINE(HAVE_AVX_SUPPORT) +fi +LIBC_CONFIG_VAR([config-cflags-avx], [$libc_cv_cc_avx]) + +dnl Check if -msse2avx works. +AC_CACHE_CHECK(for AVX encoding of SSE instructions, libc_cv_cc_sse2avx, [dnl +LIBC_TRY_CC_OPTION([-msse2avx], + [libc_cv_cc_sse2avx=yes], + [libc_cv_cc_sse2avx=no]) +]) +if test $libc_cv_cc_sse2avx = yes; then + AC_DEFINE(HAVE_SSE2AVX_SUPPORT) +fi +LIBC_CONFIG_VAR([config-cflags-sse2avx], [$libc_cv_cc_sse2avx]) + +dnl Check if -mfma4 works. +AC_CACHE_CHECK(for FMA4 support, libc_cv_cc_fma4, [dnl +LIBC_TRY_CC_OPTION([-mfma4], [libc_cv_cc_fma4=yes], [libc_cv_cc_fma4=no]) +]) +if test $libc_cv_cc_fma4 = yes; then + AC_DEFINE(HAVE_FMA4_SUPPORT) +fi +LIBC_CONFIG_VAR([have-mfma4], [$libc_cv_cc_fma4]) + +dnl Check if -mno-vzeroupper works. +AC_CACHE_CHECK(for -mno-vzeroupper support, libc_cv_cc_novzeroupper, [dnl +LIBC_TRY_CC_OPTION([-mno-vzeroupper], + [libc_cv_cc_novzeroupper=yes], + [libc_cv_cc_novzeroupper=no]) +]) +LIBC_CONFIG_VAR([config-cflags-novzeroupper], [$libc_cv_cc_novzeroupper]) + +dnl It is always possible to access static and hidden symbols in an +dnl position independent way. +AC_DEFINE(PI_STATIC_AND_HIDDEN) diff --git a/sysdeps/i386/configure.in b/sysdeps/i386/configure.in deleted file mode 100644 index 96ab7b0f5a..0000000000 --- a/sysdeps/i386/configure.in +++ /dev/null @@ -1,93 +0,0 @@ -GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. -# Local configure fragment for sysdeps/i386. - -# We no longer support i386 since it lacks the atomic instructions -# required to implement NPTL threading. -if test "$config_machine" = i386; then - AC_MSG_ERROR([ -*** ERROR: Support for i386 is deprecated. -*** Please use host i786, i686, i585 or i486. -*** For example: /src/glibc/configure --host=i686-pc-linux-gnu ..."]) -fi - -# The GNU C Library can't be built for i386. There are several reasons for -# this restriction. The primary reason is that i386 lacks the atomic -# operations required to support the current NPTL implementation. While it is -# possible that such atomic operations could be emulated in the kernel to date -# no such work has been done to enable this. Even with NPTL disabled you still -# have no atomic.h implementation. Given the declining use of i386 we disable -# support for building with `-march=i386' or `-mcpu=i386.' We don't explicitly -# check for i386, instead we make sure the compiler has support for inlining -# the builtin __sync_val_compare_and_swap. If it does then we should have no -# problem building for i386. -LIBC_COMPILER_BUILTIN_INLINED( - [__sync_val_compare_and_swap], - [int a, b, c; __sync_val_compare_and_swap (&a, b, c);], - [-O0], - [libc_cv_unsupported_i386=no], - [AC_MSG_ERROR([ -*** Building with -march=i386/-mcpu=i386 is not supported. -*** Please use host i786, i686, i586, or i486. -*** For example: /source/glibc/configure CFLAGS='-O2 -march=i686' ...])]) - -AC_CHECK_HEADER([cpuid.h], , - [AC_MSG_ERROR([gcc must provide the header])], - [/* No default includes. */]) - -dnl Check if -msse4 works. -AC_CACHE_CHECK(for SSE4 support, libc_cv_cc_sse4, [dnl -LIBC_TRY_CC_OPTION([-msse4], [libc_cv_cc_sse4=yes], [libc_cv_cc_sse4=no]) -]) -if test $libc_cv_cc_sse4 = yes; then - AC_DEFINE(HAVE_SSE4_SUPPORT) -fi -LIBC_CONFIG_VAR([config-cflags-sse4], [$libc_cv_cc_sse4]) - -dnl Check if -Wa,-mtune=i686 works. -AC_CACHE_CHECK(for assembler -mtune=i686 support, libc_cv_as_i686, [dnl -LIBC_TRY_CC_OPTION([-Wa,-mtune=i686], - [libc_cv_as_i686=yes], - [libc_cv_as_i686=no]) -]) -LIBC_CONFIG_VAR([config-asflags-i686], [$libc_cv_as_i686]) - -dnl Check if -mavx works. -AC_CACHE_CHECK(for AVX support, libc_cv_cc_avx, [dnl -LIBC_TRY_CC_OPTION([-mavx], [libc_cv_cc_avx=yes], [libc_cv_cc_avx=no]) -]) -if test $libc_cv_cc_avx = yes; then - AC_DEFINE(HAVE_AVX_SUPPORT) -fi -LIBC_CONFIG_VAR([config-cflags-avx], [$libc_cv_cc_avx]) - -dnl Check if -msse2avx works. -AC_CACHE_CHECK(for AVX encoding of SSE instructions, libc_cv_cc_sse2avx, [dnl -LIBC_TRY_CC_OPTION([-msse2avx], - [libc_cv_cc_sse2avx=yes], - [libc_cv_cc_sse2avx=no]) -]) -if test $libc_cv_cc_sse2avx = yes; then - AC_DEFINE(HAVE_SSE2AVX_SUPPORT) -fi -LIBC_CONFIG_VAR([config-cflags-sse2avx], [$libc_cv_cc_sse2avx]) - -dnl Check if -mfma4 works. -AC_CACHE_CHECK(for FMA4 support, libc_cv_cc_fma4, [dnl -LIBC_TRY_CC_OPTION([-mfma4], [libc_cv_cc_fma4=yes], [libc_cv_cc_fma4=no]) -]) -if test $libc_cv_cc_fma4 = yes; then - AC_DEFINE(HAVE_FMA4_SUPPORT) -fi -LIBC_CONFIG_VAR([have-mfma4], [$libc_cv_cc_fma4]) - -dnl Check if -mno-vzeroupper works. -AC_CACHE_CHECK(for -mno-vzeroupper support, libc_cv_cc_novzeroupper, [dnl -LIBC_TRY_CC_OPTION([-mno-vzeroupper], - [libc_cv_cc_novzeroupper=yes], - [libc_cv_cc_novzeroupper=no]) -]) -LIBC_CONFIG_VAR([config-cflags-novzeroupper], [$libc_cv_cc_novzeroupper]) - -dnl It is always possible to access static and hidden symbols in an -dnl position independent way. -AC_DEFINE(PI_STATIC_AND_HIDDEN) diff --git a/sysdeps/ieee754/ldbl-opt/configure b/sysdeps/ieee754/ldbl-opt/configure index 6e69038b93..ad9d77b88c 100644 --- a/sysdeps/ieee754/ldbl-opt/configure +++ b/sysdeps/ieee754/ldbl-opt/configure @@ -1,4 +1,4 @@ -# This file is generated from configure.in by Autoconf. DO NOT EDIT! +# This file is generated from configure.ac by Autoconf. DO NOT EDIT! # Local configure fragment for sysdeps/ieee754/ldbl-opt/. diff --git a/sysdeps/ieee754/ldbl-opt/configure.ac b/sysdeps/ieee754/ldbl-opt/configure.ac new file mode 100644 index 0000000000..a77fadd1c4 --- /dev/null +++ b/sysdeps/ieee754/ldbl-opt/configure.ac @@ -0,0 +1,19 @@ +sinclude(./aclocal.m4)dnl Autoconf lossage +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. +# Local configure fragment for sysdeps/ieee754/ldbl-opt/. + +AC_CACHE_CHECK(whether $CC $CFLAGS supports -mlong-double-128, + libc_cv_mlong_double_128, [dnl +save_CFLAGS="$CFLAGS" +CFLAGS="$CFLAGS -mlong-double-128" +AC_TRY_COMPILE(, [ +#ifndef __LONG_DOUBLE_128__ +# error "compiler did not predefine __LONG_DOUBLE_128__ as expected" +#endif +long double foobar (long double x) { return x; }], + libc_cv_mlong_double_128=yes, + libc_cv_mlong_double_128=no) +CFLAGS="$save_CFLAGS"]) +if test "$libc_cv_mlong_double_128" = no; then + AC_MSG_ERROR([this configuration requires -mlong-double-128 support]) +fi diff --git a/sysdeps/ieee754/ldbl-opt/configure.in b/sysdeps/ieee754/ldbl-opt/configure.in deleted file mode 100644 index a77fadd1c4..0000000000 --- a/sysdeps/ieee754/ldbl-opt/configure.in +++ /dev/null @@ -1,19 +0,0 @@ -sinclude(./aclocal.m4)dnl Autoconf lossage -GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. -# Local configure fragment for sysdeps/ieee754/ldbl-opt/. - -AC_CACHE_CHECK(whether $CC $CFLAGS supports -mlong-double-128, - libc_cv_mlong_double_128, [dnl -save_CFLAGS="$CFLAGS" -CFLAGS="$CFLAGS -mlong-double-128" -AC_TRY_COMPILE(, [ -#ifndef __LONG_DOUBLE_128__ -# error "compiler did not predefine __LONG_DOUBLE_128__ as expected" -#endif -long double foobar (long double x) { return x; }], - libc_cv_mlong_double_128=yes, - libc_cv_mlong_double_128=no) -CFLAGS="$save_CFLAGS"]) -if test "$libc_cv_mlong_double_128" = no; then - AC_MSG_ERROR([this configuration requires -mlong-double-128 support]) -fi diff --git a/sysdeps/mach/configure b/sysdeps/mach/configure index 3af372560f..61ac7d9684 100644 --- a/sysdeps/mach/configure +++ b/sysdeps/mach/configure @@ -65,7 +65,7 @@ $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_preproc -# This file is generated from configure.in by Autoconf. DO NOT EDIT! +# This file is generated from configure.ac by Autoconf. DO NOT EDIT! if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args. diff --git a/sysdeps/mach/configure.ac b/sysdeps/mach/configure.ac new file mode 100644 index 0000000000..db85f47eae --- /dev/null +++ b/sysdeps/mach/configure.ac @@ -0,0 +1,126 @@ +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. + +AC_CHECK_TOOL(MIG, mig, MISSING) +if test "x$MIG" = xMISSING; then + AC_MSG_ERROR([cannot find required build tool mig]) +fi +LIBC_CONFIG_VAR([MIG], [$MIG]) + +### Sanity checks for Mach header installation +AC_CHECK_HEADER(mach/mach_types.h,, + [AC_MSG_ERROR([cannot find Mach headers])], -) +AC_CHECK_HEADER(mach/mach_types.defs,, [dnl +AC_MSG_ERROR([cannot find Mach .defs files])], -) + +dnl +dnl mach_TYPE_CHECK(foo_t, bar_t) +dnl +dnl Check if foo_t is defined by . +dnl If not, compile with -Dfoo_t=bar_t. +dnl +AC_DEFUN([mach_TYPE_CHECK], [dnl +AC_CACHE_CHECK(for $1 in mach/mach_types.h, libc_cv_mach_$1, +AC_TRY_COMPILE([#include ], [extern $1 foo;], +libc_cv_mach_$1=$1, libc_cv_mach_$1=$2)) +if test [$]libc_cv_mach_$1 != $1; then + DEFINES="$DEFINES -D$1=$2" +fi]) + +dnl +dnl OSF Mach has renamed these typedefs for some reason. +dnl +mach_TYPE_CHECK(task_t, task_port_t) +mach_TYPE_CHECK(thread_t, thread_port_t) + +dnl +dnl The creation_time field is a GNU Mach addition the other variants lack. +dnl +AC_CACHE_CHECK(for creation_time in task_basic_info, + libc_cv_mach_task_creation_time, [dnl +AC_TRY_COMPILE([#include ], [ +extern struct task_basic_info *i; +long s = i->creation_time.seconds; +], libc_cv_mach_task_creation_time=yes, libc_cv_mach_task_creation_time=no)]) +if test $libc_cv_mach_task_creation_time = no; then + AC_MSG_ERROR([you need Mach headers supporting task_info.creation_time]) +fi + +dnl +dnl The Darwin variant no longer has +dnl but instead has several constituent .defs files. +dnl In this scenario we will presume there is a +dnl that contains an #include for each constituent header file, +dnl but we don't do a check for that here because in a bare +dnl environment the compile against those headers will fail. +dnl +mach_interface_list= +for ifc in mach mach4 \ + clock clock_priv host_priv host_security ledger lock_set \ + processor processor_set task thread_act vm_map \ + memory_object memory_object_default default_pager \ + i386/mach_i386 \ + ; do + AC_CHECK_HEADER(mach/${ifc}.defs, [dnl + mach_interface_list="$mach_interface_list $ifc"],, -) +done +if test "x$mach_interface_list" = x; then + AC_MSG_ERROR([what manner of Mach is this?]) +fi + +AC_CACHE_CHECK(for host_page_size in mach_host.defs, + libc_cv_mach_host_page_size, [dnl +AC_EGREP_HEADER(host_page_size, mach/mach_host.defs, + libc_cv_mach_host_page_size=yes, + libc_cv_mach_host_page_size=no)]) +if test $libc_cv_mach_host_page_size = yes; then + AC_DEFINE([HAVE_HOST_PAGE_SIZE]) +fi + +AC_CHECK_HEADER(mach/machine/ndr_def.h, [dnl + DEFINES="$DEFINES -DNDR_DEF_HEADER=''"], [dnl +AC_CHECK_HEADER(machine/ndr_def.h, [dnl + DEFINES="$DEFINES -DNDR_DEF_HEADER=''"],, -)], -) + +AC_CACHE_CHECK(for i386_io_perm_modify in mach_i386.defs, + libc_cv_mach_i386_ioports, [dnl +AC_EGREP_HEADER(i386_io_perm_modify, mach/i386/mach_i386.defs, + libc_cv_mach_i386_ioports=yes, + libc_cv_mach_i386_ioports=no)]) +if test $libc_cv_mach_i386_ioports = yes; then + AC_DEFINE([HAVE_I386_IO_PERM_MODIFY]) +fi + +AC_CACHE_CHECK(for i386_set_gdt in mach_i386.defs, + libc_cv_mach_i386_gdt, [dnl +AC_EGREP_HEADER(i386_set_gdt, mach/i386/mach_i386.defs, + libc_cv_mach_i386_gdt=yes, + libc_cv_mach_i386_gdt=no)]) +if test $libc_cv_mach_i386_gdt = yes; then + AC_DEFINE([HAVE_I386_SET_GDT]) +fi + +dnl Swiped from hurd/aclocal.m4 +AC_DEFUN([hurd_MIG_RETCODE], [dnl +# See if mig groks `retcode'. +AC_CACHE_CHECK(whether $MIG supports the retcode keyword, hurd_cv_mig_retcode, +[cat > conftest.defs <<\EOF +#include +#include +subsystem foobar 1000; +type reply_port_t = polymorphic | MACH_MSG_TYPE_PORT_SEND_ONCE + ctype: mach_port_t; +simpleroutine foobar_reply ( + reply_port: reply_port_t; + err: kern_return_t, RetCode); +EOF +if AC_TRY_COMMAND([CC="${CC}" ${MIG-false} -n conftest.defs 1>&AS_MESSAGE_LOG_FD]); then + hurd_cv_mig_retcode=yes +else + hurd_cv_mig_retcode=no +fi +rm -f conftest*]) +if test $hurd_cv_mig_retcode = yes; then + AC_DEFINE(HAVE_MIG_RETCODE) +fi]) + +hurd_MIG_RETCODE diff --git a/sysdeps/mach/configure.in b/sysdeps/mach/configure.in deleted file mode 100644 index db85f47eae..0000000000 --- a/sysdeps/mach/configure.in +++ /dev/null @@ -1,126 +0,0 @@ -GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. - -AC_CHECK_TOOL(MIG, mig, MISSING) -if test "x$MIG" = xMISSING; then - AC_MSG_ERROR([cannot find required build tool mig]) -fi -LIBC_CONFIG_VAR([MIG], [$MIG]) - -### Sanity checks for Mach header installation -AC_CHECK_HEADER(mach/mach_types.h,, - [AC_MSG_ERROR([cannot find Mach headers])], -) -AC_CHECK_HEADER(mach/mach_types.defs,, [dnl -AC_MSG_ERROR([cannot find Mach .defs files])], -) - -dnl -dnl mach_TYPE_CHECK(foo_t, bar_t) -dnl -dnl Check if foo_t is defined by . -dnl If not, compile with -Dfoo_t=bar_t. -dnl -AC_DEFUN([mach_TYPE_CHECK], [dnl -AC_CACHE_CHECK(for $1 in mach/mach_types.h, libc_cv_mach_$1, -AC_TRY_COMPILE([#include ], [extern $1 foo;], -libc_cv_mach_$1=$1, libc_cv_mach_$1=$2)) -if test [$]libc_cv_mach_$1 != $1; then - DEFINES="$DEFINES -D$1=$2" -fi]) - -dnl -dnl OSF Mach has renamed these typedefs for some reason. -dnl -mach_TYPE_CHECK(task_t, task_port_t) -mach_TYPE_CHECK(thread_t, thread_port_t) - -dnl -dnl The creation_time field is a GNU Mach addition the other variants lack. -dnl -AC_CACHE_CHECK(for creation_time in task_basic_info, - libc_cv_mach_task_creation_time, [dnl -AC_TRY_COMPILE([#include ], [ -extern struct task_basic_info *i; -long s = i->creation_time.seconds; -], libc_cv_mach_task_creation_time=yes, libc_cv_mach_task_creation_time=no)]) -if test $libc_cv_mach_task_creation_time = no; then - AC_MSG_ERROR([you need Mach headers supporting task_info.creation_time]) -fi - -dnl -dnl The Darwin variant no longer has -dnl but instead has several constituent .defs files. -dnl In this scenario we will presume there is a -dnl that contains an #include for each constituent header file, -dnl but we don't do a check for that here because in a bare -dnl environment the compile against those headers will fail. -dnl -mach_interface_list= -for ifc in mach mach4 \ - clock clock_priv host_priv host_security ledger lock_set \ - processor processor_set task thread_act vm_map \ - memory_object memory_object_default default_pager \ - i386/mach_i386 \ - ; do - AC_CHECK_HEADER(mach/${ifc}.defs, [dnl - mach_interface_list="$mach_interface_list $ifc"],, -) -done -if test "x$mach_interface_list" = x; then - AC_MSG_ERROR([what manner of Mach is this?]) -fi - -AC_CACHE_CHECK(for host_page_size in mach_host.defs, - libc_cv_mach_host_page_size, [dnl -AC_EGREP_HEADER(host_page_size, mach/mach_host.defs, - libc_cv_mach_host_page_size=yes, - libc_cv_mach_host_page_size=no)]) -if test $libc_cv_mach_host_page_size = yes; then - AC_DEFINE([HAVE_HOST_PAGE_SIZE]) -fi - -AC_CHECK_HEADER(mach/machine/ndr_def.h, [dnl - DEFINES="$DEFINES -DNDR_DEF_HEADER=''"], [dnl -AC_CHECK_HEADER(machine/ndr_def.h, [dnl - DEFINES="$DEFINES -DNDR_DEF_HEADER=''"],, -)], -) - -AC_CACHE_CHECK(for i386_io_perm_modify in mach_i386.defs, - libc_cv_mach_i386_ioports, [dnl -AC_EGREP_HEADER(i386_io_perm_modify, mach/i386/mach_i386.defs, - libc_cv_mach_i386_ioports=yes, - libc_cv_mach_i386_ioports=no)]) -if test $libc_cv_mach_i386_ioports = yes; then - AC_DEFINE([HAVE_I386_IO_PERM_MODIFY]) -fi - -AC_CACHE_CHECK(for i386_set_gdt in mach_i386.defs, - libc_cv_mach_i386_gdt, [dnl -AC_EGREP_HEADER(i386_set_gdt, mach/i386/mach_i386.defs, - libc_cv_mach_i386_gdt=yes, - libc_cv_mach_i386_gdt=no)]) -if test $libc_cv_mach_i386_gdt = yes; then - AC_DEFINE([HAVE_I386_SET_GDT]) -fi - -dnl Swiped from hurd/aclocal.m4 -AC_DEFUN([hurd_MIG_RETCODE], [dnl -# See if mig groks `retcode'. -AC_CACHE_CHECK(whether $MIG supports the retcode keyword, hurd_cv_mig_retcode, -[cat > conftest.defs <<\EOF -#include -#include -subsystem foobar 1000; -type reply_port_t = polymorphic | MACH_MSG_TYPE_PORT_SEND_ONCE - ctype: mach_port_t; -simpleroutine foobar_reply ( - reply_port: reply_port_t; - err: kern_return_t, RetCode); -EOF -if AC_TRY_COMMAND([CC="${CC}" ${MIG-false} -n conftest.defs 1>&AS_MESSAGE_LOG_FD]); then - hurd_cv_mig_retcode=yes -else - hurd_cv_mig_retcode=no -fi -rm -f conftest*]) -if test $hurd_cv_mig_retcode = yes; then - AC_DEFINE(HAVE_MIG_RETCODE) -fi]) - -hurd_MIG_RETCODE diff --git a/sysdeps/mach/hurd/configure b/sysdeps/mach/hurd/configure index 84948a549c..a0f97217e9 100644 --- a/sysdeps/mach/hurd/configure +++ b/sysdeps/mach/hurd/configure @@ -1,4 +1,4 @@ -# This file is generated from configure.in by Autoconf. DO NOT EDIT! +# This file is generated from configure.ac by Autoconf. DO NOT EDIT! $as_echo "#define NO_HIDDEN 1" >>confdefs.h diff --git a/sysdeps/mach/hurd/configure.ac b/sysdeps/mach/hurd/configure.ac new file mode 100644 index 0000000000..ad915a568b --- /dev/null +++ b/sysdeps/mach/hurd/configure.ac @@ -0,0 +1,31 @@ +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. + +dnl We need this setting because of the need for PLT calls in ld.so. +AC_DEFINE([NO_HIDDEN]) + +# Don't bother trying to generate any glue code to be compatible with the +# existing system library, because we are the only system library. +inhibit_glue=yes + +case "$machine" in + i386*) + # The default oldest ABI is 2.2.6. + # We only need a "yes" here if the oldest ABI supported will be < 2.2.6. + if test "$oldest_abi" != default && test "$oldest_abi" \< "2.2.6"; then + libc_cv_gcc_unwind_find_fde=yes + fi + ;; +esac + +AC_CACHE_CHECK(Hurd header version, libc_cv_hurd_version, [dnl +AC_TRY_COMPILE(dnl +[#include ], [ +#define NEED_VERSION 20020609 +#if HURD_INTERFACE_VERSION < NEED_VERSION +# error Hurd version too old: HURD_INTERFACE_VERSION < NEED_VERSION +#endif], + libc_cv_hurd_version=ok, + libc_cv_hurd_version=bad)]) +if test "x$libc_cv_hurd_version" != xok; then + AC_MSG_ERROR(Hurd headers not installed or too old) +fi diff --git a/sysdeps/mach/hurd/configure.in b/sysdeps/mach/hurd/configure.in deleted file mode 100644 index ad915a568b..0000000000 --- a/sysdeps/mach/hurd/configure.in +++ /dev/null @@ -1,31 +0,0 @@ -GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. - -dnl We need this setting because of the need for PLT calls in ld.so. -AC_DEFINE([NO_HIDDEN]) - -# Don't bother trying to generate any glue code to be compatible with the -# existing system library, because we are the only system library. -inhibit_glue=yes - -case "$machine" in - i386*) - # The default oldest ABI is 2.2.6. - # We only need a "yes" here if the oldest ABI supported will be < 2.2.6. - if test "$oldest_abi" != default && test "$oldest_abi" \< "2.2.6"; then - libc_cv_gcc_unwind_find_fde=yes - fi - ;; -esac - -AC_CACHE_CHECK(Hurd header version, libc_cv_hurd_version, [dnl -AC_TRY_COMPILE(dnl -[#include ], [ -#define NEED_VERSION 20020609 -#if HURD_INTERFACE_VERSION < NEED_VERSION -# error Hurd version too old: HURD_INTERFACE_VERSION < NEED_VERSION -#endif], - libc_cv_hurd_version=ok, - libc_cv_hurd_version=bad)]) -if test "x$libc_cv_hurd_version" != xok; then - AC_MSG_ERROR(Hurd headers not installed or too old) -fi diff --git a/sysdeps/powerpc/configure b/sysdeps/powerpc/configure index 4afbc29ab3..fccee659a0 100644 --- a/sysdeps/powerpc/configure +++ b/sysdeps/powerpc/configure @@ -1,4 +1,4 @@ -# This file is generated from configure.in by Autoconf. DO NOT EDIT! +# This file is generated from configure.ac by Autoconf. DO NOT EDIT! # Local configure fragment for sysdeps/powerpc. # Accept binutils which knows about ".machine". diff --git a/sysdeps/powerpc/configure.ac b/sysdeps/powerpc/configure.ac new file mode 100644 index 0000000000..28cc85934d --- /dev/null +++ b/sysdeps/powerpc/configure.ac @@ -0,0 +1,21 @@ +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. +# Local configure fragment for sysdeps/powerpc. + +# Accept binutils which knows about ".machine". +AC_CACHE_CHECK(for .machine support, libc_cv_ppc_machine, [dnl +cat > conftest.s <<\EOF + .machine "altivec" + blr +EOF +if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then + libc_cv_ppc_machine=yes +else + libc_cv_ppc_machine=no +fi +rm -f conftest*]) +if test $libc_cv_ppc_machine != yes; then + AC_MSG_ERROR([ +*** A binutils version which can handle +*** .machine "altivec" +*** is needed.]) +fi diff --git a/sysdeps/powerpc/configure.in b/sysdeps/powerpc/configure.in deleted file mode 100644 index 28cc85934d..0000000000 --- a/sysdeps/powerpc/configure.in +++ /dev/null @@ -1,21 +0,0 @@ -GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. -# Local configure fragment for sysdeps/powerpc. - -# Accept binutils which knows about ".machine". -AC_CACHE_CHECK(for .machine support, libc_cv_ppc_machine, [dnl -cat > conftest.s <<\EOF - .machine "altivec" - blr -EOF -if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then - libc_cv_ppc_machine=yes -else - libc_cv_ppc_machine=no -fi -rm -f conftest*]) -if test $libc_cv_ppc_machine != yes; then - AC_MSG_ERROR([ -*** A binutils version which can handle -*** .machine "altivec" -*** is needed.]) -fi diff --git a/sysdeps/powerpc/powerpc32/configure b/sysdeps/powerpc/powerpc32/configure index 31c571d9ab..fe5a792348 100644 --- a/sysdeps/powerpc/powerpc32/configure +++ b/sysdeps/powerpc/powerpc32/configure @@ -1,4 +1,4 @@ -# This file is generated from configure.in by Autoconf. DO NOT EDIT! +# This file is generated from configure.ac by Autoconf. DO NOT EDIT! # Local configure fragment for sysdeps/powerpc/powerpc32. # See whether gas has R_PPC_REL16 relocs. diff --git a/sysdeps/powerpc/powerpc32/configure.ac b/sysdeps/powerpc/powerpc32/configure.ac new file mode 100644 index 0000000000..21d3f5ee5b --- /dev/null +++ b/sysdeps/powerpc/powerpc32/configure.ac @@ -0,0 +1,32 @@ +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. +# Local configure fragment for sysdeps/powerpc/powerpc32. + +# See whether gas has R_PPC_REL16 relocs. +AC_CACHE_CHECK(for R_PPC_REL16 gas support, libc_cv_ppc_rel16, [dnl +cat > conftest.s <<\EOF + .text + addis 11,30,_GLOBAL_OFFSET_TABLE_-.@ha +EOF +if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then + libc_cv_ppc_rel16=yes +else + libc_cv_ppc_rel16=no +fi +rm -f conftest*]) +if test $libc_cv_ppc_rel16 = no; then + AC_MSG_ERROR(R_PPC_REL16 is not supported. Binutils is too old.) +fi + +# See whether GCC uses -msecure-plt. +AC_CACHE_CHECK(for -msecure-plt by default, libc_cv_ppc_secure_plt, [dnl +echo 'int foo (void) { extern int bar; return bar; }' > conftest.c +libc_cv_ppc_secure_plt=no +if AC_TRY_COMMAND(${CC-cc} -S $CFLAGS conftest.c -fpic -o conftest.s 1>&AS_MESSAGE_LOG_FD); then + if grep '_GLOBAL_OFFSET_TABLE_-.*@ha' conftest.s > /dev/null 2>&1; then + libc_cv_ppc_secure_plt=yes + fi +fi +rm -rf conftest*]) +if test $libc_cv_ppc_secure_plt = yes; then + AC_DEFINE(HAVE_PPC_SECURE_PLT) +fi diff --git a/sysdeps/powerpc/powerpc32/configure.in b/sysdeps/powerpc/powerpc32/configure.in deleted file mode 100644 index 21d3f5ee5b..0000000000 --- a/sysdeps/powerpc/powerpc32/configure.in +++ /dev/null @@ -1,32 +0,0 @@ -GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. -# Local configure fragment for sysdeps/powerpc/powerpc32. - -# See whether gas has R_PPC_REL16 relocs. -AC_CACHE_CHECK(for R_PPC_REL16 gas support, libc_cv_ppc_rel16, [dnl -cat > conftest.s <<\EOF - .text - addis 11,30,_GLOBAL_OFFSET_TABLE_-.@ha -EOF -if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then - libc_cv_ppc_rel16=yes -else - libc_cv_ppc_rel16=no -fi -rm -f conftest*]) -if test $libc_cv_ppc_rel16 = no; then - AC_MSG_ERROR(R_PPC_REL16 is not supported. Binutils is too old.) -fi - -# See whether GCC uses -msecure-plt. -AC_CACHE_CHECK(for -msecure-plt by default, libc_cv_ppc_secure_plt, [dnl -echo 'int foo (void) { extern int bar; return bar; }' > conftest.c -libc_cv_ppc_secure_plt=no -if AC_TRY_COMMAND(${CC-cc} -S $CFLAGS conftest.c -fpic -o conftest.s 1>&AS_MESSAGE_LOG_FD); then - if grep '_GLOBAL_OFFSET_TABLE_-.*@ha' conftest.s > /dev/null 2>&1; then - libc_cv_ppc_secure_plt=yes - fi -fi -rm -rf conftest*]) -if test $libc_cv_ppc_secure_plt = yes; then - AC_DEFINE(HAVE_PPC_SECURE_PLT) -fi diff --git a/sysdeps/powerpc/powerpc64/configure b/sysdeps/powerpc/powerpc64/configure index 5ddac55922..92ec607e01 100644 --- a/sysdeps/powerpc/powerpc64/configure +++ b/sysdeps/powerpc/powerpc64/configure @@ -1,4 +1,4 @@ -# This file is generated from configure.in by Autoconf. DO NOT EDIT! +# This file is generated from configure.ac by Autoconf. DO NOT EDIT! # Local configure fragment for sysdeps/powerpc/powerpc64. # The Aix ld uses global .symbol_names instead of symbol_names diff --git a/sysdeps/powerpc/powerpc64/configure.ac b/sysdeps/powerpc/powerpc64/configure.ac new file mode 100644 index 0000000000..67aac663d8 --- /dev/null +++ b/sysdeps/powerpc/powerpc64/configure.ac @@ -0,0 +1,42 @@ +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. +# Local configure fragment for sysdeps/powerpc/powerpc64. + +# The Aix ld uses global .symbol_names instead of symbol_names +# and unfortunately early Linux PPC64 linkers use it as well. +AC_CACHE_CHECK(for support for omitting dot symbols, +libc_cv_omit_dot_syms, [dnl +libc_cv_omit_dot_syms=no +echo 'void foo (void) {}' > conftest.c +if AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS -S conftest.c -o conftest.s 1>&AS_MESSAGE_LOG_FD); then + if grep -w '\.foo' conftest.s > /dev/null; then + : + else + libc_cv_omit_dot_syms=yes + fi +fi +rm -f conftest.c conftest.s +]) +if test x$libc_cv_omit_dot_syms != xyes; then + AC_DEFINE(HAVE_ASM_GLOBAL_DOT_NAME) +fi + +AC_CACHE_CHECK(for linker support for overlapping .opd entries, +libc_cv_overlapping_opd, [dnl +libc_cv_overlapping_opd=no +echo 'void foo (void) {}' > conftest.c +if AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS -S conftest.c -o conftest.s 1>&AS_MESSAGE_LOG_FD); then +changequote(,)dnl + if grep '\.TOC\.@tocbase' conftest.s > /dev/null; then + if grep '\.TOC\.@tocbase[ ]*,[ ]*0' conftest.s > /dev/null; then + : + else + libc_cv_overlapping_opd=yes + fi + fi +changequote([,])dnl +fi +rm -f conftest.c conftest.s +]) +if test x$libc_cv_overlapping_opd = xyes; then + AC_DEFINE(USE_PPC64_OVERLAPPING_OPD) +fi diff --git a/sysdeps/powerpc/powerpc64/configure.in b/sysdeps/powerpc/powerpc64/configure.in deleted file mode 100644 index 67aac663d8..0000000000 --- a/sysdeps/powerpc/powerpc64/configure.in +++ /dev/null @@ -1,42 +0,0 @@ -GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. -# Local configure fragment for sysdeps/powerpc/powerpc64. - -# The Aix ld uses global .symbol_names instead of symbol_names -# and unfortunately early Linux PPC64 linkers use it as well. -AC_CACHE_CHECK(for support for omitting dot symbols, -libc_cv_omit_dot_syms, [dnl -libc_cv_omit_dot_syms=no -echo 'void foo (void) {}' > conftest.c -if AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS -S conftest.c -o conftest.s 1>&AS_MESSAGE_LOG_FD); then - if grep -w '\.foo' conftest.s > /dev/null; then - : - else - libc_cv_omit_dot_syms=yes - fi -fi -rm -f conftest.c conftest.s -]) -if test x$libc_cv_omit_dot_syms != xyes; then - AC_DEFINE(HAVE_ASM_GLOBAL_DOT_NAME) -fi - -AC_CACHE_CHECK(for linker support for overlapping .opd entries, -libc_cv_overlapping_opd, [dnl -libc_cv_overlapping_opd=no -echo 'void foo (void) {}' > conftest.c -if AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS -S conftest.c -o conftest.s 1>&AS_MESSAGE_LOG_FD); then -changequote(,)dnl - if grep '\.TOC\.@tocbase' conftest.s > /dev/null; then - if grep '\.TOC\.@tocbase[ ]*,[ ]*0' conftest.s > /dev/null; then - : - else - libc_cv_overlapping_opd=yes - fi - fi -changequote([,])dnl -fi -rm -f conftest.c conftest.s -]) -if test x$libc_cv_overlapping_opd = xyes; then - AC_DEFINE(USE_PPC64_OVERLAPPING_OPD) -fi diff --git a/sysdeps/s390/s390-32/configure b/sysdeps/s390/s390-32/configure index 669bb9be5c..024565f85a 100644 --- a/sysdeps/s390/s390-32/configure +++ b/sysdeps/s390/s390-32/configure @@ -1,4 +1,4 @@ -# This file is generated from configure.in by Autoconf. DO NOT EDIT! +# This file is generated from configure.ac by Autoconf. DO NOT EDIT! # Local configure fragment for sysdeps/s390. $as_echo "#define PI_STATIC_AND_HIDDEN 1" >>confdefs.h diff --git a/sysdeps/s390/s390-32/configure.ac b/sysdeps/s390/s390-32/configure.ac new file mode 100644 index 0000000000..b5af4e12fc --- /dev/null +++ b/sysdeps/s390/s390-32/configure.ac @@ -0,0 +1,6 @@ +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. +# Local configure fragment for sysdeps/s390. + +dnl It is always possible to access static and hidden symbols in an +dnl position independent way. +AC_DEFINE(PI_STATIC_AND_HIDDEN) diff --git a/sysdeps/s390/s390-32/configure.in b/sysdeps/s390/s390-32/configure.in deleted file mode 100644 index b5af4e12fc..0000000000 --- a/sysdeps/s390/s390-32/configure.in +++ /dev/null @@ -1,6 +0,0 @@ -GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. -# Local configure fragment for sysdeps/s390. - -dnl It is always possible to access static and hidden symbols in an -dnl position independent way. -AC_DEFINE(PI_STATIC_AND_HIDDEN) diff --git a/sysdeps/s390/s390-64/configure b/sysdeps/s390/s390-64/configure index 669bb9be5c..024565f85a 100644 --- a/sysdeps/s390/s390-64/configure +++ b/sysdeps/s390/s390-64/configure @@ -1,4 +1,4 @@ -# This file is generated from configure.in by Autoconf. DO NOT EDIT! +# This file is generated from configure.ac by Autoconf. DO NOT EDIT! # Local configure fragment for sysdeps/s390. $as_echo "#define PI_STATIC_AND_HIDDEN 1" >>confdefs.h diff --git a/sysdeps/s390/s390-64/configure.ac b/sysdeps/s390/s390-64/configure.ac new file mode 100644 index 0000000000..b5af4e12fc --- /dev/null +++ b/sysdeps/s390/s390-64/configure.ac @@ -0,0 +1,6 @@ +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. +# Local configure fragment for sysdeps/s390. + +dnl It is always possible to access static and hidden symbols in an +dnl position independent way. +AC_DEFINE(PI_STATIC_AND_HIDDEN) diff --git a/sysdeps/s390/s390-64/configure.in b/sysdeps/s390/s390-64/configure.in deleted file mode 100644 index b5af4e12fc..0000000000 --- a/sysdeps/s390/s390-64/configure.in +++ /dev/null @@ -1,6 +0,0 @@ -GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. -# Local configure fragment for sysdeps/s390. - -dnl It is always possible to access static and hidden symbols in an -dnl position independent way. -AC_DEFINE(PI_STATIC_AND_HIDDEN) diff --git a/sysdeps/sh/configure b/sysdeps/sh/configure index b0f3b2fa24..110eb65b06 100644 --- a/sysdeps/sh/configure +++ b/sysdeps/sh/configure @@ -1,4 +1,4 @@ -# This file is generated from configure.in by Autoconf. DO NOT EDIT! +# This file is generated from configure.ac by Autoconf. DO NOT EDIT! # Local configure fragment for sysdeps/sh. $as_echo "#define PI_STATIC_AND_HIDDEN 1" >>confdefs.h diff --git a/sysdeps/sh/configure.ac b/sysdeps/sh/configure.ac new file mode 100644 index 0000000000..21400c447d --- /dev/null +++ b/sysdeps/sh/configure.ac @@ -0,0 +1,6 @@ +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. +# Local configure fragment for sysdeps/sh. + +dnl It is always possible to access static and hidden symbols in an +dnl position independent way. +AC_DEFINE(PI_STATIC_AND_HIDDEN) diff --git a/sysdeps/sh/configure.in b/sysdeps/sh/configure.in deleted file mode 100644 index 21400c447d..0000000000 --- a/sysdeps/sh/configure.in +++ /dev/null @@ -1,6 +0,0 @@ -GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. -# Local configure fragment for sysdeps/sh. - -dnl It is always possible to access static and hidden symbols in an -dnl position independent way. -AC_DEFINE(PI_STATIC_AND_HIDDEN) diff --git a/sysdeps/sparc/configure b/sysdeps/sparc/configure index 63e02de4a6..90a86f6da3 100644 --- a/sysdeps/sparc/configure +++ b/sysdeps/sparc/configure @@ -1,4 +1,4 @@ -# This file is generated from configure.in by Autoconf. DO NOT EDIT! +# This file is generated from configure.ac by Autoconf. DO NOT EDIT! # Local configure fragment for sysdeps/sparc. # Check for support of VIS3 et al. instructions in the assembler. diff --git a/sysdeps/sparc/configure.ac b/sysdeps/sparc/configure.ac new file mode 100644 index 0000000000..982077c9b9 --- /dev/null +++ b/sysdeps/sparc/configure.ac @@ -0,0 +1,59 @@ +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. +# Local configure fragment for sysdeps/sparc. + +# Check for support of VIS3 et al. instructions in the assembler. +AC_CACHE_CHECK(for sparc assembler VIS3 support, libc_cv_sparc_as_vis3, [dnl +cat > conftest.S <<\EOF + .text +foo: fmadds %f1, %f2, %f3, %f5 + fmaddd %f2, %f4, %f8, %f10 + fhadds %f2, %f3, %f5 + fhaddd %f4, %f8, %f10 + pdistn %f2, %f4, %g1 + movdtox %f10, %o0 + movstouw %f9, %o1 + movstosw %f7, %o2 + movxtod %o3, %f18 + movwtos %o4, %f15 + flcmps %fcc0, %f3, %f5 + flcmpd %fcc1, %f4, %f6 +EOF +dnl +if AC_TRY_COMMAND([${CC-cc} -c $CFLAGS -Wa,-Av9d conftest.S]); then + libc_cv_sparc_as_vis3=yes +else + libc_cv_sparc_as_vis3=no +fi +rm -f conftest*]) +if test $libc_cv_sparc_as_vis3 = yes; then + AC_DEFINE(HAVE_AS_VIS3_SUPPORT) +fi +LIBC_CONFIG_VAR([have-as-vis3], [$libc_cv_sparc_as_vis3]) + +# Check for a GCC emitting GOTDATA relocations. +AC_CACHE_CHECK(for sparc gcc GOTDATA reloc support, libc_cv_sparc_gcc_gotdata, [dnl +changequote(,)dnl +cat > conftest.c <<\EOF +int data; +int foo(void) +{ + return data; +} +EOF +changequote([,])dnl +dnl +libc_cv_sparc_gcc_gotdata=no +if AC_TRY_COMMAND(${CC-cc} -S $CFLAGS -O2 -fPIC conftest.c 1>&AS_MESSAGE_LOG_FD); then + if grep -q 'gdop_hix22' conftest.s \ + && grep -q 'gdop_lox10' conftest.s; then + libc_cv_sparc_gcc_gotdata=yes + fi +fi +rm -f conftest*]) +if test $libc_cv_sparc_gcc_gotdata = yes; then + AC_DEFINE(HAVE_GCC_GOTDATA) +fi + +if test $libc_cv_sparc_gcc_gotdata = yes; then + AC_DEFINE(PI_STATIC_AND_HIDDEN) +fi diff --git a/sysdeps/sparc/configure.in b/sysdeps/sparc/configure.in deleted file mode 100644 index 982077c9b9..0000000000 --- a/sysdeps/sparc/configure.in +++ /dev/null @@ -1,59 +0,0 @@ -GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. -# Local configure fragment for sysdeps/sparc. - -# Check for support of VIS3 et al. instructions in the assembler. -AC_CACHE_CHECK(for sparc assembler VIS3 support, libc_cv_sparc_as_vis3, [dnl -cat > conftest.S <<\EOF - .text -foo: fmadds %f1, %f2, %f3, %f5 - fmaddd %f2, %f4, %f8, %f10 - fhadds %f2, %f3, %f5 - fhaddd %f4, %f8, %f10 - pdistn %f2, %f4, %g1 - movdtox %f10, %o0 - movstouw %f9, %o1 - movstosw %f7, %o2 - movxtod %o3, %f18 - movwtos %o4, %f15 - flcmps %fcc0, %f3, %f5 - flcmpd %fcc1, %f4, %f6 -EOF -dnl -if AC_TRY_COMMAND([${CC-cc} -c $CFLAGS -Wa,-Av9d conftest.S]); then - libc_cv_sparc_as_vis3=yes -else - libc_cv_sparc_as_vis3=no -fi -rm -f conftest*]) -if test $libc_cv_sparc_as_vis3 = yes; then - AC_DEFINE(HAVE_AS_VIS3_SUPPORT) -fi -LIBC_CONFIG_VAR([have-as-vis3], [$libc_cv_sparc_as_vis3]) - -# Check for a GCC emitting GOTDATA relocations. -AC_CACHE_CHECK(for sparc gcc GOTDATA reloc support, libc_cv_sparc_gcc_gotdata, [dnl -changequote(,)dnl -cat > conftest.c <<\EOF -int data; -int foo(void) -{ - return data; -} -EOF -changequote([,])dnl -dnl -libc_cv_sparc_gcc_gotdata=no -if AC_TRY_COMMAND(${CC-cc} -S $CFLAGS -O2 -fPIC conftest.c 1>&AS_MESSAGE_LOG_FD); then - if grep -q 'gdop_hix22' conftest.s \ - && grep -q 'gdop_lox10' conftest.s; then - libc_cv_sparc_gcc_gotdata=yes - fi -fi -rm -f conftest*]) -if test $libc_cv_sparc_gcc_gotdata = yes; then - AC_DEFINE(HAVE_GCC_GOTDATA) -fi - -if test $libc_cv_sparc_gcc_gotdata = yes; then - AC_DEFINE(PI_STATIC_AND_HIDDEN) -fi diff --git a/sysdeps/unix/sysv/linux/configure b/sysdeps/unix/sysv/linux/configure index 88fab5662a..84dfbb87df 100644 --- a/sysdeps/unix/sysv/linux/configure +++ b/sysdeps/unix/sysv/linux/configure @@ -1,4 +1,4 @@ -# This file is generated from configure.in by Autoconf. DO NOT EDIT! +# This file is generated from configure.ac by Autoconf. DO NOT EDIT! # Local configure fragment for sysdeps/unix/sysv/linux. # Don't bother trying to generate any glue code to be compatible with the diff --git a/sysdeps/unix/sysv/linux/configure.ac b/sysdeps/unix/sysv/linux/configure.ac new file mode 100644 index 0000000000..5e5902d8ef --- /dev/null +++ b/sysdeps/unix/sysv/linux/configure.ac @@ -0,0 +1,215 @@ +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. +# Local configure fragment for sysdeps/unix/sysv/linux. + +# Don't bother trying to generate any glue code to be compatible with the +# existing system library, because we are the only system library. +inhibit_glue=yes + +define([LIBC_LINUX_VERSION],[2.6.19])dnl +if test -n "$sysheaders"; then + OLD_CPPFLAGS=$CPPFLAGS + CPPFLAGS="$CPPFLAGS $SYSINCLUDES" +fi +define([libc_cv_linuxVER], [libc_cv_linux]patsubst(LIBC_LINUX_VERSION,[\.]))dnl +AC_CACHE_CHECK(installed Linux kernel header files, libc_cv_linuxVER, [dnl +AC_EGREP_CPP([eat flaming death], [#include +#if !defined LINUX_VERSION_CODE || LINUX_VERSION_CODE < ]dnl +patsubst(LIBC_LINUX_VERSION,[^\([^.]*\)\.\([^.]*\)\.\([^.]*\)$],dnl +[ (\1 *65536+ \2 *256+ \3) /* \1.\2.\3 */])[ +eat flaming death +#endif], + libc_cv_linuxVER='TOO OLD!', + libc_cv_linuxVER='LIBC_LINUX_VERSION or later')]) +if test "$libc_cv_linuxVER" != 'LIBC_LINUX_VERSION or later'; then + AC_MSG_ERROR([GNU libc requires kernel header files from +Linux LIBC_LINUX_VERSION or later to be installed before configuring. +The kernel header files are found usually in /usr/include/asm and +/usr/include/linux; make sure these directories use files from +Linux LIBC_LINUX_VERSION or later. This check uses , so +make sure that file was built correctly when installing the kernel header +files. To use kernel headers not from /usr/include/linux, use the +configure option --with-headers.]) +fi + +# If the user gave a minimal version number test whether the available +# kernel headers are young enough. Additionally we have minimal +# kernel versions for some architectures. If a previous configure fragment +# set arch_minimum_kernel already, let that override our defaults here. +# Note that we presume such a fragment has set libc_cv_gcc_unwind_find_fde +# if appropriate too. +test -n "$arch_minimum_kernel" || +case "$machine" in + i386*) + libc_cv_gcc_unwind_find_fde=yes + arch_minimum_kernel=2.6.16 + ;; + powerpc/powerpc32*) + libc_cv_gcc_unwind_find_fde=yes + arch_minimum_kernel=2.6.16 + ;; + s390/s390-32) + libc_cv_gcc_unwind_find_fde=yes + arch_minimum_kernel=2.6.16 + ;; + s390/s390-64) + libc_cv_gcc_unwind_find_fde=yes + arch_minimum_kernel=2.6.16 + ;; + sh*) + arch_minimum_kernel=2.6.16 + libc_cv_gcc_unwind_find_fde=yes + ;; + sparc/sparc64*) + libc_cv_gcc_unwind_find_fde=yes + arch_minimum_kernel=2.6.16 + ;; + sparc*) + libc_cv_gcc_unwind_find_fde=yes + arch_minimum_kernel=2.6.16 + ;; + *) + arch_minimum_kernel=2.6.16 + ;; +esac +if test -n "$minimum_kernel"; then + changequote(,) + user_version=$((`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1 \* 65536 + \2 \* 256 + \3/'`)) + arch_version=$((`echo "$arch_minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1 \* 65536 + \2 \* 256 + \3/'`)) + changequote([,]) + if test $user_version -lt $arch_version; then + AC_MSG_WARN([minimum kernel version reset to $arch_minimum_kernel]) + minimum_kernel=$arch_minimum_kernel + fi +else + minimum_kernel=$arch_minimum_kernel +fi + +AC_MSG_CHECKING(for kernel header at least $minimum_kernel) +changequote(,)dnl +decnum=`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/(\1 * 65536 + \2 * 256 + \3)/'`; +abinum=`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1,\2,\3/'`; +changequote([,])dnl +AC_EGREP_CPP([eat flaming death], [#include +#if LINUX_VERSION_CODE < $decnum +eat flaming death +#endif], libc_minimum_kernel='too old!', libc_minimum_kernel=ok) +AC_MSG_RESULT($libc_minimum_kernel) +if test "$libc_minimum_kernel" = ok; then + AC_DEFINE_UNQUOTED(__LINUX_KERNEL_VERSION, $decnum) + AC_DEFINE_UNQUOTED(__ABI_TAG_VERSION, $abinum) +else + AC_MSG_ERROR([*** The available kernel headers are older than the requested +*** compatible kernel version]) +fi + +# The result of the above test for the use of the FDE code is invalid if +# the user overrides the decision about the minimum ABI. +if test "$oldest_abi" != default && test "2.2.4" \< "$oldest_abi"; then + libc_cv_gcc_unwind_find_fde=no +fi + +if test -n "$sysheaders"; then + CPPFLAGS=$OLD_CPPFLAGS +fi + +# Under Linux the NPTL add-on should be available. +case $add_ons in + # It is available. Good. + *nptl*) + nptl_missing= + ;; + *) + nptl_missing=yes + ;; +esac + +if test "$nptl_missing"; then + if test $enable_sanity = yes; then + echo "\ +*** On GNU/Linux systems it is normal to compile GNU libc with the +*** \`nptl' add-on. Without that, the library will be +*** incompatible with normal GNU/Linux systems. +*** If you really mean to not use this add-on, run configure again +*** using the extra parameter \`--disable-sanity-checks'." + exit 1 + else + echo "\ +*** WARNING: Are you sure you do not want to use the \`nptl' +*** add-on?" + fi +fi + +if test "$prefix" = "/usr/local" -o "$prefix" = "/usr/local/" -o "$prefix" = "NONE"; then + if test $enable_sanity = yes; then + echo "\ +*** On GNU/Linux systems the GNU C Library should not be installed into +*** /usr/local since this might make your system totally unusable. +*** We strongly advise to use a different prefix. For details read the FAQ. +*** If you really mean to do this, run configure again using the extra +*** parameter \`--disable-sanity-checks'." + exit 1 + else + echo "\ +*** WARNING: Do you really want to install the GNU C Library into /usr/local? +*** This might make your system totally unusable, for details read the FAQ." + fi +fi + + +# One Linux we use ldconfig. +use_ldconfig=yes + +# We need some extensions to the `ldd' script. +changequote(,) +case "$machine" in + i[3456]86*) + ldd_rewrite_script=sysdeps/unix/sysv/linux/ldd-rewrite.sed + ;; + s390*) + ldd_rewrite_script=sysdeps/unix/sysv/linux/s390/ldd-rewrite.sed + ;; + sparc*) + ldd_rewrite_script=sysdeps/unix/sysv/linux/sparc/ldd-rewrite.sed + ;; + x86_64*) + ldd_rewrite_script=sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed + ;; + powerpc*) + ldd_rewrite_script=sysdeps/unix/sysv/linux/powerpc/ldd-rewrite.sed + ;; + *) + ;; +esac +changequote([,]) + +if test $host = $build; then + # If $prefix/include/{net,scsi} are symlinks, make install will + # clobber what they're linked to (probably a kernel tree). + # test -L ought to work on all Linux boxes. + if test "x$prefix" != xNONE; then + ac_prefix=$prefix + else + ac_prefix=$ac_default_prefix + fi + AC_MSG_CHECKING([for symlinks in ${ac_prefix}/include]) + ac_message= + if test -L ${ac_prefix}/include/net; then + ac_message="$ac_message + ${ac_prefix}/include/net is a symlink" + fi + if test -L ${ac_prefix}/include/scsi; then + ac_message="$ac_message + ${ac_prefix}/include/scsi is a symlink" + fi + if test -n "$ac_message"; then + AC_MSG_ERROR([$ac_message +\`make install' will destroy the target of the link(s). +Delete the links and re-run configure, or better still, move the entire +${ac_prefix}/include directory out of the way.]) + else + AC_MSG_RESULT(ok) + fi +fi + +# We have inlined syscalls. +AC_DEFINE(HAVE_INLINED_SYSCALLS) diff --git a/sysdeps/unix/sysv/linux/configure.in b/sysdeps/unix/sysv/linux/configure.in deleted file mode 100644 index 5e5902d8ef..0000000000 --- a/sysdeps/unix/sysv/linux/configure.in +++ /dev/null @@ -1,215 +0,0 @@ -GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. -# Local configure fragment for sysdeps/unix/sysv/linux. - -# Don't bother trying to generate any glue code to be compatible with the -# existing system library, because we are the only system library. -inhibit_glue=yes - -define([LIBC_LINUX_VERSION],[2.6.19])dnl -if test -n "$sysheaders"; then - OLD_CPPFLAGS=$CPPFLAGS - CPPFLAGS="$CPPFLAGS $SYSINCLUDES" -fi -define([libc_cv_linuxVER], [libc_cv_linux]patsubst(LIBC_LINUX_VERSION,[\.]))dnl -AC_CACHE_CHECK(installed Linux kernel header files, libc_cv_linuxVER, [dnl -AC_EGREP_CPP([eat flaming death], [#include -#if !defined LINUX_VERSION_CODE || LINUX_VERSION_CODE < ]dnl -patsubst(LIBC_LINUX_VERSION,[^\([^.]*\)\.\([^.]*\)\.\([^.]*\)$],dnl -[ (\1 *65536+ \2 *256+ \3) /* \1.\2.\3 */])[ -eat flaming death -#endif], - libc_cv_linuxVER='TOO OLD!', - libc_cv_linuxVER='LIBC_LINUX_VERSION or later')]) -if test "$libc_cv_linuxVER" != 'LIBC_LINUX_VERSION or later'; then - AC_MSG_ERROR([GNU libc requires kernel header files from -Linux LIBC_LINUX_VERSION or later to be installed before configuring. -The kernel header files are found usually in /usr/include/asm and -/usr/include/linux; make sure these directories use files from -Linux LIBC_LINUX_VERSION or later. This check uses , so -make sure that file was built correctly when installing the kernel header -files. To use kernel headers not from /usr/include/linux, use the -configure option --with-headers.]) -fi - -# If the user gave a minimal version number test whether the available -# kernel headers are young enough. Additionally we have minimal -# kernel versions for some architectures. If a previous configure fragment -# set arch_minimum_kernel already, let that override our defaults here. -# Note that we presume such a fragment has set libc_cv_gcc_unwind_find_fde -# if appropriate too. -test -n "$arch_minimum_kernel" || -case "$machine" in - i386*) - libc_cv_gcc_unwind_find_fde=yes - arch_minimum_kernel=2.6.16 - ;; - powerpc/powerpc32*) - libc_cv_gcc_unwind_find_fde=yes - arch_minimum_kernel=2.6.16 - ;; - s390/s390-32) - libc_cv_gcc_unwind_find_fde=yes - arch_minimum_kernel=2.6.16 - ;; - s390/s390-64) - libc_cv_gcc_unwind_find_fde=yes - arch_minimum_kernel=2.6.16 - ;; - sh*) - arch_minimum_kernel=2.6.16 - libc_cv_gcc_unwind_find_fde=yes - ;; - sparc/sparc64*) - libc_cv_gcc_unwind_find_fde=yes - arch_minimum_kernel=2.6.16 - ;; - sparc*) - libc_cv_gcc_unwind_find_fde=yes - arch_minimum_kernel=2.6.16 - ;; - *) - arch_minimum_kernel=2.6.16 - ;; -esac -if test -n "$minimum_kernel"; then - changequote(,) - user_version=$((`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1 \* 65536 + \2 \* 256 + \3/'`)) - arch_version=$((`echo "$arch_minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1 \* 65536 + \2 \* 256 + \3/'`)) - changequote([,]) - if test $user_version -lt $arch_version; then - AC_MSG_WARN([minimum kernel version reset to $arch_minimum_kernel]) - minimum_kernel=$arch_minimum_kernel - fi -else - minimum_kernel=$arch_minimum_kernel -fi - -AC_MSG_CHECKING(for kernel header at least $minimum_kernel) -changequote(,)dnl -decnum=`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/(\1 * 65536 + \2 * 256 + \3)/'`; -abinum=`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1,\2,\3/'`; -changequote([,])dnl -AC_EGREP_CPP([eat flaming death], [#include -#if LINUX_VERSION_CODE < $decnum -eat flaming death -#endif], libc_minimum_kernel='too old!', libc_minimum_kernel=ok) -AC_MSG_RESULT($libc_minimum_kernel) -if test "$libc_minimum_kernel" = ok; then - AC_DEFINE_UNQUOTED(__LINUX_KERNEL_VERSION, $decnum) - AC_DEFINE_UNQUOTED(__ABI_TAG_VERSION, $abinum) -else - AC_MSG_ERROR([*** The available kernel headers are older than the requested -*** compatible kernel version]) -fi - -# The result of the above test for the use of the FDE code is invalid if -# the user overrides the decision about the minimum ABI. -if test "$oldest_abi" != default && test "2.2.4" \< "$oldest_abi"; then - libc_cv_gcc_unwind_find_fde=no -fi - -if test -n "$sysheaders"; then - CPPFLAGS=$OLD_CPPFLAGS -fi - -# Under Linux the NPTL add-on should be available. -case $add_ons in - # It is available. Good. - *nptl*) - nptl_missing= - ;; - *) - nptl_missing=yes - ;; -esac - -if test "$nptl_missing"; then - if test $enable_sanity = yes; then - echo "\ -*** On GNU/Linux systems it is normal to compile GNU libc with the -*** \`nptl' add-on. Without that, the library will be -*** incompatible with normal GNU/Linux systems. -*** If you really mean to not use this add-on, run configure again -*** using the extra parameter \`--disable-sanity-checks'." - exit 1 - else - echo "\ -*** WARNING: Are you sure you do not want to use the \`nptl' -*** add-on?" - fi -fi - -if test "$prefix" = "/usr/local" -o "$prefix" = "/usr/local/" -o "$prefix" = "NONE"; then - if test $enable_sanity = yes; then - echo "\ -*** On GNU/Linux systems the GNU C Library should not be installed into -*** /usr/local since this might make your system totally unusable. -*** We strongly advise to use a different prefix. For details read the FAQ. -*** If you really mean to do this, run configure again using the extra -*** parameter \`--disable-sanity-checks'." - exit 1 - else - echo "\ -*** WARNING: Do you really want to install the GNU C Library into /usr/local? -*** This might make your system totally unusable, for details read the FAQ." - fi -fi - - -# One Linux we use ldconfig. -use_ldconfig=yes - -# We need some extensions to the `ldd' script. -changequote(,) -case "$machine" in - i[3456]86*) - ldd_rewrite_script=sysdeps/unix/sysv/linux/ldd-rewrite.sed - ;; - s390*) - ldd_rewrite_script=sysdeps/unix/sysv/linux/s390/ldd-rewrite.sed - ;; - sparc*) - ldd_rewrite_script=sysdeps/unix/sysv/linux/sparc/ldd-rewrite.sed - ;; - x86_64*) - ldd_rewrite_script=sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed - ;; - powerpc*) - ldd_rewrite_script=sysdeps/unix/sysv/linux/powerpc/ldd-rewrite.sed - ;; - *) - ;; -esac -changequote([,]) - -if test $host = $build; then - # If $prefix/include/{net,scsi} are symlinks, make install will - # clobber what they're linked to (probably a kernel tree). - # test -L ought to work on all Linux boxes. - if test "x$prefix" != xNONE; then - ac_prefix=$prefix - else - ac_prefix=$ac_default_prefix - fi - AC_MSG_CHECKING([for symlinks in ${ac_prefix}/include]) - ac_message= - if test -L ${ac_prefix}/include/net; then - ac_message="$ac_message - ${ac_prefix}/include/net is a symlink" - fi - if test -L ${ac_prefix}/include/scsi; then - ac_message="$ac_message - ${ac_prefix}/include/scsi is a symlink" - fi - if test -n "$ac_message"; then - AC_MSG_ERROR([$ac_message -\`make install' will destroy the target of the link(s). -Delete the links and re-run configure, or better still, move the entire -${ac_prefix}/include directory out of the way.]) - else - AC_MSG_RESULT(ok) - fi -fi - -# We have inlined syscalls. -AC_DEFINE(HAVE_INLINED_SYSCALLS) diff --git a/sysdeps/unix/sysv/linux/powerpc/configure b/sysdeps/unix/sysv/linux/powerpc/configure index 7df7e481f0..50e3639be5 100644 --- a/sysdeps/unix/sysv/linux/powerpc/configure +++ b/sysdeps/unix/sysv/linux/powerpc/configure @@ -1,4 +1,4 @@ -# This file is generated from configure.in by Autoconf. DO NOT EDIT! +# This file is generated from configure.ac by Autoconf. DO NOT EDIT! # Local configure fragment for sysdeps/unix/sysv/linux/powerpc/. diff --git a/sysdeps/unix/sysv/linux/powerpc/configure.ac b/sysdeps/unix/sysv/linux/powerpc/configure.ac new file mode 100644 index 0000000000..1768ab1f99 --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/configure.ac @@ -0,0 +1,37 @@ +sinclude(./aclocal.m4)dnl Autoconf lossage +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. +# Local configure fragment for sysdeps/unix/sysv/linux/powerpc/. + +AC_CACHE_CHECK(whether $CC $CFLAGS -mlong-double-128 uses IBM extended format, + libc_cv_mlong_double_128ibm, [dnl +save_CFLAGS="$CFLAGS" +CFLAGS="$CFLAGS -mlong-double-128" +AC_TRY_COMPILE([#include ], [ +#if LDBL_MANT_DIG != 106 +# error "compiler doesn't implement IBM extended format of long double" +#endif +long double foobar (long double x) { return x; }], + libc_cv_mlong_double_128ibm=yes, + libc_cv_mlong_double_128ibm=no) +CFLAGS="$save_CFLAGS"]) + +if test "$libc_cv_mlong_double_128ibm" = no; then + AC_CACHE_CHECK(whether $CC $CFLAGS supports -mabi=ibmlongdouble, + libc_cv_mabi_ibmlongdouble, [dnl + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -mlong-double-128 -mabi=ibmlongdouble" + AC_TRY_COMPILE([#include ], [ +#if LDBL_MANT_DIG != 106 +# error "compiler doesn't implement IBM extended format of long double" +#endif +long double foobar (long double x) { return x; }], + libc_cv_mabi_ibmlongdouble=yes, + libc_cv_mabi_ibmlongdouble=no) + CFLAGS="$save_CFLAGS"]) + + if test "$libc_cv_mabi_ibmlongdouble" = yes; then + CFLAGS="$CFLAGS -mabi=ibmlongdouble" + else + AC_MSG_ERROR([this configuration requires -mlong-double-128 IBM extended format support]) + fi +fi diff --git a/sysdeps/unix/sysv/linux/powerpc/configure.in b/sysdeps/unix/sysv/linux/powerpc/configure.in deleted file mode 100644 index 1768ab1f99..0000000000 --- a/sysdeps/unix/sysv/linux/powerpc/configure.in +++ /dev/null @@ -1,37 +0,0 @@ -sinclude(./aclocal.m4)dnl Autoconf lossage -GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. -# Local configure fragment for sysdeps/unix/sysv/linux/powerpc/. - -AC_CACHE_CHECK(whether $CC $CFLAGS -mlong-double-128 uses IBM extended format, - libc_cv_mlong_double_128ibm, [dnl -save_CFLAGS="$CFLAGS" -CFLAGS="$CFLAGS -mlong-double-128" -AC_TRY_COMPILE([#include ], [ -#if LDBL_MANT_DIG != 106 -# error "compiler doesn't implement IBM extended format of long double" -#endif -long double foobar (long double x) { return x; }], - libc_cv_mlong_double_128ibm=yes, - libc_cv_mlong_double_128ibm=no) -CFLAGS="$save_CFLAGS"]) - -if test "$libc_cv_mlong_double_128ibm" = no; then - AC_CACHE_CHECK(whether $CC $CFLAGS supports -mabi=ibmlongdouble, - libc_cv_mabi_ibmlongdouble, [dnl - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -mlong-double-128 -mabi=ibmlongdouble" - AC_TRY_COMPILE([#include ], [ -#if LDBL_MANT_DIG != 106 -# error "compiler doesn't implement IBM extended format of long double" -#endif -long double foobar (long double x) { return x; }], - libc_cv_mabi_ibmlongdouble=yes, - libc_cv_mabi_ibmlongdouble=no) - CFLAGS="$save_CFLAGS"]) - - if test "$libc_cv_mabi_ibmlongdouble" = yes; then - CFLAGS="$CFLAGS -mabi=ibmlongdouble" - else - AC_MSG_ERROR([this configuration requires -mlong-double-128 IBM extended format support]) - fi -fi diff --git a/sysdeps/x86_64/configure b/sysdeps/x86_64/configure index 9232411951..5a83a53aae 100644 --- a/sysdeps/x86_64/configure +++ b/sysdeps/x86_64/configure @@ -29,7 +29,7 @@ $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile -# This file is generated from configure.in by Autoconf. DO NOT EDIT! +# This file is generated from configure.ac by Autoconf. DO NOT EDIT! # Local configure fragment for sysdeps/x86_64. diff --git a/sysdeps/x86_64/configure.ac b/sysdeps/x86_64/configure.ac new file mode 100644 index 0000000000..c682f93c3e --- /dev/null +++ b/sysdeps/x86_64/configure.ac @@ -0,0 +1,57 @@ +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. +# Local configure fragment for sysdeps/x86_64. + +AC_CHECK_HEADER([cpuid.h], , + [AC_MSG_ERROR([gcc must provide the header])], + [/* No default includes. */]) + +dnl Check if -msse4 works. +AC_CACHE_CHECK(for SSE4 support, libc_cv_cc_sse4, [dnl +LIBC_TRY_CC_OPTION([-msse4], [libc_cv_cc_sse4=yes], [libc_cv_cc_sse4=no]) +]) +if test $libc_cv_cc_sse4 = yes; then + AC_DEFINE(HAVE_SSE4_SUPPORT) +fi +LIBC_CONFIG_VAR([config-cflags-sse4], [$libc_cv_cc_sse4]) + +dnl Check if -mavx works. +AC_CACHE_CHECK(for AVX support, libc_cv_cc_avx, [dnl +LIBC_TRY_CC_OPTION([-mavx], [libc_cv_cc_avx=yes], [libc_cv_cc_avx=no]) +]) +if test $libc_cv_cc_avx = yes; then + AC_DEFINE(HAVE_AVX_SUPPORT) +fi +LIBC_CONFIG_VAR([config-cflags-avx], [$libc_cv_cc_avx]) + +dnl Check if -msse2avx works. +AC_CACHE_CHECK(for AVX encoding of SSE instructions, libc_cv_cc_sse2avx, [dnl +LIBC_TRY_CC_OPTION([-msse2avx], + [libc_cv_cc_sse2avx=yes], + [libc_cv_cc_sse2avx=no]) +]) +if test $libc_cv_cc_sse2avx = yes; then + AC_DEFINE(HAVE_SSE2AVX_SUPPORT) +fi +LIBC_CONFIG_VAR([config-cflags-sse2avx], [$libc_cv_cc_sse2avx]) + +dnl Check if -mfma4 works. +AC_CACHE_CHECK(for FMA4 support, libc_cv_cc_fma4, [dnl +LIBC_TRY_CC_OPTION([-mfma4], [libc_cv_cc_fma4=yes], [libc_cv_cc_fma4=no]) +]) +if test $libc_cv_cc_fma4 = yes; then + AC_DEFINE(HAVE_FMA4_SUPPORT) +fi +LIBC_CONFIG_VAR([have-mfma4], [$libc_cv_cc_fma4]) + +dnl Check if -mno-vzeroupper works. +AC_CACHE_CHECK(for -mno-vzeroupper support, libc_cv_cc_novzeroupper, [dnl +LIBC_TRY_CC_OPTION([-mno-vzeroupper], + [libc_cv_cc_novzeroupper=yes], + [libc_cv_cc_novzeroupper=no]) +]) +LIBC_CONFIG_VAR([config-cflags-novzeroupper], [$libc_cv_cc_novzeroupper]) + +dnl It is always possible to access static and hidden symbols in an +dnl position independent way. +AC_DEFINE(PI_STATIC_AND_HIDDEN) +# work around problem with autoconf and empty lines at the end of files diff --git a/sysdeps/x86_64/configure.in b/sysdeps/x86_64/configure.in deleted file mode 100644 index c682f93c3e..0000000000 --- a/sysdeps/x86_64/configure.in +++ /dev/null @@ -1,57 +0,0 @@ -GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. -# Local configure fragment for sysdeps/x86_64. - -AC_CHECK_HEADER([cpuid.h], , - [AC_MSG_ERROR([gcc must provide the header])], - [/* No default includes. */]) - -dnl Check if -msse4 works. -AC_CACHE_CHECK(for SSE4 support, libc_cv_cc_sse4, [dnl -LIBC_TRY_CC_OPTION([-msse4], [libc_cv_cc_sse4=yes], [libc_cv_cc_sse4=no]) -]) -if test $libc_cv_cc_sse4 = yes; then - AC_DEFINE(HAVE_SSE4_SUPPORT) -fi -LIBC_CONFIG_VAR([config-cflags-sse4], [$libc_cv_cc_sse4]) - -dnl Check if -mavx works. -AC_CACHE_CHECK(for AVX support, libc_cv_cc_avx, [dnl -LIBC_TRY_CC_OPTION([-mavx], [libc_cv_cc_avx=yes], [libc_cv_cc_avx=no]) -]) -if test $libc_cv_cc_avx = yes; then - AC_DEFINE(HAVE_AVX_SUPPORT) -fi -LIBC_CONFIG_VAR([config-cflags-avx], [$libc_cv_cc_avx]) - -dnl Check if -msse2avx works. -AC_CACHE_CHECK(for AVX encoding of SSE instructions, libc_cv_cc_sse2avx, [dnl -LIBC_TRY_CC_OPTION([-msse2avx], - [libc_cv_cc_sse2avx=yes], - [libc_cv_cc_sse2avx=no]) -]) -if test $libc_cv_cc_sse2avx = yes; then - AC_DEFINE(HAVE_SSE2AVX_SUPPORT) -fi -LIBC_CONFIG_VAR([config-cflags-sse2avx], [$libc_cv_cc_sse2avx]) - -dnl Check if -mfma4 works. -AC_CACHE_CHECK(for FMA4 support, libc_cv_cc_fma4, [dnl -LIBC_TRY_CC_OPTION([-mfma4], [libc_cv_cc_fma4=yes], [libc_cv_cc_fma4=no]) -]) -if test $libc_cv_cc_fma4 = yes; then - AC_DEFINE(HAVE_FMA4_SUPPORT) -fi -LIBC_CONFIG_VAR([have-mfma4], [$libc_cv_cc_fma4]) - -dnl Check if -mno-vzeroupper works. -AC_CACHE_CHECK(for -mno-vzeroupper support, libc_cv_cc_novzeroupper, [dnl -LIBC_TRY_CC_OPTION([-mno-vzeroupper], - [libc_cv_cc_novzeroupper=yes], - [libc_cv_cc_novzeroupper=no]) -]) -LIBC_CONFIG_VAR([config-cflags-novzeroupper], [$libc_cv_cc_novzeroupper]) - -dnl It is always possible to access static and hidden symbols in an -dnl position independent way. -AC_DEFINE(PI_STATIC_AND_HIDDEN) -# work around problem with autoconf and empty lines at the end of files diff --git a/sysdeps/x86_64/preconfigure b/sysdeps/x86_64/preconfigure index d5abba8824..c8f1e0e132 100644 --- a/sysdeps/x86_64/preconfigure +++ b/sysdeps/x86_64/preconfigure @@ -1,4 +1,4 @@ -# This file is generated from configure.in by Autoconf. DO NOT EDIT! +# This file is generated from configure.ac by Autoconf. DO NOT EDIT! # Local preconfigure fragment for sysdeps/x86_64 test -n "$base_machine" || case "$machine" in diff --git a/sysdeps/x86_64/preconfigure.ac b/sysdeps/x86_64/preconfigure.ac new file mode 100644 index 0000000000..600700ea1a --- /dev/null +++ b/sysdeps/x86_64/preconfigure.ac @@ -0,0 +1,20 @@ +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. +# Local preconfigure fragment for sysdeps/x86_64 + +test -n "$base_machine" || case "$machine" in +x86_64) + base_machine=x86_64 + # Check if we are building for x32. + AC_CACHE_CHECK(whether $CC compiles in -mx32 mode by default, + libc_cv_x32, [dnl + AC_TRY_COMPILE(dnl +[#ifndef __ILP32__ +# error not x32 +#endif], [], libc_cv_x32=yes, libc_cv_x32=no)]) + if test $libc_cv_x32 = yes; then + machine=x86_64/x32 + else + machine=x86_64/64 + fi + ;; +esac diff --git a/sysdeps/x86_64/preconfigure.in b/sysdeps/x86_64/preconfigure.in deleted file mode 100644 index 600700ea1a..0000000000 --- a/sysdeps/x86_64/preconfigure.in +++ /dev/null @@ -1,20 +0,0 @@ -GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. -# Local preconfigure fragment for sysdeps/x86_64 - -test -n "$base_machine" || case "$machine" in -x86_64) - base_machine=x86_64 - # Check if we are building for x32. - AC_CACHE_CHECK(whether $CC compiles in -mx32 mode by default, - libc_cv_x32, [dnl - AC_TRY_COMPILE(dnl -[#ifndef __ILP32__ -# error not x32 -#endif], [], libc_cv_x32=yes, libc_cv_x32=no)]) - if test $libc_cv_x32 = yes; then - machine=x86_64/x32 - else - machine=x86_64/64 - fi - ;; -esac -- cgit 1.4.1