|
|
@@ -1739,6 +1739,133 @@ $as_echo "$ac_res" >&6; }
|
|
|
|
|
|
} # ac_fn_cxx_check_type
|
|
|
|
|
|
+# ac_fn_c_find_intX_t LINENO BITS VAR
|
|
|
+# -----------------------------------
|
|
|
+# Finds a signed integer type with width BITS, setting cache variable VAR
|
|
|
+# accordingly.
|
|
|
+ac_fn_c_find_intX_t ()
|
|
|
+{
|
|
|
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
|
|
|
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
|
|
|
+$as_echo_n "checking for int$2_t... " >&6; }
|
|
|
+if eval \${$3+:} false; then :
|
|
|
+ $as_echo_n "(cached) " >&6
|
|
|
+else
|
|
|
+ eval "$3=no"
|
|
|
+ # Order is important - never check a type that is potentially smaller
|
|
|
+ # than half of the expected target width.
|
|
|
+ for ac_type in int$2_t 'int' 'long int' \
|
|
|
+ 'long long int' 'short int' 'signed char'; do
|
|
|
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
|
+/* end confdefs.h. */
|
|
|
+$ac_includes_default
|
|
|
+ enum { N = $2 / 2 - 1 };
|
|
|
+int
|
|
|
+main ()
|
|
|
+{
|
|
|
+static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
|
|
|
+test_array [0] = 0
|
|
|
+
|
|
|
+ ;
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+_ACEOF
|
|
|
+if ac_fn_cxx_try_compile "$LINENO"; then :
|
|
|
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
|
+/* end confdefs.h. */
|
|
|
+$ac_includes_default
|
|
|
+ enum { N = $2 / 2 - 1 };
|
|
|
+int
|
|
|
+main ()
|
|
|
+{
|
|
|
+static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
|
|
|
+ < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
|
|
|
+test_array [0] = 0
|
|
|
+
|
|
|
+ ;
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+_ACEOF
|
|
|
+if ac_fn_cxx_try_compile "$LINENO"; then :
|
|
|
+
|
|
|
+else
|
|
|
+ case $ac_type in #(
|
|
|
+ int$2_t) :
|
|
|
+ eval "$3=yes" ;; #(
|
|
|
+ *) :
|
|
|
+ eval "$3=\$ac_type" ;;
|
|
|
+esac
|
|
|
+fi
|
|
|
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
|
|
+fi
|
|
|
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
|
|
+ if eval test \"x\$"$3"\" = x"no"; then :
|
|
|
+
|
|
|
+else
|
|
|
+ break
|
|
|
+fi
|
|
|
+ done
|
|
|
+fi
|
|
|
+eval ac_res=\$$3
|
|
|
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
|
|
|
+$as_echo "$ac_res" >&6; }
|
|
|
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
|
|
|
+
|
|
|
+} # ac_fn_c_find_intX_t
|
|
|
+
|
|
|
+# ac_fn_c_find_uintX_t LINENO BITS VAR
|
|
|
+# ------------------------------------
|
|
|
+# Finds an unsigned integer type with width BITS, setting cache variable VAR
|
|
|
+# accordingly.
|
|
|
+ac_fn_c_find_uintX_t ()
|
|
|
+{
|
|
|
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
|
|
|
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
|
|
|
+$as_echo_n "checking for uint$2_t... " >&6; }
|
|
|
+if eval \${$3+:} false; then :
|
|
|
+ $as_echo_n "(cached) " >&6
|
|
|
+else
|
|
|
+ eval "$3=no"
|
|
|
+ # Order is important - never check a type that is potentially smaller
|
|
|
+ # than half of the expected target width.
|
|
|
+ for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
|
|
|
+ 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
|
|
|
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
|
+/* end confdefs.h. */
|
|
|
+$ac_includes_default
|
|
|
+int
|
|
|
+main ()
|
|
|
+{
|
|
|
+static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
|
|
|
+test_array [0] = 0
|
|
|
+
|
|
|
+ ;
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+_ACEOF
|
|
|
+if ac_fn_cxx_try_compile "$LINENO"; then :
|
|
|
+ case $ac_type in #(
|
|
|
+ uint$2_t) :
|
|
|
+ eval "$3=yes" ;; #(
|
|
|
+ *) :
|
|
|
+ eval "$3=\$ac_type" ;;
|
|
|
+esac
|
|
|
+fi
|
|
|
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
|
|
+ if eval test \"x\$"$3"\" = x"no"; then :
|
|
|
+
|
|
|
+else
|
|
|
+ break
|
|
|
+fi
|
|
|
+ done
|
|
|
+fi
|
|
|
+eval ac_res=\$$3
|
|
|
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
|
|
|
+$as_echo "$ac_res" >&6; }
|
|
|
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
|
|
|
+
|
|
|
+} # ac_fn_c_find_uintX_t
|
|
|
+
|
|
|
# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
|
|
|
# ----------------------------------------------
|
|
|
# Tries to find the compile-time value of EXPR in a program that includes
|
|
|
@@ -5886,6 +6013,248 @@ $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
|
|
|
fi
|
|
|
rm -f confcache
|
|
|
|
|
|
+# Checks for typedefs, structures, and compiler characteristics
|
|
|
+ac_fn_cxx_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
|
|
|
+if test "x$ac_cv_type_pid_t" = xyes; then :
|
|
|
+
|
|
|
+else
|
|
|
+
|
|
|
+cat >>confdefs.h <<_ACEOF
|
|
|
+#define pid_t int
|
|
|
+_ACEOF
|
|
|
+
|
|
|
+fi
|
|
|
+
|
|
|
+ac_fn_cxx_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
|
|
|
+if test "x$ac_cv_type_size_t" = xyes; then :
|
|
|
+
|
|
|
+else
|
|
|
+
|
|
|
+cat >>confdefs.h <<_ACEOF
|
|
|
+#define size_t unsigned int
|
|
|
+_ACEOF
|
|
|
+
|
|
|
+fi
|
|
|
+
|
|
|
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
|
|
|
+$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
|
|
|
+if ${ac_cv_type_uid_t+:} false; then :
|
|
|
+ $as_echo_n "(cached) " >&6
|
|
|
+else
|
|
|
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
|
+/* end confdefs.h. */
|
|
|
+#include <sys/types.h>
|
|
|
+
|
|
|
+_ACEOF
|
|
|
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
|
|
|
+ $EGREP "uid_t" >/dev/null 2>&1; then :
|
|
|
+ ac_cv_type_uid_t=yes
|
|
|
+else
|
|
|
+ ac_cv_type_uid_t=no
|
|
|
+fi
|
|
|
+rm -f conftest*
|
|
|
+
|
|
|
+fi
|
|
|
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
|
|
|
+$as_echo "$ac_cv_type_uid_t" >&6; }
|
|
|
+if test $ac_cv_type_uid_t = no; then
|
|
|
+
|
|
|
+$as_echo "#define uid_t int" >>confdefs.h
|
|
|
+
|
|
|
+
|
|
|
+$as_echo "#define gid_t int" >>confdefs.h
|
|
|
+
|
|
|
+fi
|
|
|
+
|
|
|
+
|
|
|
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
|
|
|
+$as_echo_n "checking for long long int... " >&6; }
|
|
|
+if ${ac_cv_type_long_long_int+:} false; then :
|
|
|
+ $as_echo_n "(cached) " >&6
|
|
|
+else
|
|
|
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
|
+/* end confdefs.h. */
|
|
|
+
|
|
|
+ /* For now, do not test the preprocessor; as of 2007 there are too many
|
|
|
+ implementations with broken preprocessors. Perhaps this can
|
|
|
+ be revisited in 2012. In the meantime, code should not expect
|
|
|
+ #if to work with literals wider than 32 bits. */
|
|
|
+ /* Test literals. */
|
|
|
+ long long int ll = 9223372036854775807ll;
|
|
|
+ long long int nll = -9223372036854775807LL;
|
|
|
+ unsigned long long int ull = 18446744073709551615ULL;
|
|
|
+ /* Test constant expressions. */
|
|
|
+ typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
|
|
|
+ ? 1 : -1)];
|
|
|
+ typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
|
|
|
+ ? 1 : -1)];
|
|
|
+ int i = 63;
|
|
|
+int
|
|
|
+main ()
|
|
|
+{
|
|
|
+/* Test availability of runtime routines for shift and division. */
|
|
|
+ long long int llmax = 9223372036854775807ll;
|
|
|
+ unsigned long long int ullmax = 18446744073709551615ull;
|
|
|
+ return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
|
|
|
+ | (llmax / ll) | (llmax % ll)
|
|
|
+ | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
|
|
|
+ | (ullmax / ull) | (ullmax % ull));
|
|
|
+ ;
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+
|
|
|
+_ACEOF
|
|
|
+if ac_fn_cxx_try_link "$LINENO"; then :
|
|
|
+ if test "$cross_compiling" = yes; then :
|
|
|
+ ac_cv_type_long_long_int=yes
|
|
|
+else
|
|
|
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
|
+/* end confdefs.h. */
|
|
|
+#include <limits.h>
|
|
|
+ #ifndef LLONG_MAX
|
|
|
+ # define HALF \
|
|
|
+ (1LL << (sizeof (long long int) * CHAR_BIT - 2))
|
|
|
+ # define LLONG_MAX (HALF - 1 + HALF)
|
|
|
+ #endif
|
|
|
+int
|
|
|
+main ()
|
|
|
+{
|
|
|
+long long int n = 1;
|
|
|
+ int i;
|
|
|
+ for (i = 0; ; i++)
|
|
|
+ {
|
|
|
+ long long int m = n << i;
|
|
|
+ if (m >> i != n)
|
|
|
+ return 1;
|
|
|
+ if (LLONG_MAX / 2 < m)
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ return 0;
|
|
|
+ ;
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+_ACEOF
|
|
|
+if ac_fn_cxx_try_run "$LINENO"; then :
|
|
|
+ ac_cv_type_long_long_int=yes
|
|
|
+else
|
|
|
+ ac_cv_type_long_long_int=no
|
|
|
+fi
|
|
|
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
|
|
|
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
|
|
|
+fi
|
|
|
+
|
|
|
+else
|
|
|
+ ac_cv_type_long_long_int=no
|
|
|
+fi
|
|
|
+rm -f core conftest.err conftest.$ac_objext \
|
|
|
+ conftest$ac_exeext conftest.$ac_ext
|
|
|
+fi
|
|
|
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
|
|
|
+$as_echo "$ac_cv_type_long_long_int" >&6; }
|
|
|
+ if test $ac_cv_type_long_long_int = yes; then
|
|
|
+
|
|
|
+$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
|
|
|
+
|
|
|
+ fi
|
|
|
+
|
|
|
+ac_fn_c_find_intX_t "$LINENO" "8" "ac_cv_c_int8_t"
|
|
|
+case $ac_cv_c_int8_t in #(
|
|
|
+ no|yes) ;; #(
|
|
|
+ *)
|
|
|
+
|
|
|
+cat >>confdefs.h <<_ACEOF
|
|
|
+#define int8_t $ac_cv_c_int8_t
|
|
|
+_ACEOF
|
|
|
+;;
|
|
|
+esac
|
|
|
+
|
|
|
+ac_fn_c_find_uintX_t "$LINENO" "8" "ac_cv_c_uint8_t"
|
|
|
+case $ac_cv_c_uint8_t in #(
|
|
|
+ no|yes) ;; #(
|
|
|
+ *)
|
|
|
+
|
|
|
+$as_echo "#define _UINT8_T 1" >>confdefs.h
|
|
|
+
|
|
|
+
|
|
|
+cat >>confdefs.h <<_ACEOF
|
|
|
+#define uint8_t $ac_cv_c_uint8_t
|
|
|
+_ACEOF
|
|
|
+;;
|
|
|
+ esac
|
|
|
+
|
|
|
+ac_fn_c_find_intX_t "$LINENO" "16" "ac_cv_c_int16_t"
|
|
|
+case $ac_cv_c_int16_t in #(
|
|
|
+ no|yes) ;; #(
|
|
|
+ *)
|
|
|
+
|
|
|
+cat >>confdefs.h <<_ACEOF
|
|
|
+#define int16_t $ac_cv_c_int16_t
|
|
|
+_ACEOF
|
|
|
+;;
|
|
|
+esac
|
|
|
+
|
|
|
+ac_fn_c_find_uintX_t "$LINENO" "16" "ac_cv_c_uint16_t"
|
|
|
+case $ac_cv_c_uint16_t in #(
|
|
|
+ no|yes) ;; #(
|
|
|
+ *)
|
|
|
+
|
|
|
+
|
|
|
+cat >>confdefs.h <<_ACEOF
|
|
|
+#define uint16_t $ac_cv_c_uint16_t
|
|
|
+_ACEOF
|
|
|
+;;
|
|
|
+ esac
|
|
|
+
|
|
|
+ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
|
|
|
+case $ac_cv_c_int32_t in #(
|
|
|
+ no|yes) ;; #(
|
|
|
+ *)
|
|
|
+
|
|
|
+cat >>confdefs.h <<_ACEOF
|
|
|
+#define int32_t $ac_cv_c_int32_t
|
|
|
+_ACEOF
|
|
|
+;;
|
|
|
+esac
|
|
|
+
|
|
|
+ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
|
|
|
+case $ac_cv_c_uint32_t in #(
|
|
|
+ no|yes) ;; #(
|
|
|
+ *)
|
|
|
+
|
|
|
+$as_echo "#define _UINT32_T 1" >>confdefs.h
|
|
|
+
|
|
|
+
|
|
|
+cat >>confdefs.h <<_ACEOF
|
|
|
+#define uint32_t $ac_cv_c_uint32_t
|
|
|
+_ACEOF
|
|
|
+;;
|
|
|
+ esac
|
|
|
+
|
|
|
+ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
|
|
|
+case $ac_cv_c_int64_t in #(
|
|
|
+ no|yes) ;; #(
|
|
|
+ *)
|
|
|
+
|
|
|
+cat >>confdefs.h <<_ACEOF
|
|
|
+#define int64_t $ac_cv_c_int64_t
|
|
|
+_ACEOF
|
|
|
+;;
|
|
|
+esac
|
|
|
+
|
|
|
+ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
|
|
|
+case $ac_cv_c_uint64_t in #(
|
|
|
+ no|yes) ;; #(
|
|
|
+ *)
|
|
|
+
|
|
|
+$as_echo "#define _UINT64_T 1" >>confdefs.h
|
|
|
+
|
|
|
+
|
|
|
+cat >>confdefs.h <<_ACEOF
|
|
|
+#define uint64_t $ac_cv_c_uint64_t
|
|
|
+_ACEOF
|
|
|
+;;
|
|
|
+ esac
|
|
|
+
|
|
|
# The cast to long int works around a bug in the HP C Compiler
|
|
|
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
|
|
|
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
|