diff options
3202 files changed, 312423 insertions, 128793 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000..1e15ce5fc1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,32 @@ +# Global excludes across all subdirectories +*.o +*.so +*.so.[0-9] +*.so.[0-9].[0-9] +*.sl +*.sl.[0-9] +*.sl.[0-9].[0-9] +*.dylib +*.dll +*.a +*.mo +objfiles.txt +.deps/ +*.gcno +*.gcda +*.gcov +*.gcov.out +lcov.info +*.vcproj +win32ver.rc +*.exe +lib*dll.def + +# Local excludes in root directory +/GNUmakefile +/config.log +/config.status +/pgsql.sln +/pgsql.sln.cache +/Debug/ +/Release/ @@ -1,7 +1,7 @@ Postgres-XC Cluster Database Management System Portions Copyright (c) 2010-2011, Nippon Telegraph and Telephone Corporation -Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group +Portions Copyright (c) 1996-2011, PostgreSQL Global Development Group Portions Copyright (c) 1994, The Regents of the University of California diff --git a/GNUmakefile.in b/GNUmakefile.in index 86623a3854..79b0da42a8 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -1,64 +1,46 @@ # # PostgreSQL top level makefile # -# $PostgreSQL: pgsql/GNUmakefile.in,v 1.58 2010/03/30 00:10:46 petere Exp $ +# GNUmakefile.in # subdir = top_builddir = . include $(top_builddir)/src/Makefile.global +$(call recurse,all install,src config) + all: - $(MAKE) -C src all - $(MAKE) -C config all - @echo "All of PostgreSQL successfully made. Ready to install." + +@echo "All of PostgreSQL successfully made. Ready to install." docs: $(MAKE) -C doc all +$(call recurse,world,doc src config contrib,all) world: - $(MAKE) -C doc all - $(MAKE) -C src all - $(MAKE) -C config all - $(MAKE) -C contrib all - @echo "PostgreSQL, contrib, and documentation successfully made. Ready to install." + +@echo "PostgreSQL, contrib, and documentation successfully made. Ready to install." html man: $(MAKE) -C doc $@ install: - $(MAKE) -C src $@ - $(MAKE) -C config $@ - @echo "PostgreSQL installation complete." + +@echo "PostgreSQL installation complete." install-docs: $(MAKE) -C doc install +$(call recurse,install-world,doc src config contrib,install) install-world: - $(MAKE) -C doc install - $(MAKE) -C src install - $(MAKE) -C config install - $(MAKE) -C contrib install - @echo "PostgreSQL, contrib, and documentation installation complete." + +@echo "PostgreSQL, contrib, and documentation installation complete." -installdirs uninstall coverage: - $(MAKE) -C doc $@ - $(MAKE) -C src $@ - $(MAKE) -C config $@ +$(call recurse,installdirs uninstall coverage,doc src config) -distprep: - $(MAKE) -C doc $@ - $(MAKE) -C src $@ - $(MAKE) -C config $@ - $(MAKE) -C contrib $@ +$(call recurse,distprep,doc src config contrib) # clean, distclean, etc should apply to contrib too, even though # it's not built by default +$(call recurse,clean,doc contrib src config) clean: - $(MAKE) -C doc $@ - $(MAKE) -C contrib $@ - $(MAKE) -C src $@ - $(MAKE) -C config $@ # Garbage from autoconf: @rm -rf autom4te.cache/ @@ -78,11 +60,11 @@ check: all check installcheck installcheck-parallel: $(MAKE) -C src/test $@ -installcheck-world: - $(MAKE) -C src/test installcheck - $(MAKE) -C src/pl installcheck - $(MAKE) -C src/interfaces/ecpg installcheck - $(MAKE) -C contrib installcheck +$(call recurse,check-world,src/test src/pl src/interfaces/ecpg contrib,check) + +$(call recurse,installcheck-world,src/test src/pl src/interfaces/ecpg contrib,installcheck) + +$(call recurse,maintainer-check,doc src config contrib) GNUmakefile: GNUmakefile.in $(top_builddir)/config.status ./config.status $@ @@ -122,7 +104,7 @@ distdir: cp $(distdir)/doc/src/sgml/INSTALL $(distdir)/ cp $(distdir)/doc/src/sgml/regress_README $(distdir)/src/test/regress/README $(MAKE) -C $(distdir) distclean - rm -f $(distdir)/README.CVS + rm -f $(distdir)/README.git distcheck: dist rm -rf $(dummy) @@ -143,4 +125,4 @@ distcheck: dist rm -rf $(distdir) $(dummy) @echo "Distribution integrity checks out." -.PHONY: dist distdir distcheck docs install-docs +.PHONY: dist distdir distcheck docs install-docs world check-world install-world installcheck-world @@ -11,7 +11,7 @@ # GNUmakefile won't exist yet, so we catch that case as well. -all check install installdirs installcheck installcheck-parallel uninstall clean distclean maintainer-clean dist distcheck world install-world installcheck-world: +all check install installdirs installcheck installcheck-parallel uninstall clean distclean maintainer-clean dist distcheck world check-world install-world installcheck-world: @if [ ! -f GNUmakefile ] ; then \ echo "You need to run the 'configure' program first. See the file"; \ echo "'INSTALL' for installation instructions." ; \ @@ -1,6 +1,6 @@ PostgreSQL Database Management System ===================================== - + This directory contains the source code distribution of the PostgreSQL database management system. @@ -26,4 +26,3 @@ instructions. The latest version of this software may be obtained at http://www.postgresql.org/download/. For more information look at our web site located at http://www.postgresql.org/. - diff --git a/README.CVS b/README.git index 4eb8377a50..83b9a8c581 100644 --- a/README.CVS +++ b/README.git @@ -2,13 +2,13 @@ In a release or snapshot tarball of PostgreSQL, documentation files named INSTALL and HISTORY will appear in this directory. However, these files are -not stored in CVS and so will not be present if you are using a CVS checkout. -If you are using CVS, you can view the most recent install instructions at: +not stored in git and so will not be present if you are using a git checkout. +If you are using git, you can view the most recent install instructions at: http://developer.postgresql.org/docs/postgres/installation.html and the current release notes at: http://developer.postgresql.org/docs/postgres/release.html -Users compiling from CVS will also need compatible versions of Bison, Flex, +Users compiling from git will also need compatible versions of Bison, Flex, and Perl, as discussed in the install documentation. These programs are not needed when using a tarball, since the files they are needed to build are already present in the tarball. (On Windows, however, you need Perl anyway.) diff --git a/aclocal.m4 b/aclocal.m4 index b007cd0a48..eaf98007e5 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,4 +1,4 @@ -dnl $PostgreSQL: pgsql/aclocal.m4,v 1.18 2004/04/23 18:15:47 momjian Exp $ +dnl aclocal.m4 m4_include([config/ac_func_accept_argtypes.m4]) m4_include([config/acx_pthread.m4]) m4_include([config/c-compiler.m4]) diff --git a/config/Makefile b/config/Makefile index 2e881b7704..da1283868e 100644 --- a/config/Makefile +++ b/config/Makefile @@ -1,4 +1,4 @@ -# $PostgreSQL: pgsql/config/Makefile,v 1.3 2009/08/26 22:24:42 petere Exp $ +# config/Makefile subdir = config top_builddir = .. diff --git a/config/ac_func_accept_argtypes.m4 b/config/ac_func_accept_argtypes.m4 index 917d59ab86..1e7717922d 100644 --- a/config/ac_func_accept_argtypes.m4 +++ b/config/ac_func_accept_argtypes.m4 @@ -1,13 +1,12 @@ -# $PostgreSQL: pgsql/config/ac_func_accept_argtypes.m4,v 1.6 2003/11/29 19:51:17 pgsql Exp $ +# config/ac_func_accept_argtypes.m4 # This comes from the official Autoconf macro archive at # <http://research.cys.de/autoconf-archive/> -# (I removed the $ before the Id CVS keyword below.) dnl @synopsis AC_FUNC_ACCEPT_ARGTYPES dnl dnl Checks the data types of the three arguments to accept(). Results are -dnl placed into the symbols ACCEPT_TYPE_RETURN and ACCEPT_TYPE_ARG[123], +dnl placed into the symbols ACCEPT_TYPE_RETURN and ACCEPT_TYPE_ARG[123], dnl consistent with the following example: dnl dnl #define ACCEPT_TYPE_RETURN int @@ -21,7 +20,7 @@ dnl dnl NOTE: This is just a modified version of the AC_FUNC_SELECT_ARGTYPES dnl macro. Credit for that one goes to David MacKenzie et. al. dnl -dnl @version Id: ac_func_accept_argtypes.m4,v 1.1 1999/12/03 11:29:29 simons Exp $ +dnl @version $Id: ac_func_accept_argtypes.m4,v 1.1 1999/12/03 11:29:29 simons Exp $ dnl @author Daniel Richard G. <skunk@mit.edu> dnl @@ -38,7 +37,8 @@ dnl # which is *not* 'socklen_t *'). If we detect that, then we assume # 'int' as the result, because that ought to work best. # -# On Win32, accept() returns 'unsigned int PASCAL' +# On Win32, accept() returns 'unsigned int PASCAL' +# Win64 uses SOCKET for return and arg1 AC_DEFUN([AC_FUNC_ACCEPT_ARGTYPES], [AC_MSG_CHECKING([types of arguments for accept()]) @@ -46,8 +46,8 @@ AC_DEFUN([AC_FUNC_ACCEPT_ARGTYPES], [AC_CACHE_VAL(ac_cv_func_accept_arg1,dnl [AC_CACHE_VAL(ac_cv_func_accept_arg2,dnl [AC_CACHE_VAL(ac_cv_func_accept_arg3,dnl - [for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL'; do - for ac_cv_func_accept_arg1 in 'int' 'unsigned int'; do + [for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL' 'SOCKET'; do + for ac_cv_func_accept_arg1 in 'int' 'unsigned int' 'SOCKET'; do for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do AC_TRY_COMPILE( diff --git a/config/acx_pthread.m4 b/config/acx_pthread.m4 index ceb161a556..6ff241eba1 100644 --- a/config/acx_pthread.m4 +++ b/config/acx_pthread.m4 @@ -142,7 +142,8 @@ main (int argc, char **argv) } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext - if test "`(eval $ac_link 2>&1 1>&5)`" = ""; then + # Check both linking and compiling, because they might tolerate different options. + if test "`(eval $ac_link 2>&1 1>&5)`" = "" && test "`(eval $ac_compile 2>&1 1>&5)`" = ""; then # we continue with more flags because Linux needs -lpthread # for libpq builds on PostgreSQL. The test above only # tests for building binaries, not shared libraries. diff --git a/config/c-compiler.m4 b/config/c-compiler.m4 index a8df61b649..9398ca6c47 100644 --- a/config/c-compiler.m4 +++ b/config/c-compiler.m4 @@ -1,5 +1,5 @@ # Macros to detect C compiler features -# $PostgreSQL: pgsql/config/c-compiler.m4,v 1.22 2010/05/25 17:28:20 meskes Exp $ +# config/c-compiler.m4 # PGAC_C_SIGNED @@ -126,13 +126,21 @@ fi])# PGAC_C_FUNCNAME_SUPPORT # Given a string, check if the compiler supports the string as a # command-line option. If it does, add the string to CFLAGS. AC_DEFUN([PGAC_PROG_CC_CFLAGS_OPT], -[AC_MSG_CHECKING([if $CC supports $1]) -pgac_save_CFLAGS=$CFLAGS +[define([Ac_cachevar], [AS_TR_SH([pgac_cv_prog_cc_cflags_$1])])dnl +AC_CACHE_CHECK([whether $CC supports $1], [Ac_cachevar], +[pgac_save_CFLAGS=$CFLAGS CFLAGS="$pgac_save_CFLAGS $1" +ac_save_c_werror_flag=$ac_c_werror_flag +ac_c_werror_flag=yes _AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], - AC_MSG_RESULT(yes), - [CFLAGS="$pgac_save_CFLAGS" - AC_MSG_RESULT(no)]) + [Ac_cachevar=yes], + [Ac_cachevar=no]) +ac_c_werror_flag=$ac_save_c_werror_flag +CFLAGS="$pgac_save_CFLAGS"]) +if test x"$Ac_cachevar" = x"yes"; then + CFLAGS="$CFLAGS $1" +fi +undefine([Ac_cachevar])dnl ])# PGAC_PROG_CC_CFLAGS_OPT @@ -145,14 +153,17 @@ _AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], # you can link to a particular function, not just whether you can link. # In fact, we must actually check that the resulting program runs :-( AC_DEFUN([PGAC_PROG_CC_LDFLAGS_OPT], -[AC_MSG_CHECKING([if $CC supports $1]) -pgac_save_LDFLAGS=$LDFLAGS +[define([Ac_cachevar], [AS_TR_SH([pgac_cv_prog_cc_ldflags_$1])])dnl +AC_CACHE_CHECK([whether $CC supports $1], [Ac_cachevar], +[pgac_save_LDFLAGS=$LDFLAGS LDFLAGS="$pgac_save_LDFLAGS $1" AC_RUN_IFELSE([AC_LANG_PROGRAM([extern void $2 (); void (*fptr) () = $2;],[])], - AC_MSG_RESULT(yes), - [LDFLAGS="$pgac_save_LDFLAGS" - AC_MSG_RESULT(no)], - [LDFLAGS="$pgac_save_LDFLAGS" - AC_MSG_RESULT(assuming no)]) + [Ac_cachevar=yes], + [Ac_cachevar=no], + [Ac_cachevar="assuming no"]) +LDFLAGS="$pgac_save_LDFLAGS"]) +if test x"$Ac_cachevar" = x"yes"; then + LDFLAGS="$LDFLAGS $1" +fi +undefine([Ac_cachevar])dnl ])# PGAC_PROG_CC_LDFLAGS_OPT - diff --git a/config/c-library.m4 b/config/c-library.m4 index 5d44685ec0..cddeafaec2 100644 --- a/config/c-library.m4 +++ b/config/c-library.m4 @@ -1,5 +1,5 @@ # Macros that test various C library quirks -# $PostgreSQL: pgsql/config/c-library.m4,v 1.34 2009/07/02 18:55:40 petere Exp $ +# config/c-library.m4 # PGAC_VAR_INT_TIMEZONE @@ -297,3 +297,32 @@ int main() ])dnl AC_CACHE_VAL AC_MSG_RESULT([$pgac_cv_printf_arg_control]) ])# PGAC_FUNC_PRINTF_ARG_CONTROL + + +# PGAC_TYPE_LOCALE_T +# ------------------ +# Check for the locale_t type and find the right header file. Mac OS +# X needs xlocale.h; standard is locale.h, but glibc also has an +# xlocale.h file that we should not use. +# +AC_DEFUN([PGAC_TYPE_LOCALE_T], +[AC_CACHE_CHECK([for locale_t], pgac_cv_type_locale_t, +[AC_COMPILE_IFELSE([AC_LANG_PROGRAM( +[#include <locale.h> +locale_t x;], +[])], +[pgac_cv_type_locale_t=yes], +[AC_COMPILE_IFELSE([AC_LANG_PROGRAM( +[#include <xlocale.h> +locale_t x;], +[])], +[pgac_cv_type_locale_t='yes (in xlocale.h)'], +[pgac_cv_type_locale_t=no])])]) +if test "$pgac_cv_type_locale_t" != no; then + AC_DEFINE(HAVE_LOCALE_T, 1, + [Define to 1 if the system has the type `locale_t'.]) +fi +if test "$pgac_cv_type_locale_t" = 'yes (in xlocale.h)'; then + AC_DEFINE(LOCALE_T_IN_XLOCALE, 1, + [Define to 1 if `locale_t' requires <xlocale.h>.]) +fi])])# PGAC_HEADER_XLOCALE diff --git a/config/config.guess b/config/config.guess index 115f944a61..40eaed4821 100755 --- a/config/config.guess +++ b/config/config.guess @@ -1,10 +1,10 @@ #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -# Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, +# 2011 Free Software Foundation, Inc. -timestamp='2010-04-03' +timestamp='2011-05-11' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -57,7 +57,7 @@ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO @@ -92,7 +92,7 @@ if test $# != 0; then exit 1 fi -trap 'exit 1' HUP INT TERM +trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires @@ -106,7 +106,7 @@ trap 'exit 1' HUP INT TERM set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" HUP INT PIPE TERM ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || @@ -181,7 +181,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in fi ;; *) - os=netbsd + os=netbsd ;; esac # The OS release @@ -224,7 +224,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on @@ -270,7 +270,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit ;; + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + exitcode=$? + trap '' 0 + exit $exitcode ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead @@ -296,7 +299,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in echo s390-ibm-zvmoe exit ;; *:OS400:*:*) - echo powerpc-ibm-os400 + echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} @@ -395,23 +398,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} - exit ;; + exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit ;; + echo m68k-milan-mint${UNAME_RELEASE} + exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit ;; + echo m68k-hades-mint${UNAME_RELEASE} + exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; + echo m68k-unknown-mint${UNAME_RELEASE} + exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; @@ -481,8 +484,8 @@ EOF echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ @@ -495,7 +498,7 @@ EOF else echo i586-dg-dgux${UNAME_RELEASE} fi - exit ;; + exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; @@ -552,7 +555,7 @@ EOF echo rs6000-ibm-aix3.2 fi exit ;; - *:AIX:*:[456]) + *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 @@ -595,52 +598,52 @@ EOF 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 - esac ;; - esac + esac ;; + esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + sed 's/^ //' << EOF >$dummy.c - #define _HPUX_SOURCE - #include <stdlib.h> - #include <unistd.h> + #define _HPUX_SOURCE + #include <stdlib.h> + #include <unistd.h> - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa @@ -731,22 +734,22 @@ EOF exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd - exit ;; + exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi - exit ;; + exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd - exit ;; + exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd - exit ;; + exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd - exit ;; + exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; @@ -770,14 +773,14 @@ EOF exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} @@ -805,14 +808,14 @@ EOF echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) - case ${UNAME_MACHINE} in + case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; @@ -867,7 +870,7 @@ EOF EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; - esac + esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} @@ -879,7 +882,13 @@ EOF then echo ${UNAME_MACHINE}-unknown-linux-gnu else - echo ${UNAME_MACHINE}-unknown-linux-gnueabi + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + echo ${UNAME_MACHINE}-unknown-linux-gnueabi + else + echo ${UNAME_MACHINE}-unknown-linux-gnueabihf + fi fi exit ;; avr32*:Linux:*:*) @@ -892,7 +901,7 @@ EOF echo crisv32-axis-linux-gnu exit ;; frv:Linux:*:*) - echo frv-unknown-linux-gnu + echo frv-unknown-linux-gnu exit ;; i*86:Linux:*:*) LIBC=gnu @@ -960,7 +969,7 @@ EOF echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu @@ -968,6 +977,9 @@ EOF sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; + tile*:Linux:*:*) + echo ${UNAME_MACHINE}-tilera-linux-gnu + exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; @@ -975,7 +987,7 @@ EOF echo x86_64-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. @@ -984,11 +996,11 @@ EOF echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. + # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) @@ -1020,7 +1032,7 @@ EOF fi exit ;; i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. + # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; @@ -1048,13 +1060,13 @@ EOF exit ;; pc:*:*:*) # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i586. + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp - exit ;; + exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; @@ -1089,8 +1101,8 @@ EOF /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ @@ -1133,10 +1145,10 @@ EOF echo ns32k-sni-sysv fi exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says <Richard.M.Bartel@ccMail.Census.GOV> - echo i586-unisys-sysv4 - exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says <Richard.M.Bartel@ccMail.Census.GOV> + echo i586-unisys-sysv4 + exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes <hewes@openmarket.com>. # How about differentiating between stratus architectures? -djm @@ -1162,11 +1174,11 @@ EOF exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} + echo mips-nec-sysv${UNAME_RELEASE} else - echo mips-unknown-sysv${UNAME_RELEASE} + echo mips-unknown-sysv${UNAME_RELEASE} fi - exit ;; + exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; @@ -1231,6 +1243,9 @@ EOF *:QNX:*:4*) echo i386-pc-qnx exit ;; + NEO-?:NONSTOP_KERNEL:*:*) + echo neo-tandem-nsk${UNAME_RELEASE} + exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; @@ -1276,13 +1291,13 @@ EOF echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} + echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` + UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; @@ -1322,11 +1337,11 @@ main () #include <sys/param.h> printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 - "4" + "4" #else - "" + "" #endif - ); exit (0); + ); exit (0); #endif #endif diff --git a/config/config.sub b/config/config.sub index ae35431611..30fdca8121 100755 --- a/config/config.sub +++ b/config/config.sub @@ -1,10 +1,10 @@ #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -# Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, +# 2011 Free Software Foundation, Inc. -timestamp='2010-03-22' +timestamp='2011-03-23' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -76,7 +76,7 @@ version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO @@ -124,8 +124,9 @@ esac # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in - nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ - uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ + nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ + linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ + knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os @@ -157,8 +158,8 @@ case $os in os= basic_machine=$1 ;; - -bluegene*) - os=-cnk + -bluegene*) + os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= @@ -174,10 +175,10 @@ case $os in os=-chorusos basic_machine=$1 ;; - -chorusrdb) - os=-chorusrdb + -chorusrdb) + os=-chorusrdb basic_machine=$1 - ;; + ;; -hiux*) os=-hiuxwe2 ;; @@ -282,11 +283,13 @@ case $basic_machine in | moxie \ | mt \ | msp430 \ + | nds32 | nds32le | nds32be \ | nios | nios2 \ | ns16k | ns32k \ + | open8 \ | or32 \ | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ | rx \ | score \ @@ -294,12 +297,12 @@ case $basic_machine in | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu | strongarm \ - | tahoe | thumb | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ + | spu \ + | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e \ | we32k \ - | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ + | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; @@ -323,6 +326,18 @@ case $basic_machine in basic_machine=mt-unknown ;; + strongarm | thumb | xscale) + basic_machine=arm-unknown + ;; + + xscaleeb) + basic_machine=armeb-unknown + ;; + + xscaleel) + basic_machine=armel-unknown + ;; + # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. @@ -377,26 +392,28 @@ case $basic_machine in | mmix-* \ | mt-* \ | msp430-* \ + | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ + | open8-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ + | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile-* | tilegx-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) @@ -421,7 +438,7 @@ case $basic_machine in basic_machine=a29k-amd os=-udi ;; - abacus) + abacus) basic_machine=abacus-unknown ;; adobe68k) @@ -504,7 +521,7 @@ case $basic_machine in basic_machine=c90-cray os=-unicos ;; - cegcc) + cegcc) basic_machine=arm-unknown os=-cegcc ;; @@ -536,7 +553,7 @@ case $basic_machine in basic_machine=craynv-cray os=-unicosmp ;; - cr16) + cr16 | cr16-*) basic_machine=cr16-unknown os=-elf ;; @@ -752,7 +769,7 @@ case $basic_machine in basic_machine=ns32k-utek os=-sysv ;; - microblaze) + microblaze) basic_machine=microblaze-xilinx ;; mingw32) @@ -859,6 +876,12 @@ case $basic_machine in np1) basic_machine=np1-gould ;; + neo-tandem) + basic_machine=neo-tandem + ;; + nse-tandem) + basic_machine=nse-tandem + ;; nsr-tandem) basic_machine=nsr-tandem ;; @@ -941,9 +964,10 @@ case $basic_machine in ;; power) basic_machine=power-ibm ;; - ppc) basic_machine=powerpc-unknown + ppc | ppcbe) basic_machine=powerpc-unknown ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ppc-* | ppcbe-*) + basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown @@ -1037,6 +1061,9 @@ case $basic_machine in basic_machine=i860-stratus os=-sysv4 ;; + strongarm-* | thumb-*) + basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; sun2) basic_machine=m68000-sun ;; @@ -1093,8 +1120,8 @@ case $basic_machine in basic_machine=t90-cray os=-unicos ;; - # This must be matched before tile*. - tilegx*) + # This must be matched before tile*. + tilegx*) basic_machine=tilegx-unknown os=-linux-gnu ;; @@ -1169,6 +1196,9 @@ case $basic_machine in xps | xps100) basic_machine=xps100-honeywell ;; + xscale-* | xscalee[bl]-*) + basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` + ;; ymp) basic_machine=ymp-cray os=-unicos @@ -1266,11 +1296,11 @@ esac if [ x"$os" != x"" ] then case $os in - # First match some system type aliases - # that might get confused with valid system types. + # First match some system type aliases + # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. - -auroraux) - os=-auroraux + -auroraux) + os=-auroraux ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` @@ -1307,7 +1337,8 @@ case $os in | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ + | -mingw32* | -linux-gnu* | -linux-android* \ + | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ @@ -1354,7 +1385,7 @@ case $os in -opened*) os=-openedition ;; - -os400*) + -os400*) os=-os400 ;; -wince*) @@ -1403,7 +1434,7 @@ case $os in -sinix*) os=-sysv4 ;; - -tpf*) + -tpf*) os=-tpf ;; -triton*) @@ -1448,8 +1479,8 @@ case $os in -dicos*) os=-dicos ;; - -nacl*) - ;; + -nacl*) + ;; -none) ;; *) @@ -1472,10 +1503,10 @@ else # system, and we'll never get to this point. case $basic_machine in - score-*) + score-*) os=-elf ;; - spu-*) + spu-*) os=-elf ;; *-acorn) @@ -1487,8 +1518,8 @@ case $basic_machine in arm*-semi) os=-aout ;; - c4x-* | tic4x-*) - os=-coff + c4x-* | tic4x-*) + os=-coff ;; tic54x-*) os=-coff @@ -1524,7 +1555,7 @@ case $basic_machine in m68*-cisco) os=-aout ;; - mep-*) + mep-*) os=-elf ;; mips*-cisco) @@ -1551,7 +1582,7 @@ case $basic_machine in *-ibm) os=-aix ;; - *-knuth) + *-knuth) os=-mmixware ;; *-wec) diff --git a/config/docbook.m4 b/config/docbook.m4 index 0d8c1fad7e..636aefed4c 100644 --- a/config/docbook.m4 +++ b/config/docbook.m4 @@ -1,4 +1,4 @@ -# $PostgreSQL: pgsql/config/docbook.m4,v 1.11 2009/08/04 22:04:37 petere Exp $ +# config/docbook.m4 # PGAC_PROG_JADE # -------------- diff --git a/config/general.m4 b/config/general.m4 index 52f850ea25..95d65ceb09 100644 --- a/config/general.m4 +++ b/config/general.m4 @@ -1,4 +1,4 @@ -# $PostgreSQL: pgsql/config/general.m4,v 1.11 2009/07/02 18:55:40 petere Exp $ +# config/general.m4 # This file defines new macros to process configure command line # arguments, to replace the brain-dead AC_ARG_WITH and AC_ARG_ENABLE. @@ -90,7 +90,7 @@ dnl values. But we only want it to appear once in the help. We achieve dnl that by making the help string look the same, which is why we need to dnl save the default that was passed in previously. m4_define([_pgac_helpdefault], m4_ifdef([pgac_defined_$1_$2_bool], [m4_defn([pgac_defined_$1_$2_bool])], [$3]))dnl -PGAC_ARG([$1], [$2], [m4_if(_pgac_helpdefault, yes, -)], [$4], [$5], [$6], +PGAC_ARG([$1], [$2], [m4_if(_pgac_helpdefault, yes, -)], [$4], [$5], [$6], [AC_MSG_ERROR([no argument expected for --$1-$2 option])], [m4_case([$3], yes, [pgac_arg_to_variable([$1], [$2])=yes diff --git a/config/install-sh b/config/install-sh index bdcfd39c63..fdca6338c2 100755 --- a/config/install-sh +++ b/config/install-sh @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -# $PostgreSQL: pgsql/config/install-sh,v 1.8 2009/08/26 22:24:42 petere Exp $ +# config/install-sh scriptversion=2009-08-26.20 diff --git a/config/missing b/config/missing index 5426c6d2ec..6df77e9473 100755 --- a/config/missing +++ b/config/missing @@ -1,6 +1,6 @@ #! /bin/sh -# $PostgreSQL: pgsql/config/missing,v 1.7 2010/02/22 21:16:50 momjian Exp $ +# config/missing # This is *not* the GNU `missing' script, although it is similar in # concept. You can call it from the makefiles to get consistent diff --git a/config/perl.m4 b/config/perl.m4 index 165034b0fd..d602a5bb1b 100644 --- a/config/perl.m4 +++ b/config/perl.m4 @@ -1,4 +1,4 @@ -# $PostgreSQL: pgsql/config/perl.m4,v 1.9 2010/02/23 18:35:06 tgl Exp $ +# config/perl.m4 # PGAC_PATH_PERL @@ -24,7 +24,7 @@ fi if test -z "$PERL"; then AC_MSG_WARN([ -*** Without Perl you will not be able to build PostgreSQL from CVS. +*** Without Perl you will not be able to build PostgreSQL from Git. *** You can obtain Perl from any CPAN mirror site. *** (If you are using the official distribution of PostgreSQL then you do not *** need to worry about this, because the Perl output is pre-generated.)]) diff --git a/config/prep_buildtree b/config/prep_buildtree index 57d7719673..5b72c392f6 100644 --- a/config/prep_buildtree +++ b/config/prep_buildtree @@ -22,7 +22,11 @@ sourcetree=`cd $1 && pwd` buildtree=`cd ${2:-'.'} && pwd` -for item in `find "$sourcetree" -type d \( -name CVS -prune -o -print \)`; do +# We must not auto-create the subdirectories holding built documentation. +# If we did, it would interfere with installation of prebuilt docs from +# the source tree, if a VPATH build is done from a distribution tarball. +# See bug #5595. +for item in `find "$sourcetree" -type d \( \( -name CVS -prune \) -o \( -name .git -prune \) -o -print \) | grep -v "$sourcetree/doc/src/sgml/\+"`; do subdir=`expr "$item" : "$sourcetree\(.*\)"` if test ! -d "$buildtree/$subdir"; then mkdir -p "$buildtree/$subdir" || exit 1 diff --git a/config/programs.m4 b/config/programs.m4 index 594729cbb1..565195d06d 100644 --- a/config/programs.m4 +++ b/config/programs.m4 @@ -1,4 +1,4 @@ -# $PostgreSQL: pgsql/config/programs.m4,v 1.28 2010/02/22 21:16:50 momjian Exp $ +# config/programs.m4 # PGAC_PATH_BISON @@ -27,7 +27,7 @@ fi if test -z "$BISON"; then AC_MSG_WARN([ -*** Without Bison you will not be able to build PostgreSQL from CVS nor +*** Without Bison you will not be able to build PostgreSQL from Git nor *** change any of the parser definition files. You can obtain Bison from *** a GNU mirror site. (If you are using the official distribution of *** PostgreSQL then you do not need to worry about this, because the Bison @@ -89,7 +89,7 @@ fi if test x"$pgac_cv_path_flex" = x"no"; then AC_MSG_WARN([ -*** Without Flex you will not be able to build PostgreSQL from CVS nor +*** Without Flex you will not be able to build PostgreSQL from Git nor *** change any of the scanner definition files. You can obtain Flex from *** a GNU mirror site. (If you are using the official distribution of *** PostgreSQL then you do not need to worry about this because the Flex @@ -117,7 +117,7 @@ AC_SUBST(FLEXFLAGS) AC_DEFUN([PGAC_CHECK_READLINE], [AC_REQUIRE([AC_CANONICAL_HOST]) -AC_CACHE_VAL([pgac_cv_check_readline], +AC_CACHE_CHECK([for library containing readline], [pgac_cv_check_readline], [pgac_cv_check_readline=no pgac_save_LIBS=$LIBS if test x"$with_libedit_preferred" != x"yes" @@ -125,7 +125,6 @@ then READLINE_ORDER="-lreadline -ledit" else READLINE_ORDER="-ledit -lreadline" fi for pgac_rllib in $READLINE_ORDER ; do - AC_MSG_CHECKING([for ${pgac_rllib}]) for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS" AC_TRY_LINK_FUNC([readline], [[ @@ -144,14 +143,11 @@ for pgac_rllib in $READLINE_ORDER ; do ]]) done if test "$pgac_cv_check_readline" != no ; then - AC_MSG_RESULT([yes ($pgac_cv_check_readline)]) break - else - AC_MSG_RESULT(no) fi done LIBS=$pgac_save_LIBS -])[]dnl AC_CACHE_VAL +])[]dnl AC_CACHE_CHECK if test "$pgac_cv_check_readline" != no ; then LIBS="$pgac_cv_check_readline $LIBS" @@ -167,8 +163,8 @@ fi # Readline versions < 2.1 don't have rl_completion_append_character AC_DEFUN([PGAC_VAR_RL_COMPLETION_APPEND_CHARACTER], -[AC_MSG_CHECKING([for rl_completion_append_character]) -AC_TRY_LINK([#include <stdio.h> +[AC_CACHE_CHECK([for rl_completion_append_character], pgac_cv_var_rl_completion_append_character, +[AC_TRY_LINK([#include <stdio.h> #ifdef HAVE_READLINE_READLINE_H # include <readline/readline.h> #elif defined(HAVE_READLINE_H) @@ -176,10 +172,12 @@ AC_TRY_LINK([#include <stdio.h> #endif ], [rl_completion_append_character = 'x';], -[AC_MSG_RESULT(yes) +[pgac_cv_var_rl_completion_append_character=yes], +[pgac_cv_var_rl_completion_append_character=no])]) +if test x"$pgac_cv_var_rl_completion_append_character" = x"yes"; then AC_DEFINE(HAVE_RL_COMPLETION_APPEND_CHARACTER, 1, - [Define to 1 if you have the global variable 'rl_completion_append_character'.])], -[AC_MSG_RESULT(no)])])# PGAC_VAR_RL_COMPLETION_APPEND_CHARACTER + [Define to 1 if you have the global variable 'rl_completion_append_character'.]) +fi])# PGAC_VAR_RL_COMPLETION_APPEND_CHARACTER diff --git a/config/python.m4 b/config/python.m4 index 7b6a14ed21..ec357c2e48 100644 --- a/config/python.m4 +++ b/config/python.m4 @@ -1,7 +1,7 @@ # # Autoconf macros for configuring the build of Python extension modules # -# $PostgreSQL: pgsql/config/python.m4,v 1.18 2010/03/17 22:02:44 petere Exp $ +# config/python.m4 # # PGAC_PATH_PYTHON diff --git a/config/tcl.m4 b/config/tcl.m4 index ae0d3b78be..e8860573a6 100644 --- a/config/tcl.m4 +++ b/config/tcl.m4 @@ -1,4 +1,4 @@ -# $PostgreSQL: pgsql/config/tcl.m4,v 1.8 2009/02/03 01:24:57 adunstan Exp $ +# config/tcl.m4 # Autoconf macros to check for Tcl related things @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.63 for PostgreSQL 9.0beta3. +# Generated by GNU Autoconf 2.63 for PostgreSQL 9.1beta2. # # Report bugs to <pgsql-bugs@postgresql.org>. # @@ -9,7 +9,7 @@ # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. # -# Copyright (c) 1996-2010, PostgreSQL Global Development Group +# Copyright (c) 1996-2011, PostgreSQL Global Development Group ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## @@ -599,8 +599,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='PostgreSQL' PACKAGE_TARNAME='postgresql' -PACKAGE_VERSION='9.0beta3' -PACKAGE_STRING='PostgreSQL 9.0beta3' +PACKAGE_VERSION='9.1beta2' +PACKAGE_STRING='PostgreSQL 9.1beta2' PACKAGE_BUGREPORT='pgsql-bugs@postgresql.org' ac_unique_file="src/backend/access/common/heaptuple.c" @@ -668,6 +668,7 @@ PTHREAD_CFLAGS PTHREAD_LIBS PTHREAD_CC acx_pthread_config +have_win32_dbghelp HAVE_IPV6 LIBOBJS OSSP_UUID_LIBS @@ -715,6 +716,7 @@ with_libxslt with_libxml XML2_CONFIG with_ossp_uuid +with_selinux with_openssl with_bonjour with_ldap @@ -837,6 +839,7 @@ with_pam with_ldap with_bonjour with_openssl +with_selinux with_readline with_libedit_preferred with_ossp_uuid @@ -1413,7 +1416,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures PostgreSQL 9.0beta3 to adapt to many kinds of systems. +\`configure' configures PostgreSQL 9.1beta2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1478,7 +1481,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of PostgreSQL 9.0beta3:";; + short | recursive ) echo "Configuration of PostgreSQL 9.1beta2:";; esac cat <<\_ACEOF @@ -1533,11 +1536,11 @@ Optional Packages: --with-ldap build with LDAP support --with-bonjour build with Bonjour support --with-openssl build with OpenSSL support + --with-selinux build with SELinux support --without-readline do not use GNU Readline nor BSD Libedit for editing --with-libedit-preferred prefer BSD Libedit over GNU Readline - --with-ossp-uuid use OSSP UUID library when building - contrib/uuid-ossp + --with-ossp-uuid build contrib/uuid-ossp, requires OSSP UUID library --with-libxml build with XML support --with-libxslt use XSLT support when building contrib/xml2 --with-system-tzdata=DIR @@ -1625,7 +1628,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -PostgreSQL configure 9.0beta3 +PostgreSQL configure 9.1beta2 generated by GNU Autoconf 2.63 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1633,7 +1636,7 @@ Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. -Copyright (c) 1996-2010, PostgreSQL Global Development Group +Copyright (c) 1996-2011, PostgreSQL Global Development Group _ACEOF exit fi @@ -1641,7 +1644,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by PostgreSQL $as_me 9.0beta3, which was +It was created by PostgreSQL $as_me 9.1beta2, which was generated by GNU Autoconf 2.63. Invocation command line was $ $0 $@ @@ -2191,6 +2194,7 @@ case $host_os in bsdi*) template=bsdi ;; cygwin*) template=cygwin ;; darwin*) template=darwin ;; +dragonfly*) template=netbsd ;; dgux*) template=dgux ;; freebsd*) template=freebsd ;; hpux*) template=hpux ;; @@ -4000,10 +4004,15 @@ fi if test "$GCC" = yes -a "$ICC" = no; then CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wpointer-arith" # These work in some but not all gcc versions - { $as_echo "$as_me:$LINENO: checking if $CC supports -Wdeclaration-after-statement" >&5 -$as_echo_n "checking if $CC supports -Wdeclaration-after-statement... " >&6; } -pgac_save_CFLAGS=$CFLAGS + { $as_echo "$as_me:$LINENO: checking whether $CC supports -Wdeclaration-after-statement" >&5 +$as_echo_n "checking whether $CC supports -Wdeclaration-after-statement... " >&6; } +if test "${pgac_cv_prog_cc_cflags__Wdeclaration_after_statement+set}" = set; then + $as_echo_n "(cached) " >&6 +else + pgac_save_CFLAGS=$CFLAGS CFLAGS="$pgac_save_CFLAGS -Wdeclaration-after-statement" +ac_save_c_werror_flag=$ac_c_werror_flag +ac_c_werror_flag=yes cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4037,23 +4046,33 @@ $as_echo "$ac_try_echo") >&5 test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + pgac_cv_prog_cc_cflags__Wdeclaration_after_statement=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - CFLAGS="$pgac_save_CFLAGS" - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + pgac_cv_prog_cc_cflags__Wdeclaration_after_statement=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_c_werror_flag=$ac_save_c_werror_flag +CFLAGS="$pgac_save_CFLAGS" +fi +{ $as_echo "$as_me:$LINENO: result: $pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" >&5 +$as_echo "$pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" >&6; } +if test x"$pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" = x"yes"; then + CFLAGS="$CFLAGS -Wdeclaration-after-statement" +fi - { $as_echo "$as_me:$LINENO: checking if $CC supports -Wendif-labels" >&5 -$as_echo_n "checking if $CC supports -Wendif-labels... " >&6; } -pgac_save_CFLAGS=$CFLAGS + { $as_echo "$as_me:$LINENO: checking whether $CC supports -Wendif-labels" >&5 +$as_echo_n "checking whether $CC supports -Wendif-labels... " >&6; } +if test "${pgac_cv_prog_cc_cflags__Wendif_labels+set}" = set; then + $as_echo_n "(cached) " >&6 +else + pgac_save_CFLAGS=$CFLAGS CFLAGS="$pgac_save_CFLAGS -Wendif-labels" +ac_save_c_werror_flag=$ac_c_werror_flag +ac_c_werror_flag=yes cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4087,24 +4106,95 @@ $as_echo "$ac_try_echo") >&5 test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + pgac_cv_prog_cc_cflags__Wendif_labels=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - CFLAGS="$pgac_save_CFLAGS" - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + pgac_cv_prog_cc_cflags__Wendif_labels=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_c_werror_flag=$ac_save_c_werror_flag +CFLAGS="$pgac_save_CFLAGS" +fi +{ $as_echo "$as_me:$LINENO: result: $pgac_cv_prog_cc_cflags__Wendif_labels" >&5 +$as_echo "$pgac_cv_prog_cc_cflags__Wendif_labels" >&6; } +if test x"$pgac_cv_prog_cc_cflags__Wendif_labels" = x"yes"; then + CFLAGS="$CFLAGS -Wendif-labels" +fi + + # This was included in -Wall/-Wformat in older GCC versions + { $as_echo "$as_me:$LINENO: checking whether $CC supports -Wformat-security" >&5 +$as_echo_n "checking whether $CC supports -Wformat-security... " >&6; } +if test "${pgac_cv_prog_cc_cflags__Wformat_security+set}" = set; then + $as_echo_n "(cached) " >&6 +else + pgac_save_CFLAGS=$CFLAGS +CFLAGS="$pgac_save_CFLAGS -Wformat-security" +ac_save_c_werror_flag=$ac_c_werror_flag +ac_c_werror_flag=yes +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + pgac_cv_prog_cc_cflags__Wformat_security=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + pgac_cv_prog_cc_cflags__Wformat_security=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_c_werror_flag=$ac_save_c_werror_flag +CFLAGS="$pgac_save_CFLAGS" +fi +{ $as_echo "$as_me:$LINENO: result: $pgac_cv_prog_cc_cflags__Wformat_security" >&5 +$as_echo "$pgac_cv_prog_cc_cflags__Wformat_security" >&6; } +if test x"$pgac_cv_prog_cc_cflags__Wformat_security" = x"yes"; then + CFLAGS="$CFLAGS -Wformat-security" +fi # Disable strict-aliasing rules; needed for gcc 3.3+ - { $as_echo "$as_me:$LINENO: checking if $CC supports -fno-strict-aliasing" >&5 -$as_echo_n "checking if $CC supports -fno-strict-aliasing... " >&6; } -pgac_save_CFLAGS=$CFLAGS + { $as_echo "$as_me:$LINENO: checking whether $CC supports -fno-strict-aliasing" >&5 +$as_echo_n "checking whether $CC supports -fno-strict-aliasing... " >&6; } +if test "${pgac_cv_prog_cc_cflags__fno_strict_aliasing+set}" = set; then + $as_echo_n "(cached) " >&6 +else + pgac_save_CFLAGS=$CFLAGS CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing" +ac_save_c_werror_flag=$ac_c_werror_flag +ac_c_werror_flag=yes cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4138,24 +4228,34 @@ $as_echo "$ac_try_echo") >&5 test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + pgac_cv_prog_cc_cflags__fno_strict_aliasing=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - CFLAGS="$pgac_save_CFLAGS" - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + pgac_cv_prog_cc_cflags__fno_strict_aliasing=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_c_werror_flag=$ac_save_c_werror_flag +CFLAGS="$pgac_save_CFLAGS" +fi +{ $as_echo "$as_me:$LINENO: result: $pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&5 +$as_echo "$pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&6; } +if test x"$pgac_cv_prog_cc_cflags__fno_strict_aliasing" = x"yes"; then + CFLAGS="$CFLAGS -fno-strict-aliasing" +fi # Disable optimizations that assume no overflow; needed for gcc 4.3+ - { $as_echo "$as_me:$LINENO: checking if $CC supports -fwrapv" >&5 -$as_echo_n "checking if $CC supports -fwrapv... " >&6; } -pgac_save_CFLAGS=$CFLAGS + { $as_echo "$as_me:$LINENO: checking whether $CC supports -fwrapv" >&5 +$as_echo_n "checking whether $CC supports -fwrapv... " >&6; } +if test "${pgac_cv_prog_cc_cflags__fwrapv+set}" = set; then + $as_echo_n "(cached) " >&6 +else + pgac_save_CFLAGS=$CFLAGS CFLAGS="$pgac_save_CFLAGS -fwrapv" +ac_save_c_werror_flag=$ac_c_werror_flag +ac_c_werror_flag=yes cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4189,26 +4289,36 @@ $as_echo "$ac_try_echo") >&5 test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + pgac_cv_prog_cc_cflags__fwrapv=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - CFLAGS="$pgac_save_CFLAGS" - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + pgac_cv_prog_cc_cflags__fwrapv=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_c_werror_flag=$ac_save_c_werror_flag +CFLAGS="$pgac_save_CFLAGS" +fi +{ $as_echo "$as_me:$LINENO: result: $pgac_cv_prog_cc_cflags__fwrapv" >&5 +$as_echo "$pgac_cv_prog_cc_cflags__fwrapv" >&6; } +if test x"$pgac_cv_prog_cc_cflags__fwrapv" = x"yes"; then + CFLAGS="$CFLAGS -fwrapv" +fi elif test "$ICC" = yes; then # Intel's compiler has a bug/misoptimization in checking for # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS. - { $as_echo "$as_me:$LINENO: checking if $CC supports -mp1" >&5 -$as_echo_n "checking if $CC supports -mp1... " >&6; } -pgac_save_CFLAGS=$CFLAGS + { $as_echo "$as_me:$LINENO: checking whether $CC supports -mp1" >&5 +$as_echo_n "checking whether $CC supports -mp1... " >&6; } +if test "${pgac_cv_prog_cc_cflags__mp1+set}" = set; then + $as_echo_n "(cached) " >&6 +else + pgac_save_CFLAGS=$CFLAGS CFLAGS="$pgac_save_CFLAGS -mp1" +ac_save_c_werror_flag=$ac_c_werror_flag +ac_c_werror_flag=yes cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4242,24 +4352,34 @@ $as_echo "$ac_try_echo") >&5 test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + pgac_cv_prog_cc_cflags__mp1=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - CFLAGS="$pgac_save_CFLAGS" - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + pgac_cv_prog_cc_cflags__mp1=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_c_werror_flag=$ac_save_c_werror_flag +CFLAGS="$pgac_save_CFLAGS" +fi +{ $as_echo "$as_me:$LINENO: result: $pgac_cv_prog_cc_cflags__mp1" >&5 +$as_echo "$pgac_cv_prog_cc_cflags__mp1" >&6; } +if test x"$pgac_cv_prog_cc_cflags__mp1" = x"yes"; then + CFLAGS="$CFLAGS -mp1" +fi # Make sure strict aliasing is off (though this is said to be the default) - { $as_echo "$as_me:$LINENO: checking if $CC supports -fno-strict-aliasing" >&5 -$as_echo_n "checking if $CC supports -fno-strict-aliasing... " >&6; } -pgac_save_CFLAGS=$CFLAGS + { $as_echo "$as_me:$LINENO: checking whether $CC supports -fno-strict-aliasing" >&5 +$as_echo_n "checking whether $CC supports -fno-strict-aliasing... " >&6; } +if test "${pgac_cv_prog_cc_cflags__fno_strict_aliasing+set}" = set; then + $as_echo_n "(cached) " >&6 +else + pgac_save_CFLAGS=$CFLAGS CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing" +ac_save_c_werror_flag=$ac_c_werror_flag +ac_c_werror_flag=yes cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4293,25 +4413,35 @@ $as_echo "$ac_try_echo") >&5 test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + pgac_cv_prog_cc_cflags__fno_strict_aliasing=yes else $as_echo "$as_me: failed program was:" >& |
