11
11
# This configure script is free software; the Free Software Foundation
12
12
# gives unlimited permission to copy, distribute and modify it.
13
13
#
14
- # Copyright (c) 1996-2017 , PostgreSQL Global Development Group
14
+ # Copyright (c) 1996-2018 , PostgreSQL Global Development Group
15
15
# # -------------------- ##
16
16
# # M4sh Initialization. ##
17
17
# # -------------------- ##
@@ -1635,7 +1635,7 @@ Copyright (C) 2012 Free Software Foundation, Inc.
1635
1635
This configure script is free software; the Free Software Foundation
1636
1636
gives unlimited permission to copy, distribute and modify it.
1637
1637
1638
- Copyright (c) 1996-2017 , PostgreSQL Global Development Group
1638
+ Copyright (c) 1996-2018 , PostgreSQL Global Development Group
1639
1639
_ACEOF
1640
1640
exit
1641
1641
fi
@@ -10125,12 +10125,13 @@ else
10125
10125
fi
10126
10126
10127
10127
fi
10128
- for ac_func in SSL_get_current_compression
10128
+ for ac_func in SSL_get_current_compression X509_get_signature_nid
10129
10129
do :
10130
- ac_fn_c_check_func " $LINENO " " SSL_get_current_compression" " ac_cv_func_SSL_get_current_compression"
10131
- if test " x$ac_cv_func_SSL_get_current_compression " = xyes; then :
10130
+ as_ac_var=` $as_echo " ac_cv_func_$ac_func " | $as_tr_sh `
10131
+ ac_fn_c_check_func " $LINENO " " $ac_func " " $as_ac_var "
10132
+ if eval test \" x\$ " $as_ac_var " \" = x" yes" ; then :
10132
10133
cat >> confdefs.h << _ACEOF
10133
- #define HAVE_SSL_GET_CURRENT_COMPRESSION 1
10134
+ #define ` $as_echo " HAVE_ $ac_func " | $as_tr_cpp ` 1
10134
10135
_ACEOF
10135
10136
10136
10137
fi
@@ -10424,6 +10425,17 @@ fi
10424
10425
else
10425
10426
LDAP_LIBS_FE=" -lldap $EXTRA_LDAP_LIBS "
10426
10427
fi
10428
+ for ac_func in ldap_initialize
10429
+ do :
10430
+ ac_fn_c_check_func " $LINENO " " ldap_initialize" " ac_cv_func_ldap_initialize"
10431
+ if test " x$ac_cv_func_ldap_initialize " = xyes; then :
10432
+ cat >> confdefs.h << _ACEOF
10433
+ #define HAVE_LDAP_INITIALIZE 1
10434
+ _ACEOF
10435
+
10436
+ fi
10437
+ done
10438
+
10427
10439
else
10428
10440
{ $as_echo " $as_me :${as_lineno-$LINENO } : checking for ldap_bind in -lwldap32" >&5
10429
10441
$as_echo_n " checking for ldap_bind in -lwldap32... " >&6 ; }
@@ -14984,12 +14996,15 @@ else
14984
14996
/* end confdefs.h. */
14985
14997
14986
14998
/*
14999
+ * We don't actually run this test, just link it to verify that any support
15000
+ * functions needed for __int128 are present.
15001
+ *
14987
15002
* These are globals to discourage the compiler from folding all the
14988
15003
* arithmetic tests down to compile-time constants. We do not have
14989
- * convenient support for 64bit literals at this point...
15004
+ * convenient support for 128bit literals at this point...
14990
15005
*/
14991
15006
__int128 a = 48828125;
14992
- __int128 b = 97656255 ;
15007
+ __int128 b = 97656250 ;
14993
15008
14994
15009
int
14995
15010
main ()
@@ -14998,13 +15013,12 @@ main ()
14998
15013
__int128 c,d;
14999
15014
a = (a << 12) + 1; /* 200000000001 */
15000
15015
b = (b << 12) + 5; /* 400000000005 */
15001
- /* use the most relevant arithmetic ops */
15016
+ /* try the most relevant arithmetic ops */
15002
15017
c = a * b;
15003
15018
d = (c + b) / b;
15004
- /* return different values, to prevent optimizations */
15019
+ /* must use the results, else compiler may optimize arithmetic away */
15005
15020
if (d != a+1)
15006
- return 0;
15007
- return 1;
15021
+ return 1;
15008
15022
15009
15023
;
15010
15024
return 0;
@@ -15021,10 +15035,65 @@ fi
15021
15035
{ $as_echo " $as_me :${as_lineno-$LINENO } : result: $pgac_cv__128bit_int " >&5
15022
15036
$as_echo " $pgac_cv__128bit_int " >&6 ; }
15023
15037
if test x" $pgac_cv__128bit_int " = xyes ; then
15038
+ # Use of non-default alignment with __int128 tickles bugs in some compilers.
15039
+ # If not cross-compiling, we can test for bugs and disable use of __int128
15040
+ # with buggy compilers. If cross-compiling, hope for the best.
15041
+ # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83925
15042
+ { $as_echo " $as_me :${as_lineno-$LINENO } : checking for __int128 alignment bug" >&5
15043
+ $as_echo_n " checking for __int128 alignment bug... " >&6 ; }
15044
+ if ${pgac_cv__128bit_int_bug+: } false ; then :
15045
+ $as_echo_n " (cached) " >&6
15046
+ else
15047
+ if test " $cross_compiling " = yes; then :
15048
+ pgac_cv__128bit_int_bug=" assuming ok"
15049
+ else
15050
+ cat confdefs.h - << _ACEOF >conftest.$ac_ext
15051
+ /* end confdefs.h. */
15052
+
15053
+ /* This must match the corresponding code in c.h: */
15054
+ #if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__IBMC__)
15055
+ #define pg_attribute_aligned(a) __attribute__((aligned(a)))
15056
+ #endif
15057
+ typedef __int128 int128a
15058
+ #if defined(pg_attribute_aligned)
15059
+ pg_attribute_aligned(8)
15060
+ #endif
15061
+ ;
15062
+ int128a holder;
15063
+ void pass_by_val(void *buffer, int128a par) { holder = par; }
15064
+
15065
+ int
15066
+ main ()
15067
+ {
15068
+
15069
+ long int i64 = 97656225L << 12;
15070
+ int128a q;
15071
+ pass_by_val(main, (int128a) i64);
15072
+ q = (int128a) i64;
15073
+ if (q != holder)
15074
+ return 1;
15075
+
15076
+ ;
15077
+ return 0;
15078
+ }
15079
+ _ACEOF
15080
+ if ac_fn_c_try_run " $LINENO " ; then :
15081
+ pgac_cv__128bit_int_bug=ok
15082
+ else
15083
+ pgac_cv__128bit_int_bug=broken
15084
+ fi
15085
+ rm -f core * .core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15086
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
15087
+ fi
15088
+
15089
+ fi
15090
+ { $as_echo " $as_me :${as_lineno-$LINENO } : result: $pgac_cv__128bit_int_bug " >&5
15091
+ $as_echo " $pgac_cv__128bit_int_bug " >&6 ; }
15092
+ if test x" $pgac_cv__128bit_int_bug " ! = xbroken ; then
15024
15093
15025
15094
$as_echo " #define PG_INT128_TYPE __int128" >> confdefs.h
15026
15095
15027
- # The cast to long int works around a bug in the HP C Compiler,
15096
+ # The cast to long int works around a bug in the HP C Compiler,
15028
15097
# see AC_CHECK_SIZEOF for more information.
15029
15098
{ $as_echo " $as_me :${as_lineno-$LINENO } : checking alignment of PG_INT128_TYPE" >&5
15030
15099
$as_echo_n " checking alignment of PG_INT128_TYPE... " >&6 ; }
@@ -15059,6 +15128,7 @@ cat >>confdefs.h <<_ACEOF
15059
15128
_ACEOF
15060
15129
15061
15130
15131
+ fi
15062
15132
fi
15063
15133
15064
15134
# Check for various atomic operations now that we have checked how to declare
0 commit comments