2195
2195
} @%:@ ac_fn_c_compute_int
2197
@%:@ ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2198
@%:@ -------------------------------------------------------
2199
@%:@ Tests whether HEADER exists, giving a warning if it cannot be compiled using
2200
@%:@ the include files in INCLUDES and setting the cache variable VAR
2202
ac_fn_c_check_header_mongrel ()
2204
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2205
if eval \${$3+:} false; then :
2206
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2207
$as_echo_n "checking for $2... " >&6; }
2208
if eval \${$3+:} false; then :
2209
$as_echo_n "(cached) " >&6
2212
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2213
$as_echo "$ac_res" >&6; }
2215
# Is the header compilable?
2216
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2217
$as_echo_n "checking $2 usability... " >&6; }
2218
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2219
/* end confdefs.h. */
2223
if ac_fn_c_try_compile "$LINENO"; then :
2224
ac_header_compiler=yes
2226
ac_header_compiler=no
2228
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2229
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2230
$as_echo "$ac_header_compiler" >&6; }
2232
# Is the header present?
2233
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2234
$as_echo_n "checking $2 presence... " >&6; }
2235
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2236
/* end confdefs.h. */
2239
if ac_fn_c_try_cpp "$LINENO"; then :
2240
ac_header_preproc=yes
2242
ac_header_preproc=no
2244
rm -f conftest.err conftest.i conftest.$ac_ext
2245
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2246
$as_echo "$ac_header_preproc" >&6; }
2248
# So? What about this header?
2249
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2251
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2252
$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2253
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2254
$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2257
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2258
$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2259
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
2260
$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
2261
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2262
$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2263
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
2264
$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
2265
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2266
$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2267
( $as_echo "## ----------------------------------------------- ##
2268
## Report this to isl-development@googlegroups.com ##
2269
## ----------------------------------------------- ##"
2270
) | sed "s/^/$as_me: WARNING: /" >&2
2273
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2274
$as_echo_n "checking for $2... " >&6; }
2275
if eval \${$3+:} false; then :
2276
$as_echo_n "(cached) " >&6
2278
eval "$3=\$ac_header_compiler"
2281
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2282
$as_echo "$ac_res" >&6; }
2284
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2286
} @%:@ ac_fn_c_check_header_mongrel
2197
2288
@%:@ ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2198
2289
@%:@ ---------------------------------------------
2199
2290
@%:@ Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
17106
17176
GMP_LDFLAGS="-L$with_gmp_prefix/lib"
17108
17178
GMP_LIBS=-lgmp
17179
SAVE_CPPFLAGS="$CPPFLAGS"
17180
SAVE_LDFLAGS="$LDFLAGS"
17182
CPPFLAGS="$GMP_CPPFLAGS $CPPFLAGS"
17183
LDFLAGS="$GMP_LDFLAGS $LDFLAGS"
17184
LIBS="$GMP_LIBS $LIBS"
17185
ac_fn_c_check_header_mongrel "$LINENO" "gmp.h" "ac_cv_header_gmp_h" "$ac_includes_default"
17186
if test "x$ac_cv_header_gmp_h" = xyes; then :
17189
as_fn_error $? "gmp.h header not found" "$LINENO" 5
17193
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lgmp" >&5
17194
$as_echo_n "checking for main in -lgmp... " >&6; }
17195
if ${ac_cv_lib_gmp_main+:} false; then :
17196
$as_echo_n "(cached) " >&6
17198
ac_check_lib_save_LIBS=$LIBS
17200
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17201
/* end confdefs.h. */
17212
if ac_fn_c_try_link "$LINENO"; then :
17213
ac_cv_lib_gmp_main=yes
17215
ac_cv_lib_gmp_main=no
17217
rm -f core conftest.err conftest.$ac_objext \
17218
conftest$ac_exeext conftest.$ac_ext
17219
LIBS=$ac_check_lib_save_LIBS
17221
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gmp_main" >&5
17222
$as_echo "$ac_cv_lib_gmp_main" >&6; }
17223
if test "x$ac_cv_lib_gmp_main" = xyes; then :
17224
cat >>confdefs.h <<_ACEOF
17225
@%:@define HAVE_LIBGMP 1
17231
as_fn_error $? "gmp library not found" "$LINENO" 5
17234
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17235
/* end confdefs.h. */
17242
if (mpz_divisible_p(n, d))
17243
mpz_divexact_ui(n, n, 4);
17249
if ac_fn_c_try_link "$LINENO"; then :
17252
as_fn_error $? "gmp library too old" "$LINENO" 5
17254
rm -f core conftest.err conftest.$ac_objext \
17255
conftest$ac_exeext conftest.$ac_ext
17256
CPPFLAGS="$SAVE_CPPFLAGS"
17257
LDFLAGS="$SAVE_LDFLAGS"
17111
17261
GMP_CPPFLAGS="-I$gmp_srcdir -I$with_gmp_builddir"
17291
if test "$cross_compiling" = yes; then :
17292
need_normalized_gcdext=true
17294
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17295
/* end confdefs.h. */
17309
mpz_gcdext(g, a, b, x, y);
17310
if (mpz_get_si(a) == -1 && mpz_get_si(b) == 0)
17319
if ac_fn_c_try_run "$LINENO"; then :
17320
need_normalized_gcdext=false
17322
need_normalized_gcdext=true
17324
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17325
conftest.$ac_objext conftest.beam conftest.$ac_ext
17137
17328
CPPFLAGS="$SAVE_CPPFLAGS"
17329
LDFLAGS="$SAVE_LDFLAGS"
17138
17331
if test x$need_get_memory_functions = xtrue; then
17139
17332
NEED_GET_MEMORY_FUNCTIONS_TRUE=
17140
17333
NEED_GET_MEMORY_FUNCTIONS_FALSE='#'
17420
17618
case "$with_clang" in
17620
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
17621
$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
17622
if ${ac_cv_path_GREP+:} false; then :
17623
$as_echo_n "(cached) " >&6
17625
if test -z "$GREP"; then
17626
ac_path_GREP_found=false
17627
# Loop through the user's path and test for each of PROGNAME-LIST
17628
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17629
for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
17632
test -z "$as_dir" && as_dir=.
17633
for ac_prog in grep ggrep; do
17634
for ac_exec_ext in '' $ac_executable_extensions; do
17635
ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
17636
as_fn_executable_p "$ac_path_GREP" || continue
17637
# Check for GNU ac_path_GREP and select it if it is found.
17638
# Check for GNU $ac_path_GREP
17639
case `"$ac_path_GREP" --version 2>&1` in
17641
ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
17644
$as_echo_n 0123456789 >"conftest.in"
17647
cat "conftest.in" "conftest.in" >"conftest.tmp"
17648
mv "conftest.tmp" "conftest.in"
17649
cp "conftest.in" "conftest.nl"
17650
$as_echo 'GREP' >> "conftest.nl"
17651
"$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
17652
diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
17653
as_fn_arith $ac_count + 1 && ac_count=$as_val
17654
if test $ac_count -gt ${ac_path_GREP_max-0}; then
17655
# Best one so far, save it but keep looking for a better one
17656
ac_cv_path_GREP="$ac_path_GREP"
17657
ac_path_GREP_max=$ac_count
17659
# 10*(2^10) chars as input seems more than enough
17660
test $ac_count -gt 10 && break
17662
rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
17665
$ac_path_GREP_found && break 3
17670
if test -z "$ac_cv_path_GREP"; then
17671
as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
17674
ac_cv_path_GREP=$GREP
17678
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
17679
$as_echo "$ac_cv_path_GREP" >&6; }
17680
GREP="$ac_cv_path_GREP"
17422
17683
llvm_config="llvm-config"
17423
17684
# Extract the first word of ""$llvm_config"", so it can be a program name with args.
17424
17685
set dummy "$llvm_config"; ac_word=$2
17469
17730
CLANG_CXXFLAGS=`$llvm_config --cxxflags`
17470
17731
CLANG_LDFLAGS=`$llvm_config --ldflags`
17471
17732
targets=`$llvm_config --targets-built`
17472
CLANG_LIBS=`$llvm_config --libs $targets asmparser support mc`
17733
components="$targets asmparser bitreader support mc"
17734
$llvm_config --components | $GREP option > /dev/null 2> /dev/null
17735
if test $? -eq 0; then
17736
components="$components option"
17738
CLANG_LIBS=`$llvm_config --libs $components`
17473
17739
CLANG_PREFIX=`$llvm_config --prefix`
17475
17741
cat >>confdefs.h <<_ACEOF
17633
17899
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17900
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17901
/* end confdefs.h. */
17902
#include <clang/Frontend/CompilerInstance.h>
17907
using namespace clang;
17908
DiagnosticConsumer *client;
17909
CompilerInstance *Clang;
17910
Clang->createDiagnostics(client);
17916
if ac_fn_cxx_try_compile "$LINENO"; then :
17920
$as_echo "@%:@define CREATEDIAGNOSTICS_TAKES_ARG /**/" >>confdefs.h
17923
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17924
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17925
/* end confdefs.h. */
17926
#include <clang/Lex/HeaderSearchOptions.h>
17931
using namespace clang;
17932
HeaderSearchOptions HSO;
17933
HSO.AddPath("", frontend::Angled, false, false);
17939
if ac_fn_cxx_try_compile "$LINENO"; then :
17941
$as_echo "@%:@define ADDPATH_TAKES_4_ARGUMENTS /**/" >>confdefs.h
17944
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17635
17946
ac_cpp='$CPP $CPPFLAGS'
17636
17947
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'