diff options
Diffstat (limited to 'configure')
| -rwxr-xr-x | configure | 331 |
1 files changed, 27 insertions, 304 deletions
diff --git a/configure b/configure index 6b87e5c9a8c..564319c0560 100755 --- a/configure +++ b/configure @@ -2987,7 +2987,6 @@ else # --with-template not given case $host_os in - aix*) template=aix ;; cygwin*|msys*) template=cygwin ;; darwin*) template=darwin ;; dragonfly*) template=netbsd ;; @@ -3917,10 +3916,10 @@ fi -case $template in - aix) pgac_cc_list="gcc xlc"; pgac_cxx_list="g++ xlC";; - *) pgac_cc_list="gcc cc"; pgac_cxx_list="g++ c++";; -esac +# If you don't specify a list of compilers to test, the AC_PROG_CC and +# AC_PROG_CXX macros test for a long list of unsupported compilers. +pgac_cc_list="gcc cc" +pgac_cxx_list="g++ c++" ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -6874,190 +6873,6 @@ if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then fi -elif test "$PORTNAME" = "aix"; then - # AIX's xlc has to have strict aliasing turned off too - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qnoansialias, for CFLAGS" >&5 -$as_echo_n "checking whether ${CC} supports -qnoansialias, for CFLAGS... " >&6; } -if ${pgac_cv_prog_CC_cflags__qnoansialias+:} false; then : - $as_echo_n "(cached) " >&6 -else - pgac_save_CFLAGS=$CFLAGS -pgac_save_CC=$CC -CC=${CC} -CFLAGS="${CFLAGS} -qnoansialias" -ac_save_c_werror_flag=$ac_c_werror_flag -ac_c_werror_flag=yes -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - pgac_cv_prog_CC_cflags__qnoansialias=yes -else - pgac_cv_prog_CC_cflags__qnoansialias=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" -CC="$pgac_save_CC" -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qnoansialias" >&5 -$as_echo "$pgac_cv_prog_CC_cflags__qnoansialias" >&6; } -if test x"$pgac_cv_prog_CC_cflags__qnoansialias" = x"yes"; then - CFLAGS="${CFLAGS} -qnoansialias" -fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qnoansialias, for CXXFLAGS" >&5 -$as_echo_n "checking whether ${CXX} supports -qnoansialias, for CXXFLAGS... " >&6; } -if ${pgac_cv_prog_CXX_cxxflags__qnoansialias+:} false; then : - $as_echo_n "(cached) " >&6 -else - pgac_save_CXXFLAGS=$CXXFLAGS -pgac_save_CXX=$CXX -CXX=${CXX} -CXXFLAGS="${CXXFLAGS} -qnoansialias" -ac_save_cxx_werror_flag=$ac_cxx_werror_flag -ac_cxx_werror_flag=yes -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - pgac_cv_prog_CXX_cxxflags__qnoansialias=yes -else - pgac_cv_prog_CXX_cxxflags__qnoansialias=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -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 - -ac_cxx_werror_flag=$ac_save_cxx_werror_flag -CXXFLAGS="$pgac_save_CXXFLAGS" -CXX="$pgac_save_CXX" -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qnoansialias" >&5 -$as_echo "$pgac_cv_prog_CXX_cxxflags__qnoansialias" >&6; } -if test x"$pgac_cv_prog_CXX_cxxflags__qnoansialias" = x"yes"; then - CXXFLAGS="${CXXFLAGS} -qnoansialias" -fi - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qlonglong, for CFLAGS" >&5 -$as_echo_n "checking whether ${CC} supports -qlonglong, for CFLAGS... " >&6; } -if ${pgac_cv_prog_CC_cflags__qlonglong+:} false; then : - $as_echo_n "(cached) " >&6 -else - pgac_save_CFLAGS=$CFLAGS -pgac_save_CC=$CC -CC=${CC} -CFLAGS="${CFLAGS} -qlonglong" -ac_save_c_werror_flag=$ac_c_werror_flag -ac_c_werror_flag=yes -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - pgac_cv_prog_CC_cflags__qlonglong=yes -else - pgac_cv_prog_CC_cflags__qlonglong=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" -CC="$pgac_save_CC" -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qlonglong" >&5 -$as_echo "$pgac_cv_prog_CC_cflags__qlonglong" >&6; } -if test x"$pgac_cv_prog_CC_cflags__qlonglong" = x"yes"; then - CFLAGS="${CFLAGS} -qlonglong" -fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qlonglong, for CXXFLAGS" >&5 -$as_echo_n "checking whether ${CXX} supports -qlonglong, for CXXFLAGS... " >&6; } -if ${pgac_cv_prog_CXX_cxxflags__qlonglong+:} false; then : - $as_echo_n "(cached) " >&6 -else - pgac_save_CXXFLAGS=$CXXFLAGS -pgac_save_CXX=$CXX -CXX=${CXX} -CXXFLAGS="${CXXFLAGS} -qlonglong" -ac_save_cxx_werror_flag=$ac_cxx_werror_flag -ac_cxx_werror_flag=yes -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - pgac_cv_prog_CXX_cxxflags__qlonglong=yes -else - pgac_cv_prog_CXX_cxxflags__qlonglong=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -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 - -ac_cxx_werror_flag=$ac_save_cxx_werror_flag -CXXFLAGS="$pgac_save_CXXFLAGS" -CXX="$pgac_save_CXX" -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qlonglong" >&5 -$as_echo "$pgac_cv_prog_CXX_cxxflags__qlonglong" >&6; } -if test x"$pgac_cv_prog_CXX_cxxflags__qlonglong" = x"yes"; then - CXXFLAGS="${CXXFLAGS} -qlonglong" -fi - - fi # If the compiler knows how to hide symbols, add the switch needed for that to @@ -7212,103 +7027,6 @@ if test x"$pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden" = x"yes"; then fi have_visibility_attribute=$pgac_cv_prog_CC_cflags__fvisibility_hidden -elif test "$PORTNAME" = "aix"; then - # Note that xlc accepts -fvisibility=hidden as a file. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qvisibility=hidden, for CFLAGS_SL_MODULE" >&5 -$as_echo_n "checking whether ${CC} supports -qvisibility=hidden, for CFLAGS_SL_MODULE... " >&6; } -if ${pgac_cv_prog_CC_cflags__qvisibility_hidden+:} false; then : - $as_echo_n "(cached) " >&6 -else - pgac_save_CFLAGS=$CFLAGS -pgac_save_CC=$CC -CC=${CC} -CFLAGS="${CFLAGS_SL_MODULE} -qvisibility=hidden" -ac_save_c_werror_flag=$ac_c_werror_flag -ac_c_werror_flag=yes -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - pgac_cv_prog_CC_cflags__qvisibility_hidden=yes -else - pgac_cv_prog_CC_cflags__qvisibility_hidden=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" -CC="$pgac_save_CC" -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qvisibility_hidden" >&5 -$as_echo "$pgac_cv_prog_CC_cflags__qvisibility_hidden" >&6; } -if test x"$pgac_cv_prog_CC_cflags__qvisibility_hidden" = x"yes"; then - CFLAGS_SL_MODULE="${CFLAGS_SL_MODULE} -qvisibility=hidden" -fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qvisibility=hidden, for CXXFLAGS_SL_MODULE" >&5 -$as_echo_n "checking whether ${CXX} supports -qvisibility=hidden, for CXXFLAGS_SL_MODULE... " >&6; } -if ${pgac_cv_prog_CXX_cxxflags__qvisibility_hidden+:} false; then : - $as_echo_n "(cached) " >&6 -else - pgac_save_CXXFLAGS=$CXXFLAGS -pgac_save_CXX=$CXX -CXX=${CXX} -CXXFLAGS="${CXXFLAGS_SL_MODULE} -qvisibility=hidden" -ac_save_cxx_werror_flag=$ac_cxx_werror_flag -ac_cxx_werror_flag=yes -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - pgac_cv_prog_CXX_cxxflags__qvisibility_hidden=yes -else - pgac_cv_prog_CXX_cxxflags__qvisibility_hidden=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -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 - -ac_cxx_werror_flag=$ac_save_cxx_werror_flag -CXXFLAGS="$pgac_save_CXXFLAGS" -CXX="$pgac_save_CXX" -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qvisibility_hidden" >&5 -$as_echo "$pgac_cv_prog_CXX_cxxflags__qvisibility_hidden" >&6; } -if test x"$pgac_cv_prog_CXX_cxxflags__qvisibility_hidden" = x"yes"; then - CXXFLAGS_SL_MODULE="${CXXFLAGS_SL_MODULE} -qvisibility=hidden" -fi - - have_visibility_attribute=$pgac_cv_prog_CC_cflags__qvisibility_hidden - # Old xlc versions (<13.1) don't have support for -qvisibility. Use expfull to force - # all extension module symbols to be exported. - if test "$pgac_cv_prog_CC_cflags__qvisibility_hidden" != "yes"; then - CFLAGS_SL_MODULE="$CFLAGS_SL_MODULE -Wl,-b,expfull" - fi fi if test "$have_visibility_attribute" = "yes"; then @@ -13166,8 +12884,7 @@ fi fi -# Note: We can test for libldap_r only after we know PTHREAD_LIBS; -# also, on AIX, we may need to have openssl in LIBS for this step. +# Note: We can test for libldap_r only after we know PTHREAD_LIBS if test "$with_ldap" = yes ; then _LIBS="$LIBS" if test "$PORTNAME" != "win32"; then @@ -15025,10 +14742,6 @@ fi # spelling it understands, because it conflicts with # __declspec(restrict). Therefore we define pg_restrict to the # appropriate definition, which presumably won't conflict. -# -# Allow platforms with buggy compilers to force restrict to not be -# used by setting $FORCE_DISABLE_RESTRICT=yes in the relevant -# template. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 $as_echo_n "checking for C/C++ restrict keyword... " >&6; } if ${ac_cv_c_restrict+:} false; then : @@ -15075,7 +14788,7 @@ _ACEOF ;; esac -if test "$ac_cv_c_restrict" = "no" -o "x$FORCE_DISABLE_RESTRICT" = "xyes"; then +if test "$ac_cv_c_restrict" = "no"; then pg_restrict="" else pg_restrict="$ac_cv_c_restrict" @@ -17262,18 +16975,28 @@ _ACEOF # Compute maximum alignment of any basic type. -# We assume long's alignment is at least as strong as char, short, or int; -# but we must check long long (if it is being used for int64) and double. -# Note that we intentionally do not consider any types wider than 64 bits, -# as allowing MAXIMUM_ALIGNOF to exceed 8 would be too much of a penalty -# for disk and memory space. +# +# We require 'double' to have the strictest alignment among base types, +# because otherwise the C ABI might impose 8-byte alignment on some of the +# other C types that correspond to TYPALIGN_DOUBLE SQL types. That could +# cause a mismatch between the tuple layout and the C struct layout of a +# catalog tuple. We used to carefully order catalog columns such that any +# fixed-width, attalign=4 columns were at offsets divisible by 8 regardless +# of MAXIMUM_ALIGNOF to avoid that, but we no longer support any platforms +# where TYPALIGN_DOUBLE != MAXIMUM_ALIGNOF. +# +# We assume without checking that long's alignment is at least as strong as +# char, short, or int. Note that we intentionally do not consider any types +# wider than 64 bits, as allowing MAXIMUM_ALIGNOF to exceed 8 would be too +# much of a penalty for disk and memory space. + +MAX_ALIGNOF=$ac_cv_alignof_double -MAX_ALIGNOF=$ac_cv_alignof_long -if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then - MAX_ALIGNOF=$ac_cv_alignof_double +if test $ac_cv_alignof_long -gt $MAX_ALIGNOF ; then + as_fn_error $? "alignment of 'long' is greater than the alignment of 'double'" "$LINENO" 5 fi -if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then - MAX_ALIGNOF="$ac_cv_alignof_long_long_int" +if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $ac_cv_alignof_long_long_int -gt $MAX_ALIGNOF ; then + as_fn_error $? "alignment of 'long long int' is greater than the alignment of 'double'" "$LINENO" 5 fi cat >>confdefs.h <<_ACEOF @@ -17391,7 +17114,7 @@ else /* end confdefs.h. */ /* This must match the corresponding code in c.h: */ -#if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__IBMC__) +#if defined(__GNUC__) || defined(__SUNPRO_C) #define pg_attribute_aligned(a) __attribute__((aligned(a))) #elif defined(_MSC_VER) #define pg_attribute_aligned(a) __declspec(align(a)) |
