mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-01-25 13:14:51 +08:00
extensions.m4: New.
config: 2008-03-27 Paolo Bonzini <bonzini@gnu.org> * extensions.m4: New. gcc: 2008-03-27 Paolo Bonzini <bonzini@gnu.org> * configure.ac: Replace custom __GNU_SOURCE test with AC_USE_SYSTEM_EXTENSIONS. Move it earlier. * aclocal.m4: Regenerate. * configure: Regenerate. * config.in: Regenerate. From-SVN: r133635
This commit is contained in:
parent
639223bd89
commit
60d2695833
@ -1,3 +1,7 @@
|
||||
2008-03-27 Paolo Bonzini <bonzini@gnu.org>
|
||||
|
||||
* extensions.m4: New.
|
||||
|
||||
2008-03-27 Paolo Bonzini <bonzini@gnu.org>
|
||||
|
||||
* mh-armpic: Remove.
|
||||
|
76
config/extensions.m4
Normal file
76
config/extensions.m4
Normal file
@ -0,0 +1,76 @@
|
||||
# serial 5 -*- Autoconf -*-
|
||||
# Enable extensions on systems that normally disable them.
|
||||
|
||||
# Copyright (C) 2003, 2006, 2007 Free Software Foundation, Inc.
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This definition of AC_USE_SYSTEM_EXTENSIONS is stolen from CVS
|
||||
# Autoconf. Perhaps we can remove this once we can assume Autoconf
|
||||
# 2.62 or later everywhere, but since CVS Autoconf mutates rapidly
|
||||
# enough in this area it's likely we'll need to redefine
|
||||
# AC_USE_SYSTEM_EXTENSIONS for quite some time.
|
||||
|
||||
# AC_USE_SYSTEM_EXTENSIONS
|
||||
# ------------------------
|
||||
# Enable extensions on systems that normally disable them,
|
||||
# typically due to standards-conformance issues.
|
||||
# Remember that #undef in AH_VERBATIM gets replaced with #define by
|
||||
# AC_DEFINE. The goal here is to define all known feature-enabling
|
||||
# macros, then, if reports of conflicts are made, disable macros that
|
||||
# cause problems on some platforms (such as __EXTENSIONS__).
|
||||
AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],
|
||||
[AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl
|
||||
AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
|
||||
|
||||
AC_CHECK_HEADER([minix/config.h], [MINIX=yes], [MINIX=])
|
||||
if test "$MINIX" = yes; then
|
||||
AC_DEFINE([_POSIX_SOURCE], [1],
|
||||
[Define to 1 if you need to in order for `stat' and other
|
||||
things to work.])
|
||||
AC_DEFINE([_POSIX_1_SOURCE], [2],
|
||||
[Define to 2 if the system does not provide POSIX.1 features
|
||||
except with this defined.])
|
||||
AC_DEFINE([_MINIX], [1],
|
||||
[Define to 1 if on MINIX.])
|
||||
fi
|
||||
|
||||
AH_VERBATIM([__EXTENSIONS__],
|
||||
[/* Enable extensions on AIX 3, Interix. */
|
||||
#ifndef _ALL_SOURCE
|
||||
# undef _ALL_SOURCE
|
||||
#endif
|
||||
/* Enable GNU extensions on systems that have them. */
|
||||
#ifndef _GNU_SOURCE
|
||||
# undef _GNU_SOURCE
|
||||
#endif
|
||||
/* Enable threading extensions on Solaris. */
|
||||
#ifndef _POSIX_PTHREAD_SEMANTICS
|
||||
# undef _POSIX_PTHREAD_SEMANTICS
|
||||
#endif
|
||||
/* Enable extensions on HP NonStop. */
|
||||
#ifndef _TANDEM_SOURCE
|
||||
# undef _TANDEM_SOURCE
|
||||
#endif
|
||||
/* Enable general extensions on Solaris. */
|
||||
#ifndef __EXTENSIONS__
|
||||
# undef __EXTENSIONS__
|
||||
#endif
|
||||
])
|
||||
AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__],
|
||||
[ac_cv_safe_to_define___extensions__],
|
||||
[AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM([
|
||||
# define __EXTENSIONS__ 1
|
||||
AC_INCLUDES_DEFAULT])],
|
||||
[ac_cv_safe_to_define___extensions__=yes],
|
||||
[ac_cv_safe_to_define___extensions__=no])])
|
||||
test $ac_cv_safe_to_define___extensions__ = yes &&
|
||||
AC_DEFINE([__EXTENSIONS__])
|
||||
AC_DEFINE([_ALL_SOURCE])
|
||||
AC_DEFINE([_GNU_SOURCE])
|
||||
AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
|
||||
AC_DEFINE([_TANDEM_SOURCE])
|
||||
])# AC_USE_SYSTEM_EXTENSIONS
|
||||
|
@ -1,3 +1,11 @@
|
||||
2008-03-27 Paolo Bonzini <bonzini@gnu.org>
|
||||
|
||||
* configure.ac: Replace custom __GNU_SOURCE test with
|
||||
AC_USE_SYSTEM_EXTENSIONS. Move it earlier.
|
||||
* aclocal.m4: Regenerate.
|
||||
* configure: Regenerate.
|
||||
* config.in: Regenerate.
|
||||
|
||||
2008-03-27 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
* fold-const.c (target.h): Include.
|
||||
|
1
gcc/aclocal.m4
vendored
1
gcc/aclocal.m4
vendored
@ -95,6 +95,7 @@ fi
|
||||
m4_include([../config/acx.m4])
|
||||
m4_include([../config/codeset.m4])
|
||||
m4_include([../config/depstand.m4])
|
||||
m4_include([../config/extensions.m4])
|
||||
m4_include([../config/gettext-sister.m4])
|
||||
m4_include([../config/iconv.m4])
|
||||
m4_include([../config/lcmessage.m4])
|
||||
|
@ -1369,37 +1369,37 @@
|
||||
#endif
|
||||
|
||||
|
||||
/* The size of `int', as computed by sizeof. */
|
||||
/* The size of a `int', as computed by sizeof. */
|
||||
#ifndef USED_FOR_TARGET
|
||||
#undef SIZEOF_INT
|
||||
#endif
|
||||
|
||||
|
||||
/* The size of `long', as computed by sizeof. */
|
||||
/* The size of a `long', as computed by sizeof. */
|
||||
#ifndef USED_FOR_TARGET
|
||||
#undef SIZEOF_LONG
|
||||
#endif
|
||||
|
||||
|
||||
/* The size of `long long', as computed by sizeof. */
|
||||
/* The size of a `long long', as computed by sizeof. */
|
||||
#ifndef USED_FOR_TARGET
|
||||
#undef SIZEOF_LONG_LONG
|
||||
#endif
|
||||
|
||||
|
||||
/* The size of `short', as computed by sizeof. */
|
||||
/* The size of a `short', as computed by sizeof. */
|
||||
#ifndef USED_FOR_TARGET
|
||||
#undef SIZEOF_SHORT
|
||||
#endif
|
||||
|
||||
|
||||
/* The size of `void *', as computed by sizeof. */
|
||||
/* The size of a `void *', as computed by sizeof. */
|
||||
#ifndef USED_FOR_TARGET
|
||||
#undef SIZEOF_VOID_P
|
||||
#endif
|
||||
|
||||
|
||||
/* The size of `__int64', as computed by sizeof. */
|
||||
/* The size of a `__int64', as computed by sizeof. */
|
||||
#ifndef USED_FOR_TARGET
|
||||
#undef SIZEOF___INT64
|
||||
#endif
|
||||
@ -1464,9 +1464,44 @@
|
||||
#endif
|
||||
|
||||
|
||||
/* Always define this when using the GNU C Library */
|
||||
/* Define to 1 if on MINIX. */
|
||||
#ifndef USED_FOR_TARGET
|
||||
#undef _GNU_SOURCE
|
||||
#undef _MINIX
|
||||
#endif
|
||||
|
||||
|
||||
/* Define to 2 if the system does not provide POSIX.1 features except with
|
||||
this defined. */
|
||||
#ifndef USED_FOR_TARGET
|
||||
#undef _POSIX_1_SOURCE
|
||||
#endif
|
||||
|
||||
|
||||
/* Define to 1 if you need to in order for `stat' and other things to work. */
|
||||
#ifndef USED_FOR_TARGET
|
||||
#undef _POSIX_SOURCE
|
||||
#endif
|
||||
|
||||
|
||||
/* Enable extensions on AIX 3, Interix. */
|
||||
#ifndef _ALL_SOURCE
|
||||
# undef _ALL_SOURCE
|
||||
#endif
|
||||
/* Enable GNU extensions on systems that have them. */
|
||||
#ifndef _GNU_SOURCE
|
||||
# undef _GNU_SOURCE
|
||||
#endif
|
||||
/* Enable threading extensions on Solaris. */
|
||||
#ifndef _POSIX_PTHREAD_SEMANTICS
|
||||
# undef _POSIX_PTHREAD_SEMANTICS
|
||||
#endif
|
||||
/* Enable extensions on HP NonStop. */
|
||||
#ifndef _TANDEM_SOURCE
|
||||
# undef _TANDEM_SOURCE
|
||||
#endif
|
||||
/* Enable general extensions on Solaris. */
|
||||
#ifndef __EXTENSIONS__
|
||||
# undef __EXTENSIONS__
|
||||
#endif
|
||||
|
||||
|
||||
|
689
gcc/configure
vendored
689
gcc/configure
vendored
@ -2929,6 +2929,7 @@ esac
|
||||
# Check C compiler features
|
||||
# -------------------------
|
||||
|
||||
|
||||
ac_ext=c
|
||||
ac_cpp='$CPP $CPPFLAGS'
|
||||
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||
@ -3164,80 +3165,6 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
|
||||
ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||
|
||||
|
||||
echo "$as_me:$LINENO: checking for inline" >&5
|
||||
echo $ECHO_N "checking for inline... $ECHO_C" >&6
|
||||
if test "${ac_cv_c_inline+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
ac_cv_c_inline=no
|
||||
for ac_kw in inline __inline__ __inline; do
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
#ifndef __cplusplus
|
||||
typedef int foo_t;
|
||||
static $ac_kw foo_t static_foo () {return 0; }
|
||||
$ac_kw foo_t foo () {return 0; }
|
||||
#endif
|
||||
|
||||
_ACEOF
|
||||
rm -f conftest.$ac_objext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||
(eval $ac_compile) 2>conftest.er1
|
||||
ac_status=$?
|
||||
grep -v '^ *+' conftest.er1 >conftest.err
|
||||
rm -f conftest.er1
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag"
|
||||
|| test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; } &&
|
||||
{ ac_try='test -s conftest.$ac_objext'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
ac_cv_c_inline=$ac_kw; break
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
fi
|
||||
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
done
|
||||
|
||||
fi
|
||||
echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
|
||||
echo "${ECHO_T}$ac_cv_c_inline" >&6
|
||||
|
||||
|
||||
case $ac_cv_c_inline in
|
||||
inline | yes) ;;
|
||||
*)
|
||||
case $ac_cv_c_inline in
|
||||
no) ac_val=;;
|
||||
*) ac_val=$ac_cv_c_inline;;
|
||||
esac
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#ifndef __cplusplus
|
||||
#define inline $ac_val
|
||||
#endif
|
||||
_ACEOF
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
# sizeof(char) is 1 by definition.
|
||||
|
||||
echo "$as_me:$LINENO: checking for egrep" >&5
|
||||
echo $ECHO_N "checking for egrep... $ECHO_C" >&6
|
||||
if test "${ac_cv_prog_egrep+set}" = set; then
|
||||
@ -3491,6 +3418,555 @@ fi
|
||||
done
|
||||
|
||||
|
||||
|
||||
if test "${ac_cv_header_minix_config_h+set}" = set; then
|
||||
echo "$as_me:$LINENO: checking for minix/config.h" >&5
|
||||
echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
|
||||
if test "${ac_cv_header_minix_config_h+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
fi
|
||||
echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
|
||||
echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
|
||||
else
|
||||
# Is the header compilable?
|
||||
echo "$as_me:$LINENO: checking minix/config.h usability" >&5
|
||||
echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
$ac_includes_default
|
||||
#include <minix/config.h>
|
||||
_ACEOF
|
||||
rm -f conftest.$ac_objext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||
(eval $ac_compile) 2>conftest.er1
|
||||
ac_status=$?
|
||||
grep -v '^ *+' conftest.er1 >conftest.err
|
||||
rm -f conftest.er1
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag"
|
||||
|| test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; } &&
|
||||
{ ac_try='test -s conftest.$ac_objext'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
ac_header_compiler=yes
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
ac_header_compiler=no
|
||||
fi
|
||||
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
|
||||
echo "${ECHO_T}$ac_header_compiler" >&6
|
||||
|
||||
# Is the header present?
|
||||
echo "$as_me:$LINENO: checking minix/config.h presence" >&5
|
||||
echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
#include <minix/config.h>
|
||||
_ACEOF
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
|
||||
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
|
||||
ac_status=$?
|
||||
grep -v '^ *+' conftest.er1 >conftest.err
|
||||
rm -f conftest.er1
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } >/dev/null; then
|
||||
if test -s conftest.err; then
|
||||
ac_cpp_err=$ac_c_preproc_warn_flag
|
||||
ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
|
||||
else
|
||||
ac_cpp_err=
|
||||
fi
|
||||
else
|
||||
ac_cpp_err=yes
|
||||
fi
|
||||
if test -z "$ac_cpp_err"; then
|
||||
ac_header_preproc=yes
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
ac_header_preproc=no
|
||||
fi
|
||||
rm -f conftest.err conftest.$ac_ext
|
||||
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
|
||||
echo "${ECHO_T}$ac_header_preproc" >&6
|
||||
|
||||
# So? What about this header?
|
||||
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
|
||||
yes:no: )
|
||||
{ echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
|
||||
echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
|
||||
{ echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the compiler's result" >&5
|
||||
echo "$as_me: WARNING: minix/config.h: proceeding with the compiler's result" >&2;}
|
||||
ac_header_preproc=yes
|
||||
;;
|
||||
no:yes:* )
|
||||
{ echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
|
||||
echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
|
||||
{ echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
|
||||
echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
|
||||
{ echo "$as_me:$LINENO: WARNING: minix/config.h: see the Autoconf documentation" >&5
|
||||
echo "$as_me: WARNING: minix/config.h: see the Autoconf documentation" >&2;}
|
||||
{ echo "$as_me:$LINENO: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&5
|
||||
echo "$as_me: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&2;}
|
||||
{ echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
|
||||
echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;}
|
||||
{ echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5
|
||||
echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;}
|
||||
(
|
||||
cat <<\_ASBOX
|
||||
## ------------------------------------------ ##
|
||||
## Report this to the AC_PACKAGE_NAME lists. ##
|
||||
## ------------------------------------------ ##
|
||||
_ASBOX
|
||||
) |
|
||||
sed "s/^/$as_me: WARNING: /" >&2
|
||||
;;
|
||||
esac
|
||||
echo "$as_me:$LINENO: checking for minix/config.h" >&5
|
||||
echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
|
||||
if test "${ac_cv_header_minix_config_h+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
ac_cv_header_minix_config_h=$ac_header_preproc
|
||||
fi
|
||||
echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
|
||||
echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
|
||||
|
||||
fi
|
||||
if test $ac_cv_header_minix_config_h = yes; then
|
||||
MINIX=yes
|
||||
else
|
||||
MINIX=
|
||||
fi
|
||||
|
||||
|
||||
if test "$MINIX" = yes; then
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define _POSIX_SOURCE 1
|
||||
_ACEOF
|
||||
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define _POSIX_1_SOURCE 2
|
||||
_ACEOF
|
||||
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define _MINIX 1
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
|
||||
|
||||
|
||||
echo "$as_me:$LINENO: checking whether it is safe to define __EXTENSIONS__" >&5
|
||||
echo $ECHO_N "checking whether it is safe to define __EXTENSIONS__... $ECHO_C" >&6
|
||||
if test "${ac_cv_safe_to_define___extensions__+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
|
||||
# define __EXTENSIONS__ 1
|
||||
$ac_includes_default
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
rm -f conftest.$ac_objext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||
(eval $ac_compile) 2>conftest.er1
|
||||
ac_status=$?
|
||||
grep -v '^ *+' conftest.er1 >conftest.err
|
||||
rm -f conftest.er1
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag"
|
||||
|| test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; } &&
|
||||
{ ac_try='test -s conftest.$ac_objext'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
ac_cv_safe_to_define___extensions__=yes
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
ac_cv_safe_to_define___extensions__=no
|
||||
fi
|
||||
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
fi
|
||||
echo "$as_me:$LINENO: result: $ac_cv_safe_to_define___extensions__" >&5
|
||||
echo "${ECHO_T}$ac_cv_safe_to_define___extensions__" >&6
|
||||
test $ac_cv_safe_to_define___extensions__ = yes &&
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define __EXTENSIONS__ 1
|
||||
_ACEOF
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define _ALL_SOURCE 1
|
||||
_ACEOF
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define _GNU_SOURCE 1
|
||||
_ACEOF
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define _POSIX_PTHREAD_SEMANTICS 1
|
||||
_ACEOF
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define _TANDEM_SOURCE 1
|
||||
_ACEOF
|
||||
|
||||
|
||||
ac_ext=c
|
||||
ac_cpp='$CPP $CPPFLAGS'
|
||||
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
||||
ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||
echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
|
||||
echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
|
||||
# On Suns, sometimes $CPP names a directory.
|
||||
if test -n "$CPP" && test -d "$CPP"; then
|
||||
CPP=
|
||||
fi
|
||||
if test -z "$CPP"; then
|
||||
if test "${ac_cv_prog_CPP+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
# Double quotes because CPP needs to be expanded
|
||||
for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
|
||||
do
|
||||
ac_preproc_ok=false
|
||||
for ac_c_preproc_warn_flag in '' yes
|
||||
do
|
||||
# Use a header file that comes with gcc, so configuring glibc
|
||||
# with a fresh cross-compiler works.
|
||||
# Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
|
||||
# <limits.h> exists even on freestanding compilers.
|
||||
# On the NeXT, cc -E runs the code through the compiler's parser,
|
||||
# not just through cpp. "Syntax error" is here to catch this case.
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
#ifdef __STDC__
|
||||
# include <limits.h>
|
||||
#else
|
||||
# include <assert.h>
|
||||
#endif
|
||||
Syntax error
|
||||
_ACEOF
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
|
||||
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
|
||||
ac_status=$?
|
||||
grep -v '^ *+' conftest.er1 >conftest.err
|
||||
rm -f conftest.er1
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } >/dev/null; then
|
||||
if test -s conftest.err; then
|
||||
ac_cpp_err=$ac_c_preproc_warn_flag
|
||||
ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
|
||||
else
|
||||
ac_cpp_err=
|
||||
fi
|
||||
else
|
||||
ac_cpp_err=yes
|
||||
fi
|
||||
if test -z "$ac_cpp_err"; then
|
||||
:
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
# Broken: fails on valid input.
|
||||
continue
|
||||
fi
|
||||
rm -f conftest.err conftest.$ac_ext
|
||||
|
||||
# OK, works on sane cases. Now check whether non-existent headers
|
||||
# can be detected and how.
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
#include <ac_nonexistent.h>
|
||||
_ACEOF
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
|
||||
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
|
||||
ac_status=$?
|
||||
grep -v '^ *+' conftest.er1 >conftest.err
|
||||
rm -f conftest.er1
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } >/dev/null; then
|
||||
if test -s conftest.err; then
|
||||
ac_cpp_err=$ac_c_preproc_warn_flag
|
||||
ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
|
||||
else
|
||||
ac_cpp_err=
|
||||
fi
|
||||
else
|
||||
ac_cpp_err=yes
|
||||
fi
|
||||
if test -z "$ac_cpp_err"; then
|
||||
# Broken: success on invalid input.
|
||||
continue
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
# Passes both tests.
|
||||
ac_preproc_ok=:
|
||||
break
|
||||
fi
|
||||
rm -f conftest.err conftest.$ac_ext
|
||||
|
||||
done
|
||||
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
|
||||
rm -f conftest.err conftest.$ac_ext
|
||||
if $ac_preproc_ok; then
|
||||
break
|
||||
fi
|
||||
|
||||
done
|
||||
ac_cv_prog_CPP=$CPP
|
||||
|
||||
fi
|
||||
CPP=$ac_cv_prog_CPP
|
||||
else
|
||||
ac_cv_prog_CPP=$CPP
|
||||
fi
|
||||
echo "$as_me:$LINENO: result: $CPP" >&5
|
||||
echo "${ECHO_T}$CPP" >&6
|
||||
ac_preproc_ok=false
|
||||
for ac_c_preproc_warn_flag in '' yes
|
||||
do
|
||||
# Use a header file that comes with gcc, so configuring glibc
|
||||
# with a fresh cross-compiler works.
|
||||
# Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
|
||||
# <limits.h> exists even on freestanding compilers.
|
||||
# On the NeXT, cc -E runs the code through the compiler's parser,
|
||||
# not just through cpp. "Syntax error" is here to catch this case.
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
#ifdef __STDC__
|
||||
# include <limits.h>
|
||||
#else
|
||||
# include <assert.h>
|
||||
#endif
|
||||
Syntax error
|
||||
_ACEOF
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
|
||||
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
|
||||
ac_status=$?
|
||||
grep -v '^ *+' conftest.er1 >conftest.err
|
||||
rm -f conftest.er1
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } >/dev/null; then
|
||||
if test -s conftest.err; then
|
||||
ac_cpp_err=$ac_c_preproc_warn_flag
|
||||
ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
|
||||
else
|
||||
ac_cpp_err=
|
||||
fi
|
||||
else
|
||||
ac_cpp_err=yes
|
||||
fi
|
||||
if test -z "$ac_cpp_err"; then
|
||||
:
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
# Broken: fails on valid input.
|
||||
continue
|
||||
fi
|
||||
rm -f conftest.err conftest.$ac_ext
|
||||
|
||||
# OK, works on sane cases. Now check whether non-existent headers
|
||||
# can be detected and how.
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
#include <ac_nonexistent.h>
|
||||
_ACEOF
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
|
||||
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
|
||||
ac_status=$?
|
||||
grep -v '^ *+' conftest.er1 >conftest.err
|
||||
rm -f conftest.er1
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } >/dev/null; then
|
||||
if test -s conftest.err; then
|
||||
ac_cpp_err=$ac_c_preproc_warn_flag
|
||||
ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
|
||||
else
|
||||
ac_cpp_err=
|
||||
fi
|
||||
else
|
||||
ac_cpp_err=yes
|
||||
fi
|
||||
if test -z "$ac_cpp_err"; then
|
||||
# Broken: success on invalid input.
|
||||
continue
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
# Passes both tests.
|
||||
ac_preproc_ok=:
|
||||
break
|
||||
fi
|
||||
rm -f conftest.err conftest.$ac_ext
|
||||
|
||||
done
|
||||
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
|
||||
rm -f conftest.err conftest.$ac_ext
|
||||
if $ac_preproc_ok; then
|
||||
:
|
||||
else
|
||||
{ { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
|
||||
See \`config.log' for more details." >&5
|
||||
echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
|
||||
See \`config.log' for more details." >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
fi
|
||||
|
||||
ac_ext=c
|
||||
ac_cpp='$CPP $CPPFLAGS'
|
||||
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
||||
ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||
|
||||
echo "$as_me:$LINENO: checking for inline" >&5
|
||||
echo $ECHO_N "checking for inline... $ECHO_C" >&6
|
||||
if test "${ac_cv_c_inline+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
ac_cv_c_inline=no
|
||||
for ac_kw in inline __inline__ __inline; do
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
#ifndef __cplusplus
|
||||
typedef int foo_t;
|
||||
static $ac_kw foo_t static_foo () {return 0; }
|
||||
$ac_kw foo_t foo () {return 0; }
|
||||
#endif
|
||||
|
||||
_ACEOF
|
||||
rm -f conftest.$ac_objext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||
(eval $ac_compile) 2>conftest.er1
|
||||
ac_status=$?
|
||||
grep -v '^ *+' conftest.er1 >conftest.err
|
||||
rm -f conftest.er1
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag"
|
||||
|| test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; } &&
|
||||
{ ac_try='test -s conftest.$ac_objext'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
ac_cv_c_inline=$ac_kw; break
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
fi
|
||||
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
done
|
||||
|
||||
fi
|
||||
echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
|
||||
echo "${ECHO_T}$ac_cv_c_inline" >&6
|
||||
|
||||
|
||||
case $ac_cv_c_inline in
|
||||
inline | yes) ;;
|
||||
*)
|
||||
case $ac_cv_c_inline in
|
||||
no) ac_val=;;
|
||||
*) ac_val=$ac_cv_c_inline;;
|
||||
esac
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#ifndef __cplusplus
|
||||
#define inline $ac_val
|
||||
#endif
|
||||
_ACEOF
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
# sizeof(char) is 1 by definition.
|
||||
echo "$as_me:$LINENO: checking for void *" >&5
|
||||
echo $ECHO_N "checking for void *... $ECHO_C" >&6
|
||||
if test "${ac_cv_type_void_p+set}" = set; then
|
||||
@ -7934,71 +8410,6 @@ fi
|
||||
# Checks for C headers
|
||||
# --------------------
|
||||
|
||||
echo "$as_me:$LINENO: checking for GNU C library" >&5
|
||||
echo $ECHO_N "checking for GNU C library... $ECHO_C" >&6
|
||||
if test "${gcc_cv_glibc+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
#include <features.h>
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
#if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
|
||||
#error Not a GNU C library system
|
||||
#endif
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
rm -f conftest.$ac_objext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||
(eval $ac_compile) 2>conftest.er1
|
||||
ac_status=$?
|
||||
grep -v '^ *+' conftest.er1 >conftest.err
|
||||
rm -f conftest.er1
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag"
|
||||
|| test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; } &&
|
||||
{ ac_try='test -s conftest.$ac_objext'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
gcc_cv_glibc=yes
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
gcc_cv_glibc=no
|
||||
fi
|
||||
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
fi
|
||||
|
||||
echo "$as_me:$LINENO: result: $gcc_cv_glibc" >&5
|
||||
echo "${ECHO_T}$gcc_cv_glibc" >&6
|
||||
if test $gcc_cv_glibc = yes; then
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define _GNU_SOURCE 1
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
|
||||
# Need to reject headers which give warnings, so that the -Werror bootstrap
|
||||
# works later. *sigh* This needs to come before all header checks.
|
||||
|
||||
|
@ -297,6 +297,7 @@ AC_SUBST(CFLAGS)
|
||||
# Check C compiler features
|
||||
# -------------------------
|
||||
|
||||
AC_USE_SYSTEM_EXTENSIONS
|
||||
AC_PROG_CPP
|
||||
AC_C_INLINE
|
||||
|
||||
@ -896,20 +897,6 @@ fi
|
||||
# Checks for C headers
|
||||
# --------------------
|
||||
|
||||
AC_MSG_CHECKING(for GNU C library)
|
||||
AC_CACHE_VAL(gcc_cv_glibc,
|
||||
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
|
||||
[[#include <features.h>]], [[
|
||||
#if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
|
||||
#error Not a GNU C library system
|
||||
#endif]])],
|
||||
[gcc_cv_glibc=yes],
|
||||
[gcc_cv_glibc=no])])
|
||||
AC_MSG_RESULT($gcc_cv_glibc)
|
||||
if test $gcc_cv_glibc = yes; then
|
||||
AC_DEFINE(_GNU_SOURCE, 1, [Always define this when using the GNU C Library])
|
||||
fi
|
||||
|
||||
# Need to reject headers which give warnings, so that the -Werror bootstrap
|
||||
# works later. *sigh* This needs to come before all header checks.
|
||||
AC_PROG_CPP_WERROR
|
||||
|
Loading…
Reference in New Issue
Block a user