~ubuntu-branches/debian/jessie/ccache/jessie

« back to all changes in this revision

Viewing changes to configure

  • Committer: Bazaar Package Importer
  • Author(s): Joel Rosdahl
  • Date: 2010-12-02 21:05:17 UTC
  • mfrom: (5.1.4 sid)
  • Revision ID: james.westby@ubuntu.com-20101202210517-ji5owl2qa3s5c1rg
New upstream version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#! /bin/sh
2
2
# Guess values for system-dependent variables and create Makefiles.
3
 
# Generated by GNU Autoconf 2.65.
 
3
# Generated by GNU Autoconf 2.67.
4
4
#
5
5
#
6
6
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
7
 
# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
8
 
# Inc.
 
7
# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
 
8
# Foundation, Inc.
9
9
#
10
10
#
11
11
# This configure script is free software; the Free Software Foundation
316
316
      test -d "$as_dir" && break
317
317
    done
318
318
    test -z "$as_dirs" || eval "mkdir $as_dirs"
319
 
  } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
 
319
  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
320
320
 
321
321
 
322
322
} # as_fn_mkdir_p
356
356
fi # as_fn_arith
357
357
 
358
358
 
359
 
# as_fn_error ERROR [LINENO LOG_FD]
360
 
# ---------------------------------
 
359
# as_fn_error STATUS ERROR [LINENO LOG_FD]
 
360
# ----------------------------------------
361
361
# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
362
362
# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
363
 
# script with status $?, using 1 if that was 0.
 
363
# script with STATUS, using 1 if that was 0.
364
364
as_fn_error ()
365
365
{
366
 
  as_status=$?; test $as_status -eq 0 && as_status=1
367
 
  if test "$3"; then
368
 
    as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
369
 
    $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
 
366
  as_status=$1; test $as_status -eq 0 && as_status=1
 
367
  if test "$4"; then
 
368
    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
 
369
    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
370
370
  fi
371
 
  $as_echo "$as_me: error: $1" >&2
 
371
  $as_echo "$as_me: error: $2" >&2
372
372
  as_fn_exit $as_status
373
373
} # as_fn_error
374
374
 
530
530
exec 6>&1
531
531
 
532
532
# Name of the host.
533
 
# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
 
533
# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
534
534
# so uname gets run too.
535
535
ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
536
536
 
590
590
# include <unistd.h>
591
591
#endif"
592
592
 
 
593
ac_header_list=
593
594
ac_subst_vars='LTLIBOBJS
594
595
LIBOBJS
595
596
EGREP
596
597
GREP
 
598
AR
 
599
RANLIB
597
600
INSTALL_DATA
598
601
INSTALL_SCRIPT
599
602
INSTALL_PROGRAM
605
608
LDFLAGS
606
609
CFLAGS
607
610
CC
 
611
test_suites
608
612
include_dev_mk
609
 
extra_sources
 
613
extra_deps
610
614
target_alias
611
615
host_alias
612
616
build_alias
648
652
ac_subst_files=''
649
653
ac_user_opts='
650
654
enable_option_checking
651
 
enable_dev
652
655
'
653
656
      ac_precious_vars='build_alias
654
657
host_alias
721
724
  fi
722
725
 
723
726
  case $ac_option in
724
 
  *=*)  ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
725
 
  *)    ac_optarg=yes ;;
 
727
  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
 
728
  *=)   ac_optarg= ;;
 
729
  *)    ac_optarg=yes ;;
726
730
  esac
727
731
 
728
732
  # Accept the important Cygnus configure options, so we can diagnose typos.
767
771
    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
768
772
    # Reject names that are not valid shell variable names.
769
773
    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
770
 
      as_fn_error "invalid feature name: $ac_useropt"
 
774
      as_fn_error $? "invalid feature name: $ac_useropt"
771
775
    ac_useropt_orig=$ac_useropt
772
776
    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
773
777
    case $ac_user_opts in
793
797
    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
794
798
    # Reject names that are not valid shell variable names.
795
799
    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
796
 
      as_fn_error "invalid feature name: $ac_useropt"
 
800
      as_fn_error $? "invalid feature name: $ac_useropt"
797
801
    ac_useropt_orig=$ac_useropt
798
802
    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
799
803
    case $ac_user_opts in
997
1001
    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
998
1002
    # Reject names that are not valid shell variable names.
999
1003
    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1000
 
      as_fn_error "invalid package name: $ac_useropt"
 
1004
      as_fn_error $? "invalid package name: $ac_useropt"
1001
1005
    ac_useropt_orig=$ac_useropt
1002
1006
    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1003
1007
    case $ac_user_opts in
1013
1017
    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1014
1018
    # Reject names that are not valid shell variable names.
1015
1019
    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1016
 
      as_fn_error "invalid package name: $ac_useropt"
 
1020
      as_fn_error $? "invalid package name: $ac_useropt"
1017
1021
    ac_useropt_orig=$ac_useropt
1018
1022
    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1019
1023
    case $ac_user_opts in
1043
1047
  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1044
1048
    x_libraries=$ac_optarg ;;
1045
1049
 
1046
 
  -*) as_fn_error "unrecognized option: \`$ac_option'
1047
 
Try \`$0 --help' for more information."
 
1050
  -*) as_fn_error $? "unrecognized option: \`$ac_option'
 
1051
Try \`$0 --help' for more information"
1048
1052
    ;;
1049
1053
 
1050
1054
  *=*)
1052
1056
    # Reject names that are not valid shell variable names.
1053
1057
    case $ac_envvar in #(
1054
1058
      '' | [0-9]* | *[!_$as_cr_alnum]* )
1055
 
      as_fn_error "invalid variable name: \`$ac_envvar'" ;;
 
1059
      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1056
1060
    esac
1057
1061
    eval $ac_envvar=\$ac_optarg
1058
1062
    export $ac_envvar ;;
1070
1074
 
1071
1075
if test -n "$ac_prev"; then
1072
1076
  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1073
 
  as_fn_error "missing argument to $ac_option"
 
1077
  as_fn_error $? "missing argument to $ac_option"
1074
1078
fi
1075
1079
 
1076
1080
if test -n "$ac_unrecognized_opts"; then
1077
1081
  case $enable_option_checking in
1078
1082
    no) ;;
1079
 
    fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
 
1083
    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1080
1084
    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1081
1085
  esac
1082
1086
fi
1099
1103
    [\\/$]* | ?:[\\/]* )  continue;;
1100
1104
    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1101
1105
  esac
1102
 
  as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
 
1106
  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1103
1107
done
1104
1108
 
1105
1109
# There might be people who depend on the old broken behavior: `$host'
1113
1117
if test "x$host_alias" != x; then
1114
1118
  if test "x$build_alias" = x; then
1115
1119
    cross_compiling=maybe
1116
 
    $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1117
 
    If a cross compiler is detected then cross compile mode will be used." >&2
 
1120
    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
 
1121
    If a cross compiler is detected then cross compile mode will be used" >&2
1118
1122
  elif test "x$build_alias" != "x$host_alias"; then
1119
1123
    cross_compiling=yes
1120
1124
  fi
1129
1133
ac_pwd=`pwd` && test -n "$ac_pwd" &&
1130
1134
ac_ls_di=`ls -di .` &&
1131
1135
ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1132
 
  as_fn_error "working directory cannot be determined"
 
1136
  as_fn_error $? "working directory cannot be determined"
1133
1137
test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1134
 
  as_fn_error "pwd does not report name of working directory"
 
1138
  as_fn_error $? "pwd does not report name of working directory"
1135
1139
 
1136
1140
 
1137
1141
# Find the source files, if location was not specified.
1170
1174
fi
1171
1175
if test ! -r "$srcdir/$ac_unique_file"; then
1172
1176
  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1173
 
  as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
 
1177
  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1174
1178
fi
1175
1179
ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1176
1180
ac_abs_confdir=`(
1177
 
        cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
 
1181
        cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1178
1182
        pwd)`
1179
1183
# When building in place, set srcdir=.
1180
1184
if test "$ac_abs_confdir" = "$ac_pwd"; then
1214
1218
      --help=short        display options specific to this package
1215
1219
      --help=recursive    display the short help of all the included packages
1216
1220
  -V, --version           display version information and exit
1217
 
  -q, --quiet, --silent   do not print \`checking...' messages
 
1221
  -q, --quiet, --silent   do not print \`checking ...' messages
1218
1222
      --cache-file=FILE   cache test results in FILE [disabled]
1219
1223
  -C, --config-cache      alias for \`--cache-file=config.cache'
1220
1224
  -n, --no-create         do not create output files
1263
1267
 
1264
1268
  cat <<\_ACEOF
1265
1269
 
1266
 
Optional Features:
1267
 
  --disable-option-checking  ignore unrecognized --enable/--with options
1268
 
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1269
 
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1270
 
  --enable-dev            enable developer mode (requires GNU make)
1271
 
 
1272
1270
Some influential environment variables:
1273
1271
  CC          C compiler command
1274
1272
  CFLAGS      C compiler flags
1346
1344
if $ac_init_version; then
1347
1345
  cat <<\_ACEOF
1348
1346
configure
1349
 
generated by GNU Autoconf 2.65
 
1347
generated by GNU Autoconf 2.67
1350
1348
 
1351
 
Copyright (C) 2009 Free Software Foundation, Inc.
 
1349
Copyright (C) 2010 Free Software Foundation, Inc.
1352
1350
This configure script is free software; the Free Software Foundation
1353
1351
gives unlimited permission to copy, distribute and modify it.
1354
1352
_ACEOF
1418
1416
    mv -f conftest.er1 conftest.err
1419
1417
  fi
1420
1418
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1421
 
  test $ac_status = 0; } >/dev/null && {
 
1419
  test $ac_status = 0; } > conftest.i && {
1422
1420
         test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1423
1421
         test ! -s conftest.err
1424
1422
       }; then :
1480
1478
 
1481
1479
} # ac_fn_c_try_link
1482
1480
 
 
1481
# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
 
1482
# -------------------------------------------
 
1483
# Tests whether TYPE exists after having included INCLUDES, setting cache
 
1484
# variable VAR accordingly.
 
1485
ac_fn_c_check_type ()
 
1486
{
 
1487
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
 
1488
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
 
1489
$as_echo_n "checking for $2... " >&6; }
 
1490
if eval "test \"\${$3+set}\"" = set; then :
 
1491
  $as_echo_n "(cached) " >&6
 
1492
else
 
1493
  eval "$3=no"
 
1494
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
1495
/* end confdefs.h.  */
 
1496
$4
 
1497
int
 
1498
main ()
 
1499
{
 
1500
if (sizeof ($2))
 
1501
         return 0;
 
1502
  ;
 
1503
  return 0;
 
1504
}
 
1505
_ACEOF
 
1506
if ac_fn_c_try_compile "$LINENO"; then :
 
1507
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
1508
/* end confdefs.h.  */
 
1509
$4
 
1510
int
 
1511
main ()
 
1512
{
 
1513
if (sizeof (($2)))
 
1514
            return 0;
 
1515
  ;
 
1516
  return 0;
 
1517
}
 
1518
_ACEOF
 
1519
if ac_fn_c_try_compile "$LINENO"; then :
 
1520
 
 
1521
else
 
1522
  eval "$3=yes"
 
1523
fi
 
1524
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
1525
fi
 
1526
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
1527
fi
 
1528
eval ac_res=\$$3
 
1529
               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
 
1530
$as_echo "$ac_res" >&6; }
 
1531
  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
 
1532
 
 
1533
} # ac_fn_c_check_type
 
1534
 
 
1535
# ac_fn_c_try_run LINENO
 
1536
# ----------------------
 
1537
# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
 
1538
# that executables *can* be run.
 
1539
ac_fn_c_try_run ()
 
1540
{
 
1541
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
 
1542
  if { { ac_try="$ac_link"
 
1543
case "(($ac_try" in
 
1544
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
 
1545
  *) ac_try_echo=$ac_try;;
 
1546
esac
 
1547
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
 
1548
$as_echo "$ac_try_echo"; } >&5
 
1549
  (eval "$ac_link") 2>&5
 
1550
  ac_status=$?
 
1551
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
 
1552
  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
 
1553
  { { case "(($ac_try" in
 
1554
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
 
1555
  *) ac_try_echo=$ac_try;;
 
1556
esac
 
1557
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
 
1558
$as_echo "$ac_try_echo"; } >&5
 
1559
  (eval "$ac_try") 2>&5
 
1560
  ac_status=$?
 
1561
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
 
1562
  test $ac_status = 0; }; }; then :
 
1563
  ac_retval=0
 
1564
else
 
1565
  $as_echo "$as_me: program exited with status $ac_status" >&5
 
1566
       $as_echo "$as_me: failed program was:" >&5
 
1567
sed 's/^/| /' conftest.$ac_ext >&5
 
1568
 
 
1569
       ac_retval=$ac_status
 
1570
fi
 
1571
  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
 
1572
  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
 
1573
  as_fn_set_status $ac_retval
 
1574
 
 
1575
} # ac_fn_c_try_run
 
1576
 
 
1577
# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
 
1578
# -------------------------------------------------------
 
1579
# Tests whether HEADER exists and can be compiled using the include files in
 
1580
# INCLUDES, setting the cache variable VAR accordingly.
 
1581
ac_fn_c_check_header_compile ()
 
1582
{
 
1583
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
 
1584
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
 
1585
$as_echo_n "checking for $2... " >&6; }
 
1586
if eval "test \"\${$3+set}\"" = set; then :
 
1587
  $as_echo_n "(cached) " >&6
 
1588
else
 
1589
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
1590
/* end confdefs.h.  */
 
1591
$4
 
1592
#include <$2>
 
1593
_ACEOF
 
1594
if ac_fn_c_try_compile "$LINENO"; then :
 
1595
  eval "$3=yes"
 
1596
else
 
1597
  eval "$3=no"
 
1598
fi
 
1599
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
1600
fi
 
1601
eval ac_res=\$$3
 
1602
               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
 
1603
$as_echo "$ac_res" >&6; }
 
1604
  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
 
1605
 
 
1606
} # ac_fn_c_check_header_compile
 
1607
 
1483
1608
# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1484
1609
# -------------------------------------------------------
1485
1610
# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1488
1613
ac_fn_c_check_header_mongrel ()
1489
1614
{
1490
1615
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1491
 
  if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
 
1616
  if eval "test \"\${$3+set}\"" = set; then :
1492
1617
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1493
1618
$as_echo_n "checking for $2... " >&6; }
1494
 
if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
 
1619
if eval "test \"\${$3+set}\"" = set; then :
1495
1620
  $as_echo_n "(cached) " >&6
1496
1621
fi
1497
1622
eval ac_res=\$$3
1527
1652
else
1528
1653
  ac_header_preproc=no
1529
1654
fi
1530
 
rm -f conftest.err conftest.$ac_ext
 
1655
rm -f conftest.err conftest.i conftest.$ac_ext
1531
1656
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1532
1657
$as_echo "$ac_header_preproc" >&6; }
1533
1658
 
1554
1679
esac
1555
1680
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1556
1681
$as_echo_n "checking for $2... " >&6; }
1557
 
if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
 
1682
if eval "test \"\${$3+set}\"" = set; then :
1558
1683
  $as_echo_n "(cached) " >&6
1559
1684
else
1560
1685
  eval "$3=\$ac_header_compiler"
1567
1692
 
1568
1693
} # ac_fn_c_check_header_mongrel
1569
1694
 
1570
 
# ac_fn_c_try_run LINENO
1571
 
# ----------------------
1572
 
# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1573
 
# that executables *can* be run.
1574
 
ac_fn_c_try_run ()
1575
 
{
1576
 
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1577
 
  if { { ac_try="$ac_link"
1578
 
case "(($ac_try" in
1579
 
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1580
 
  *) ac_try_echo=$ac_try;;
1581
 
esac
1582
 
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1583
 
$as_echo "$ac_try_echo"; } >&5
1584
 
  (eval "$ac_link") 2>&5
1585
 
  ac_status=$?
1586
 
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1587
 
  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1588
 
  { { case "(($ac_try" in
1589
 
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1590
 
  *) ac_try_echo=$ac_try;;
1591
 
esac
1592
 
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1593
 
$as_echo "$ac_try_echo"; } >&5
1594
 
  (eval "$ac_try") 2>&5
1595
 
  ac_status=$?
1596
 
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1597
 
  test $ac_status = 0; }; }; then :
1598
 
  ac_retval=0
1599
 
else
1600
 
  $as_echo "$as_me: program exited with status $ac_status" >&5
1601
 
       $as_echo "$as_me: failed program was:" >&5
1602
 
sed 's/^/| /' conftest.$ac_ext >&5
1603
 
 
1604
 
       ac_retval=$ac_status
1605
 
fi
1606
 
  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1607
 
  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1608
 
  as_fn_set_status $ac_retval
1609
 
 
1610
 
} # ac_fn_c_try_run
1611
 
 
1612
 
# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1613
 
# -------------------------------------------------------
1614
 
# Tests whether HEADER exists and can be compiled using the include files in
1615
 
# INCLUDES, setting the cache variable VAR accordingly.
1616
 
ac_fn_c_check_header_compile ()
1617
 
{
1618
 
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1619
 
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1620
 
$as_echo_n "checking for $2... " >&6; }
1621
 
if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1622
 
  $as_echo_n "(cached) " >&6
1623
 
else
1624
 
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1625
 
/* end confdefs.h.  */
1626
 
$4
1627
 
#include <$2>
1628
 
_ACEOF
1629
 
if ac_fn_c_try_compile "$LINENO"; then :
1630
 
  eval "$3=yes"
1631
 
else
1632
 
  eval "$3=no"
1633
 
fi
1634
 
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1635
 
fi
1636
 
eval ac_res=\$$3
1637
 
               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1638
 
$as_echo "$ac_res" >&6; }
1639
 
  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1640
 
 
1641
 
} # ac_fn_c_check_header_compile
1642
 
 
1643
1695
# ac_fn_c_check_func LINENO FUNC VAR
1644
1696
# ----------------------------------
1645
1697
# Tests whether FUNC exists, setting the cache variable VAR accordingly
1648
1700
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1649
1701
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1650
1702
$as_echo_n "checking for $2... " >&6; }
1651
 
if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
 
1703
if eval "test \"\${$3+set}\"" = set; then :
1652
1704
  $as_echo_n "(cached) " >&6
1653
1705
else
1654
1706
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1706
1758
  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1707
1759
 
1708
1760
} # ac_fn_c_check_func
 
1761
 
 
1762
# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
 
1763
# ----------------------------------------------------
 
1764
# Tries to find if the field MEMBER exists in type AGGR, after including
 
1765
# INCLUDES, setting cache variable VAR accordingly.
 
1766
ac_fn_c_check_member ()
 
1767
{
 
1768
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
 
1769
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
 
1770
$as_echo_n "checking for $2.$3... " >&6; }
 
1771
if eval "test \"\${$4+set}\"" = set; then :
 
1772
  $as_echo_n "(cached) " >&6
 
1773
else
 
1774
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
1775
/* end confdefs.h.  */
 
1776
$5
 
1777
int
 
1778
main ()
 
1779
{
 
1780
static $2 ac_aggr;
 
1781
if (ac_aggr.$3)
 
1782
return 0;
 
1783
  ;
 
1784
  return 0;
 
1785
}
 
1786
_ACEOF
 
1787
if ac_fn_c_try_compile "$LINENO"; then :
 
1788
  eval "$4=yes"
 
1789
else
 
1790
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
1791
/* end confdefs.h.  */
 
1792
$5
 
1793
int
 
1794
main ()
 
1795
{
 
1796
static $2 ac_aggr;
 
1797
if (sizeof ac_aggr.$3)
 
1798
return 0;
 
1799
  ;
 
1800
  return 0;
 
1801
}
 
1802
_ACEOF
 
1803
if ac_fn_c_try_compile "$LINENO"; then :
 
1804
  eval "$4=yes"
 
1805
else
 
1806
  eval "$4=no"
 
1807
fi
 
1808
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
1809
fi
 
1810
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
1811
fi
 
1812
eval ac_res=\$$4
 
1813
               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
 
1814
$as_echo "$ac_res" >&6; }
 
1815
  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
 
1816
 
 
1817
} # ac_fn_c_check_member
1709
1818
cat >config.log <<_ACEOF
1710
1819
This file contains any messages produced by compilers while
1711
1820
running configure, to aid debugging if configure makes a mistake.
1712
1821
 
1713
1822
It was created by $as_me, which was
1714
 
generated by GNU Autoconf 2.65.  Invocation command line was
 
1823
generated by GNU Autoconf 2.67.  Invocation command line was
1715
1824
 
1716
1825
  $ $0 $@
1717
1826
 
1821
1930
  {
1822
1931
    echo
1823
1932
 
1824
 
    cat <<\_ASBOX
1825
 
## ---------------- ##
 
1933
    $as_echo "## ---------------- ##
1826
1934
## Cache variables. ##
1827
 
## ---------------- ##
1828
 
_ASBOX
 
1935
## ---------------- ##"
1829
1936
    echo
1830
1937
    # The following way of writing the cache mishandles newlines in values,
1831
1938
(
1859
1966
)
1860
1967
    echo
1861
1968
 
1862
 
    cat <<\_ASBOX
1863
 
## ----------------- ##
 
1969
    $as_echo "## ----------------- ##
1864
1970
## Output variables. ##
1865
 
## ----------------- ##
1866
 
_ASBOX
 
1971
## ----------------- ##"
1867
1972
    echo
1868
1973
    for ac_var in $ac_subst_vars
1869
1974
    do
1876
1981
    echo
1877
1982
 
1878
1983
    if test -n "$ac_subst_files"; then
1879
 
      cat <<\_ASBOX
1880
 
## ------------------- ##
 
1984
      $as_echo "## ------------------- ##
1881
1985
## File substitutions. ##
1882
 
## ------------------- ##
1883
 
_ASBOX
 
1986
## ------------------- ##"
1884
1987
      echo
1885
1988
      for ac_var in $ac_subst_files
1886
1989
      do
1894
1997
    fi
1895
1998
 
1896
1999
    if test -s confdefs.h; then
1897
 
      cat <<\_ASBOX
1898
 
## ----------- ##
 
2000
      $as_echo "## ----------- ##
1899
2001
## confdefs.h. ##
1900
 
## ----------- ##
1901
 
_ASBOX
 
2002
## ----------- ##"
1902
2003
      echo
1903
2004
      cat confdefs.h
1904
2005
      echo
1953
2054
ac_site_file1=NONE
1954
2055
ac_site_file2=NONE
1955
2056
if test -n "$CONFIG_SITE"; then
1956
 
  ac_site_file1=$CONFIG_SITE
 
2057
  # We do not want a PATH search for config.site.
 
2058
  case $CONFIG_SITE in #((
 
2059
    -*)  ac_site_file1=./$CONFIG_SITE;;
 
2060
    */*) ac_site_file1=$CONFIG_SITE;;
 
2061
    *)   ac_site_file1=./$CONFIG_SITE;;
 
2062
  esac
1957
2063
elif test "x$prefix" != xNONE; then
1958
2064
  ac_site_file1=$prefix/share/config.site
1959
2065
  ac_site_file2=$prefix/etc/config.site
1968
2074
    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
1969
2075
$as_echo "$as_me: loading site script $ac_site_file" >&6;}
1970
2076
    sed 's/^/| /' "$ac_site_file" >&5
1971
 
    . "$ac_site_file"
 
2077
    . "$ac_site_file" \
 
2078
      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 
2079
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 
2080
as_fn_error $? "failed to load site script $ac_site_file
 
2081
See \`config.log' for more details" "$LINENO" 5 ; }
1972
2082
  fi
1973
2083
done
1974
2084
 
1989
2099
  >$cache_file
1990
2100
fi
1991
2101
 
 
2102
as_fn_append ac_header_list " stdarg.h"
 
2103
as_fn_append ac_header_list " varargs.h"
1992
2104
# Check that the precious variables saved in the cache have kept the same
1993
2105
# value.
1994
2106
ac_cache_corrupted=false
2044
2156
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2045
2157
  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2046
2158
$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2047
 
  as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
 
2159
  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2048
2160
fi
2049
2161
## -------------------- ##
2050
2162
## Main body of script. ##
2068
2180
 
2069
2181
 
2070
2182
 
2071
 
ccache_dev=no
2072
 
# Check whether --enable-dev was given.
2073
 
if test "${enable_dev+set}" = set; then :
2074
 
  enableval=$enable_dev; include_dev_mk='include dev.mk'; ccache_dev=yes
2075
 
fi
2076
 
 
2077
2183
 
2078
2184
ac_ext=c
2079
2185
ac_cpp='$CPP $CPPFLAGS'
2375
2481
 
2376
2482
test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2377
2483
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2378
 
as_fn_error "no acceptable C compiler found in \$PATH
2379
 
See \`config.log' for more details." "$LINENO" 5; }
 
2484
as_fn_error $? "no acceptable C compiler found in \$PATH
 
2485
See \`config.log' for more details" "$LINENO" 5 ; }
2380
2486
 
2381
2487
# Provide some information about the compiler.
2382
2488
$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
2490
2596
 
2491
2597
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2492
2598
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2493
 
{ as_fn_set_status 77
2494
 
as_fn_error "C compiler cannot create executables
2495
 
See \`config.log' for more details." "$LINENO" 5; }; }
 
2599
as_fn_error 77 "C compiler cannot create executables
 
2600
See \`config.log' for more details" "$LINENO" 5 ; }
2496
2601
else
2497
2602
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
2498
2603
$as_echo "yes" >&6; }
2534
2639
else
2535
2640
  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2536
2641
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2537
 
as_fn_error "cannot compute suffix of executables: cannot compile and link
2538
 
See \`config.log' for more details." "$LINENO" 5; }
 
2642
as_fn_error $? "cannot compute suffix of executables: cannot compile and link
 
2643
See \`config.log' for more details" "$LINENO" 5 ; }
2539
2644
fi
2540
2645
rm -f conftest conftest$ac_cv_exeext
2541
2646
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
2592
2697
    else
2593
2698
        { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2594
2699
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2595
 
as_fn_error "cannot run C compiled programs.
 
2700
as_fn_error $? "cannot run C compiled programs.
2596
2701
If you meant to cross compile, use \`--host'.
2597
 
See \`config.log' for more details." "$LINENO" 5; }
 
2702
See \`config.log' for more details" "$LINENO" 5 ; }
2598
2703
    fi
2599
2704
  fi
2600
2705
fi
2645
2750
 
2646
2751
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2647
2752
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2648
 
as_fn_error "cannot compute suffix of object files: cannot compile
2649
 
See \`config.log' for more details." "$LINENO" 5; }
 
2753
as_fn_error $? "cannot compute suffix of object files: cannot compile
 
2754
See \`config.log' for more details" "$LINENO" 5 ; }
2650
2755
fi
2651
2756
rm -f conftest.$ac_cv_objext conftest.$ac_ext
2652
2757
fi
2908
3013
  # Broken: fails on valid input.
2909
3014
continue
2910
3015
fi
2911
 
rm -f conftest.err conftest.$ac_ext
 
3016
rm -f conftest.err conftest.i conftest.$ac_ext
2912
3017
 
2913
3018
  # OK, works on sane cases.  Now check whether nonexistent headers
2914
3019
  # can be detected and how.
2924
3029
ac_preproc_ok=:
2925
3030
break
2926
3031
fi
2927
 
rm -f conftest.err conftest.$ac_ext
 
3032
rm -f conftest.err conftest.i conftest.$ac_ext
2928
3033
 
2929
3034
done
2930
3035
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2931
 
rm -f conftest.err conftest.$ac_ext
 
3036
rm -f conftest.i conftest.err conftest.$ac_ext
2932
3037
if $ac_preproc_ok; then :
2933
3038
  break
2934
3039
fi
2967
3072
  # Broken: fails on valid input.
2968
3073
continue
2969
3074
fi
2970
 
rm -f conftest.err conftest.$ac_ext
 
3075
rm -f conftest.err conftest.i conftest.$ac_ext
2971
3076
 
2972
3077
  # OK, works on sane cases.  Now check whether nonexistent headers
2973
3078
  # can be detected and how.
2983
3088
ac_preproc_ok=:
2984
3089
break
2985
3090
fi
2986
 
rm -f conftest.err conftest.$ac_ext
 
3091
rm -f conftest.err conftest.i conftest.$ac_ext
2987
3092
 
2988
3093
done
2989
3094
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2990
 
rm -f conftest.err conftest.$ac_ext
 
3095
rm -f conftest.i conftest.err conftest.$ac_ext
2991
3096
if $ac_preproc_ok; then :
2992
3097
 
2993
3098
else
2994
3099
  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2995
3100
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2996
 
as_fn_error "C preprocessor \"$CPP\" fails sanity check
2997
 
See \`config.log' for more details." "$LINENO" 5; }
 
3101
as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
 
3102
See \`config.log' for more details" "$LINENO" 5 ; }
2998
3103
fi
2999
3104
 
3000
3105
ac_ext=c
3005
3110
 
3006
3111
ac_aux_dir=
3007
3112
for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
3008
 
  for ac_t in install-sh install.sh shtool; do
3009
 
    if test -f "$ac_dir/$ac_t"; then
3010
 
      ac_aux_dir=$ac_dir
3011
 
      ac_install_sh="$ac_aux_dir/$ac_t -c"
3012
 
      break 2
3013
 
    fi
3014
 
  done
 
3113
  if test -f "$ac_dir/install-sh"; then
 
3114
    ac_aux_dir=$ac_dir
 
3115
    ac_install_sh="$ac_aux_dir/install-sh -c"
 
3116
    break
 
3117
  elif test -f "$ac_dir/install.sh"; then
 
3118
    ac_aux_dir=$ac_dir
 
3119
    ac_install_sh="$ac_aux_dir/install.sh -c"
 
3120
    break
 
3121
  elif test -f "$ac_dir/shtool"; then
 
3122
    ac_aux_dir=$ac_dir
 
3123
    ac_install_sh="$ac_aux_dir/shtool install -c"
 
3124
    break
 
3125
  fi
3015
3126
done
3016
3127
if test -z "$ac_aux_dir"; then
3017
 
  as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
 
3128
  as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
3018
3129
fi
3019
3130
 
3020
3131
# These three variables are undocumented and unsupported,
3119
3230
 
3120
3231
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3121
3232
 
 
3233
if test -n "$ac_tool_prefix"; then
 
3234
  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
 
3235
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
 
3236
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 
3237
$as_echo_n "checking for $ac_word... " >&6; }
 
3238
if test "${ac_cv_prog_RANLIB+set}" = set; then :
 
3239
  $as_echo_n "(cached) " >&6
 
3240
else
 
3241
  if test -n "$RANLIB"; then
 
3242
  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
 
3243
else
 
3244
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 
3245
for as_dir in $PATH
 
3246
do
 
3247
  IFS=$as_save_IFS
 
3248
  test -z "$as_dir" && as_dir=.
 
3249
    for ac_exec_ext in '' $ac_executable_extensions; do
 
3250
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
 
3251
    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
 
3252
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
 
3253
    break 2
 
3254
  fi
 
3255
done
 
3256
  done
 
3257
IFS=$as_save_IFS
 
3258
 
 
3259
fi
 
3260
fi
 
3261
RANLIB=$ac_cv_prog_RANLIB
 
3262
if test -n "$RANLIB"; then
 
3263
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
 
3264
$as_echo "$RANLIB" >&6; }
 
3265
else
 
3266
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 
3267
$as_echo "no" >&6; }
 
3268
fi
 
3269
 
 
3270
 
 
3271
fi
 
3272
if test -z "$ac_cv_prog_RANLIB"; then
 
3273
  ac_ct_RANLIB=$RANLIB
 
3274
  # Extract the first word of "ranlib", so it can be a program name with args.
 
3275
set dummy ranlib; ac_word=$2
 
3276
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 
3277
$as_echo_n "checking for $ac_word... " >&6; }
 
3278
if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
 
3279
  $as_echo_n "(cached) " >&6
 
3280
else
 
3281
  if test -n "$ac_ct_RANLIB"; then
 
3282
  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
 
3283
else
 
3284
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 
3285
for as_dir in $PATH
 
3286
do
 
3287
  IFS=$as_save_IFS
 
3288
  test -z "$as_dir" && as_dir=.
 
3289
    for ac_exec_ext in '' $ac_executable_extensions; do
 
3290
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
 
3291
    ac_cv_prog_ac_ct_RANLIB="ranlib"
 
3292
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
 
3293
    break 2
 
3294
  fi
 
3295
done
 
3296
  done
 
3297
IFS=$as_save_IFS
 
3298
 
 
3299
fi
 
3300
fi
 
3301
ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
 
3302
if test -n "$ac_ct_RANLIB"; then
 
3303
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
 
3304
$as_echo "$ac_ct_RANLIB" >&6; }
 
3305
else
 
3306
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 
3307
$as_echo "no" >&6; }
 
3308
fi
 
3309
 
 
3310
  if test "x$ac_ct_RANLIB" = x; then
 
3311
    RANLIB=":"
 
3312
  else
 
3313
    case $cross_compiling:$ac_tool_warned in
 
3314
yes:)
 
3315
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
 
3316
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 
3317
ac_tool_warned=yes ;;
 
3318
esac
 
3319
    RANLIB=$ac_ct_RANLIB
 
3320
  fi
 
3321
else
 
3322
  RANLIB="$ac_cv_prog_RANLIB"
 
3323
fi
 
3324
 
 
3325
if test -n "$ac_tool_prefix"; then
 
3326
  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
 
3327
set dummy ${ac_tool_prefix}ar; ac_word=$2
 
3328
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 
3329
$as_echo_n "checking for $ac_word... " >&6; }
 
3330
if test "${ac_cv_prog_AR+set}" = set; then :
 
3331
  $as_echo_n "(cached) " >&6
 
3332
else
 
3333
  if test -n "$AR"; then
 
3334
  ac_cv_prog_AR="$AR" # Let the user override the test.
 
3335
else
 
3336
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 
3337
for as_dir in $PATH
 
3338
do
 
3339
  IFS=$as_save_IFS
 
3340
  test -z "$as_dir" && as_dir=.
 
3341
    for ac_exec_ext in '' $ac_executable_extensions; do
 
3342
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
 
3343
    ac_cv_prog_AR="${ac_tool_prefix}ar"
 
3344
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
 
3345
    break 2
 
3346
  fi
 
3347
done
 
3348
  done
 
3349
IFS=$as_save_IFS
 
3350
 
 
3351
fi
 
3352
fi
 
3353
AR=$ac_cv_prog_AR
 
3354
if test -n "$AR"; then
 
3355
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
 
3356
$as_echo "$AR" >&6; }
 
3357
else
 
3358
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 
3359
$as_echo "no" >&6; }
 
3360
fi
 
3361
 
 
3362
 
 
3363
fi
 
3364
if test -z "$ac_cv_prog_AR"; then
 
3365
  ac_ct_AR=$AR
 
3366
  # Extract the first word of "ar", so it can be a program name with args.
 
3367
set dummy ar; ac_word=$2
 
3368
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 
3369
$as_echo_n "checking for $ac_word... " >&6; }
 
3370
if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
 
3371
  $as_echo_n "(cached) " >&6
 
3372
else
 
3373
  if test -n "$ac_ct_AR"; then
 
3374
  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
 
3375
else
 
3376
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 
3377
for as_dir in $PATH
 
3378
do
 
3379
  IFS=$as_save_IFS
 
3380
  test -z "$as_dir" && as_dir=.
 
3381
    for ac_exec_ext in '' $ac_executable_extensions; do
 
3382
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
 
3383
    ac_cv_prog_ac_ct_AR="ar"
 
3384
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
 
3385
    break 2
 
3386
  fi
 
3387
done
 
3388
  done
 
3389
IFS=$as_save_IFS
 
3390
 
 
3391
fi
 
3392
fi
 
3393
ac_ct_AR=$ac_cv_prog_ac_ct_AR
 
3394
if test -n "$ac_ct_AR"; then
 
3395
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
 
3396
$as_echo "$ac_ct_AR" >&6; }
 
3397
else
 
3398
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 
3399
$as_echo "no" >&6; }
 
3400
fi
 
3401
 
 
3402
  if test "x$ac_ct_AR" = x; then
 
3403
    AR=""
 
3404
  else
 
3405
    case $cross_compiling:$ac_tool_warned in
 
3406
yes:)
 
3407
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
 
3408
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 
3409
ac_tool_warned=yes ;;
 
3410
esac
 
3411
    AR=$ac_ct_AR
 
3412
  fi
 
3413
else
 
3414
  AR="$ac_cv_prog_AR"
 
3415
fi
 
3416
 
 
3417
if test -z "$AR"; then
 
3418
    as_fn_error $? "cannot find ar" "$LINENO" 5
 
3419
fi
3122
3420
 
3123
3421
 
3124
3422
# The later defininition of _XOPEN_SOURCE disables certain features
3290
3588
  as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
3291
3589
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
3292
3590
$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
3293
 
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
 
3591
if eval "test \"\${$as_ac_Header+set}\"" = set; then :
3294
3592
  $as_echo_n "(cached) " >&6
3295
3593
else
3296
3594
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3317
3615
eval ac_res=\$$as_ac_Header
3318
3616
               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3319
3617
$as_echo "$ac_res" >&6; }
3320
 
eval as_val=\$$as_ac_Header
3321
 
   if test "x$as_val" = x""yes; then :
 
3618
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
3322
3619
  cat >>confdefs.h <<_ACEOF
3323
3620
#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
3324
3621
_ACEOF
3479
3776
 
3480
3777
fi
3481
3778
 
3482
 
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
3483
 
$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
3484
 
if test "${ac_cv_header_sys_wait_h+set}" = set; then :
3485
 
  $as_echo_n "(cached) " >&6
3486
 
else
3487
 
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3488
 
/* end confdefs.h.  */
3489
 
#include <sys/types.h>
3490
 
#include <sys/wait.h>
3491
 
#ifndef WEXITSTATUS
3492
 
# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
3493
 
#endif
3494
 
#ifndef WIFEXITED
3495
 
# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3496
 
#endif
3497
 
 
3498
 
int
3499
 
main ()
3500
 
{
3501
 
  int s;
3502
 
  wait (&s);
3503
 
  s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3504
 
  ;
3505
 
  return 0;
3506
 
}
3507
 
_ACEOF
3508
 
if ac_fn_c_try_compile "$LINENO"; then :
3509
 
  ac_cv_header_sys_wait_h=yes
3510
 
else
3511
 
  ac_cv_header_sys_wait_h=no
3512
 
fi
3513
 
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3514
 
fi
3515
 
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
3516
 
$as_echo "$ac_cv_header_sys_wait_h" >&6; }
3517
 
if test $ac_cv_header_sys_wait_h = yes; then
3518
 
 
3519
 
$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
3520
 
 
3521
 
fi
3522
 
 
3523
 
 
3524
3779
 
3525
3780
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3526
3781
$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3573
3828
  done
3574
3829
IFS=$as_save_IFS
3575
3830
  if test -z "$ac_cv_path_GREP"; then
3576
 
    as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
 
3831
    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3577
3832
  fi
3578
3833
else
3579
3834
  ac_cv_path_GREP=$GREP
3639
3894
  done
3640
3895
IFS=$as_save_IFS
3641
3896
  if test -z "$ac_cv_path_EGREP"; then
3642
 
    as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
 
3897
    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3643
3898
  fi
3644
3899
else
3645
3900
  ac_cv_path_EGREP=$EGREP
3771
4026
  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
3772
4027
ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
3773
4028
"
3774
 
eval as_val=\$$as_ac_Header
3775
 
   if test "x$as_val" = x""yes; then :
 
4029
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
3776
4030
  cat >>confdefs.h <<_ACEOF
3777
4031
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
3778
4032
_ACEOF
3782
4036
done
3783
4037
 
3784
4038
 
3785
 
for ac_header in ctype.h pwd.h stdlib.h string.h strings.h sys/time.h
 
4039
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
 
4040
$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
 
4041
if test "${ac_cv_header_stdbool_h+set}" = set; then :
 
4042
  $as_echo_n "(cached) " >&6
 
4043
else
 
4044
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
4045
/* end confdefs.h.  */
 
4046
 
 
4047
#include <stdbool.h>
 
4048
#ifndef bool
 
4049
 "error: bool is not defined"
 
4050
#endif
 
4051
#ifndef false
 
4052
 "error: false is not defined"
 
4053
#endif
 
4054
#if false
 
4055
 "error: false is not 0"
 
4056
#endif
 
4057
#ifndef true
 
4058
 "error: true is not defined"
 
4059
#endif
 
4060
#if true != 1
 
4061
 "error: true is not 1"
 
4062
#endif
 
4063
#ifndef __bool_true_false_are_defined
 
4064
 "error: __bool_true_false_are_defined is not defined"
 
4065
#endif
 
4066
 
 
4067
        struct s { _Bool s: 1; _Bool t; } s;
 
4068
 
 
4069
        char a[true == 1 ? 1 : -1];
 
4070
        char b[false == 0 ? 1 : -1];
 
4071
        char c[__bool_true_false_are_defined == 1 ? 1 : -1];
 
4072
        char d[(bool) 0.5 == true ? 1 : -1];
 
4073
        bool e = &s;
 
4074
        char f[(_Bool) 0.0 == false ? 1 : -1];
 
4075
        char g[true];
 
4076
        char h[sizeof (_Bool)];
 
4077
        char i[sizeof s.t];
 
4078
        enum { j = false, k = true, l = false * true, m = true * 256 };
 
4079
        /* The following fails for
 
4080
           HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
 
4081
        _Bool n[m];
 
4082
        char o[sizeof n == m * sizeof n[0] ? 1 : -1];
 
4083
        char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
 
4084
#       if defined __xlc__ || defined __GNUC__
 
4085
         /* Catch a bug in IBM AIX xlc compiler version 6.0.0.0
 
4086
            reported by James Lemley on 2005-10-05; see
 
4087
            http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html
 
4088
            This test is not quite right, since xlc is allowed to
 
4089
            reject this program, as the initializer for xlcbug is
 
4090
            not one of the forms that C requires support for.
 
4091
            However, doing the test right would require a runtime
 
4092
            test, and that would make cross-compilation harder.
 
4093
            Let us hope that IBM fixes the xlc bug, and also adds
 
4094
            support for this kind of constant expression.  In the
 
4095
            meantime, this test will reject xlc, which is OK, since
 
4096
            our stdbool.h substitute should suffice.  We also test
 
4097
            this with GCC, where it should work, to detect more
 
4098
            quickly whether someone messes up the test in the
 
4099
            future.  */
 
4100
         char digs[] = "0123456789";
 
4101
         int xlcbug = 1 / (&(digs + 5)[-2 + (bool) 1] == &digs[4] ? 1 : -1);
 
4102
#       endif
 
4103
        /* Catch a bug in an HP-UX C compiler.  See
 
4104
           http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
 
4105
           http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
 
4106
         */
 
4107
        _Bool q = true;
 
4108
        _Bool *pq = &q;
 
4109
 
 
4110
int
 
4111
main ()
 
4112
{
 
4113
 
 
4114
        *pq |= q;
 
4115
        *pq |= ! q;
 
4116
        /* Refer to every declared value, to avoid compiler optimizations.  */
 
4117
        return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
 
4118
                + !m + !n + !o + !p + !q + !pq);
 
4119
 
 
4120
  ;
 
4121
  return 0;
 
4122
}
 
4123
_ACEOF
 
4124
if ac_fn_c_try_compile "$LINENO"; then :
 
4125
  ac_cv_header_stdbool_h=yes
 
4126
else
 
4127
  ac_cv_header_stdbool_h=no
 
4128
fi
 
4129
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
4130
fi
 
4131
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
 
4132
$as_echo "$ac_cv_header_stdbool_h" >&6; }
 
4133
ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
 
4134
if test "x$ac_cv_type__Bool" = x""yes; then :
 
4135
 
 
4136
cat >>confdefs.h <<_ACEOF
 
4137
#define HAVE__BOOL 1
 
4138
_ACEOF
 
4139
 
 
4140
 
 
4141
fi
 
4142
 
 
4143
if test $ac_cv_header_stdbool_h = yes; then
 
4144
 
 
4145
$as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
 
4146
 
 
4147
fi
 
4148
 
 
4149
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
 
4150
$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
 
4151
if test "${ac_cv_header_sys_wait_h+set}" = set; then :
 
4152
  $as_echo_n "(cached) " >&6
 
4153
else
 
4154
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
4155
/* end confdefs.h.  */
 
4156
#include <sys/types.h>
 
4157
#include <sys/wait.h>
 
4158
#ifndef WEXITSTATUS
 
4159
# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
 
4160
#endif
 
4161
#ifndef WIFEXITED
 
4162
# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
 
4163
#endif
 
4164
 
 
4165
int
 
4166
main ()
 
4167
{
 
4168
  int s;
 
4169
  wait (&s);
 
4170
  s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
 
4171
  ;
 
4172
  return 0;
 
4173
}
 
4174
_ACEOF
 
4175
if ac_fn_c_try_compile "$LINENO"; then :
 
4176
  ac_cv_header_sys_wait_h=yes
 
4177
else
 
4178
  ac_cv_header_sys_wait_h=no
 
4179
fi
 
4180
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
4181
fi
 
4182
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
 
4183
$as_echo "$ac_cv_header_sys_wait_h" >&6; }
 
4184
if test $ac_cv_header_sys_wait_h = yes; then
 
4185
 
 
4186
$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
 
4187
 
 
4188
fi
 
4189
 
 
4190
 
 
4191
for ac_header in ctype.h pwd.h stdlib.h string.h strings.h sys/time.h sys/mman.h
3786
4192
do :
3787
4193
  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
3788
4194
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
3789
 
eval as_val=\$$as_ac_Header
3790
 
   if test "x$as_val" = x""yes; then :
 
4195
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
3791
4196
  cat >>confdefs.h <<_ACEOF
3792
4197
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
3793
4198
_ACEOF
3796
4201
 
3797
4202
done
3798
4203
 
3799
 
 
3800
 
for ac_func in asprintf
 
4204
for ac_header in termios.h
3801
4205
do :
3802
 
  ac_fn_c_check_func "$LINENO" "asprintf" "ac_cv_func_asprintf"
3803
 
if test "x$ac_cv_func_asprintf" = x""yes; then :
 
4206
  ac_fn_c_check_header_mongrel "$LINENO" "termios.h" "ac_cv_header_termios_h" "$ac_includes_default"
 
4207
if test "x$ac_cv_header_termios_h" = x""yes; then :
3804
4208
  cat >>confdefs.h <<_ACEOF
3805
 
#define HAVE_ASPRINTF 1
 
4209
#define HAVE_TERMIOS_H 1
3806
4210
_ACEOF
3807
4211
 
3808
4212
fi
 
4213
 
3809
4214
done
3810
4215
 
 
4216
 
3811
4217
for ac_func in gethostname
3812
4218
do :
3813
4219
  ac_fn_c_check_func "$LINENO" "gethostname" "ac_cv_func_gethostname"
3819
4225
fi
3820
4226
done
3821
4227
 
 
4228
for ac_func in getopt_long
 
4229
do :
 
4230
  ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
 
4231
if test "x$ac_cv_func_getopt_long" = x""yes; then :
 
4232
  cat >>confdefs.h <<_ACEOF
 
4233
#define HAVE_GETOPT_LONG 1
 
4234
_ACEOF
 
4235
 
 
4236
fi
 
4237
done
 
4238
 
3822
4239
for ac_func in getpwuid
3823
4240
do :
3824
4241
  ac_fn_c_check_func "$LINENO" "getpwuid" "ac_cv_func_getpwuid"
3863
4280
fi
3864
4281
done
3865
4282
 
3866
 
for ac_func in snprintf
3867
 
do :
3868
 
  ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
3869
 
if test "x$ac_cv_func_snprintf" = x""yes; then :
3870
 
  cat >>confdefs.h <<_ACEOF
3871
 
#define HAVE_SNPRINTF 1
3872
 
_ACEOF
3873
 
 
3874
 
fi
3875
 
done
3876
 
 
3877
4283
for ac_func in strndup
3878
4284
do :
3879
4285
  ac_fn_c_check_func "$LINENO" "strndup" "ac_cv_func_strndup"
3896
4302
fi
3897
4303
done
3898
4304
 
3899
 
for ac_func in vasprintf
3900
 
do :
3901
 
  ac_fn_c_check_func "$LINENO" "vasprintf" "ac_cv_func_vasprintf"
3902
 
if test "x$ac_cv_func_vasprintf" = x""yes; then :
3903
 
  cat >>confdefs.h <<_ACEOF
3904
 
#define HAVE_VASPRINTF 1
3905
 
_ACEOF
3906
 
 
3907
 
fi
3908
 
done
3909
 
 
3910
 
for ac_func in vsnprintf
3911
 
do :
3912
 
  ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
3913
 
if test "x$ac_cv_func_vsnprintf" = x""yes; then :
3914
 
  cat >>confdefs.h <<_ACEOF
3915
 
#define HAVE_VSNPRINTF 1
3916
 
_ACEOF
3917
 
 
3918
 
fi
3919
 
done
3920
 
 
3921
4305
 
3922
4306
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compar_fn_t in stdlib.h" >&5
3923
4307
$as_echo_n "checking for compar_fn_t in stdlib.h... " >&6; }
3951
4335
 
3952
4336
fi
3953
4337
 
3954
 
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C99 vsnprintf" >&5
3955
 
$as_echo_n "checking for C99 vsnprintf... " >&6; }
3956
 
if test "${ccache_cv_HAVE_C99_VSNPRINTF+set}" = set; then :
3957
 
  $as_echo_n "(cached) " >&6
3958
 
else
3959
 
 
3960
 
if test "$cross_compiling" = yes; then :
3961
 
  ccache_cv_HAVE_C99_VSNPRINTF=cross
3962
 
else
3963
 
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3964
 
/* end confdefs.h.  */
3965
 
 
3966
 
#include <sys/types.h>
3967
 
#include <stdarg.h>
 
4338
# $Id: snprintf.m4,v 1.1.1.1 2008/01/06 03:24:00 holger Exp $
 
4339
 
 
4340
# Copyright (c) 2008 Holger Weiss <holger@jhweiss.de>.
 
4341
#
 
4342
# This code may freely be used, modified and/or redistributed for any purpose.
 
4343
# It would be nice if additions and fixes to this file (including trivial code
 
4344
# cleanups) would be sent back in order to let me include them in the version
 
4345
# available at <http://www.jhweiss.de/software/snprintf.html>.  However, this is
 
4346
# not a requirement for using or redistributing (possibly modified) versions of
 
4347
# this file, nor is leaving this notice intact mandatory.
 
4348
 
 
4349
# HW_HEADER_STDARG_H
 
4350
# ------------------
 
4351
# Define HAVE_STDARG_H to 1 if <stdarg.h> is available.
 
4352
# HW_HEADER_STDARG_H
 
4353
 
 
4354
# HW_HEADER_VARARGS_H
 
4355
# -------------------
 
4356
# Define HAVE_VARARGS_H to 1 if <varargs.h> is available.
 
4357
# HW_HEADER_VARARGS_H
 
4358
 
 
4359
# HW_FUNC_VA_COPY
 
4360
# ---------------
 
4361
# Set $hw_cv_func_va_copy to "yes" or "no".  Define HAVE_VA_COPY to 1 if
 
4362
# $hw_cv_func_va_copy is set to "yes".  Note that it's "unspecified whether
 
4363
# va_copy and va_end are macros or identifiers declared with external linkage."
 
4364
# (C99: 7.15.1, 1)  Therefore, the presence of va_copy(3) cannot simply "be
 
4365
# tested with #ifdef", as suggested by the Autoconf manual (5.5.1).
 
4366
# HW_FUNC_VA_COPY
 
4367
 
 
4368
# HW_FUNC___VA_COPY
 
4369
# -----------------
 
4370
# Set $hw_cv_func___va_copy to "yes" or "no".  Define HAVE___VA_COPY to 1 if
 
4371
# $hw_cv_func___va_copy is set to "yes".
 
4372
# HW_FUNC___VA_COPY
 
4373
 
 
4374
# HW_FUNC_VSNPRINTF
 
4375
# -----------------
 
4376
# Set $hw_cv_func_vsnprintf and $hw_cv_func_vsnprintf_c99 to "yes" or "no",
 
4377
# respectively.  Define HAVE_VSNPRINTF to 1 only if $hw_cv_func_vsnprintf_c99
 
4378
# is set to "yes".  Otherwise, define vsnprintf to rpl_vsnprintf and make sure
 
4379
# the replacement function will be built.
 
4380
# HW_FUNC_VSNPRINTF
 
4381
 
 
4382
# HW_FUNC_SNPRINTF
 
4383
# ----------------
 
4384
# Set $hw_cv_func_snprintf and $hw_cv_func_snprintf_c99 to "yes" or "no",
 
4385
# respectively.  Define HAVE_SNPRINTF to 1 only if $hw_cv_func_snprintf_c99
 
4386
# is set to "yes".  Otherwise, define snprintf to rpl_snprintf and make sure
 
4387
# the replacement function will be built.
 
4388
# HW_FUNC_SNPRINTF
 
4389
 
 
4390
# HW_FUNC_VASPRINTF
 
4391
# -----------------
 
4392
# Set $hw_cv_func_vasprintf to "yes" or "no".  Define HAVE_VASPRINTF to 1 if
 
4393
# $hw_cv_func_vasprintf is set to "yes".  Otherwise, define vasprintf to
 
4394
# rpl_vasprintf and make sure the replacement function will be built.
 
4395
# HW_FUNC_VASPRINTF
 
4396
 
 
4397
# HW_FUNC_ASPRINTF
 
4398
# ----------------
 
4399
# Set $hw_cv_func_asprintf to "yes" or "no".  Define HAVE_ASPRINTF to 1 if
 
4400
# $hw_cv_func_asprintf is set to "yes".  Otherwise, define asprintf to
 
4401
# rpl_asprintf and make sure the replacement function will be built.
 
4402
# HW_FUNC_ASPRINTF
 
4403
 
 
4404
# _HW_FUNC_XPRINTF_REPLACE
 
4405
# ------------------------
 
4406
# Arrange for building snprintf.c.  Must be called if one or more of the
 
4407
# functions provided by snprintf.c are needed.
 
4408
# _HW_FUNC_XPRINTF_REPLACE
 
4409
 
 
4410
 
 
4411
 
 
4412
 
 
4413
 
 
4414
  for ac_header in $ac_header_list
 
4415
do :
 
4416
  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 
4417
ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
 
4418
"
 
4419
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
 
4420
  cat >>confdefs.h <<_ACEOF
 
4421
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 
4422
_ACEOF
 
4423
 
 
4424
fi
 
4425
 
 
4426
done
 
4427
 
 
4428
 
 
4429
 
 
4430
 
 
4431
 
 
4432
 
 
4433
 
 
4434
      ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
 
4435
if test "x$ac_cv_func_vsnprintf" = x""yes; then :
 
4436
  hw_cv_func_vsnprintf=yes
 
4437
else
 
4438
  hw_cv_func_vsnprintf=no
 
4439
fi
 
4440
 
 
4441
  if test "$hw_cv_func_vsnprintf" = yes; then :
 
4442
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether vsnprintf is C99 compliant" >&5
 
4443
$as_echo_n "checking whether vsnprintf is C99 compliant... " >&6; }
 
4444
if test "${hw_cv_func_vsnprintf_c99+set}" = set; then :
 
4445
  $as_echo_n "(cached) " >&6
 
4446
else
 
4447
  if test "$cross_compiling" = yes; then :
 
4448
  hw_cv_func_vsnprintf_c99=no
 
4449
else
 
4450
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
4451
/* end confdefs.h.  */
 
4452
#if HAVE_STDARG_H
 
4453
          #include <stdarg.h>
 
4454
          #endif
 
4455
          #include <stdio.h>
 
4456
          static int testprintf(char *buf, size_t size, const char *format, ...)
 
4457
          {
 
4458
            int result;
 
4459
            va_list ap;
 
4460
            va_start(ap, format);
 
4461
            result = vsnprintf(buf, size, format, ap);
 
4462
            va_end(ap);
 
4463
            return result;
 
4464
          }
 
4465
int
 
4466
main ()
 
4467
{
 
4468
char buf[43];
 
4469
          if (testprintf(buf, 4, "The answer is %27.2g.", 42.0) != 42 ||
 
4470
              testprintf(buf, 0, "No, it's %32zu.", (size_t)42) != 42 ||
 
4471
              buf[0] != 'T' || buf[3] != '\0')
 
4472
            return 1;
 
4473
  ;
 
4474
  return 0;
 
4475
}
 
4476
_ACEOF
 
4477
if ac_fn_c_try_run "$LINENO"; then :
 
4478
  hw_cv_func_vsnprintf_c99=yes
 
4479
else
 
4480
  hw_cv_func_vsnprintf_c99=no
 
4481
fi
 
4482
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
 
4483
  conftest.$ac_objext conftest.beam conftest.$ac_ext
 
4484
fi
 
4485
 
 
4486
fi
 
4487
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hw_cv_func_vsnprintf_c99" >&5
 
4488
$as_echo "$hw_cv_func_vsnprintf_c99" >&6; }
 
4489
else
 
4490
  hw_cv_func_snprintf_c99=no
 
4491
fi
 
4492
  if test "$hw_cv_func_vsnprintf_c99" = yes; then :
 
4493
 
 
4494
$as_echo "#define HAVE_VSNPRINTF 1" >>confdefs.h
 
4495
 
 
4496
else
 
4497
  for ac_header in inttypes.h locale.h stddef.h stdint.h
 
4498
do :
 
4499
  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 
4500
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
 
4501
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
 
4502
  cat >>confdefs.h <<_ACEOF
 
4503
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 
4504
_ACEOF
 
4505
 
 
4506
fi
 
4507
 
 
4508
done
 
4509
 
 
4510
    ac_fn_c_check_member "$LINENO" "struct lconv" "decimal_point" "ac_cv_member_struct_lconv_decimal_point" "#include <locale.h>
 
4511
"
 
4512
if test "x$ac_cv_member_struct_lconv_decimal_point" = x""yes; then :
 
4513
 
 
4514
cat >>confdefs.h <<_ACEOF
 
4515
#define HAVE_STRUCT_LCONV_DECIMAL_POINT 1
 
4516
_ACEOF
 
4517
 
 
4518
 
 
4519
fi
 
4520
ac_fn_c_check_member "$LINENO" "struct lconv" "thousands_sep" "ac_cv_member_struct_lconv_thousands_sep" "#include <locale.h>
 
4521
"
 
4522
if test "x$ac_cv_member_struct_lconv_thousands_sep" = x""yes; then :
 
4523
 
 
4524
cat >>confdefs.h <<_ACEOF
 
4525
#define HAVE_STRUCT_LCONV_THOUSANDS_SEP 1
 
4526
_ACEOF
 
4527
 
 
4528
 
 
4529
fi
 
4530
 
 
4531
 
 
4532
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
 
4533
$as_echo_n "checking for long long int... " >&6; }
 
4534
if test "${ac_cv_type_long_long_int+set}" = set; then :
 
4535
  $as_echo_n "(cached) " >&6
 
4536
else
 
4537
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
4538
/* end confdefs.h.  */
 
4539
 
 
4540
  /* For now, do not test the preprocessor; as of 2007 there are too many
 
4541
         implementations with broken preprocessors.  Perhaps this can
 
4542
         be revisited in 2012.  In the meantime, code should not expect
 
4543
         #if to work with literals wider than 32 bits.  */
 
4544
      /* Test literals.  */
 
4545
      long long int ll = 9223372036854775807ll;
 
4546
      long long int nll = -9223372036854775807LL;
 
4547
      unsigned long long int ull = 18446744073709551615ULL;
 
4548
      /* Test constant expressions.   */
 
4549
      typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
 
4550
                     ? 1 : -1)];
 
4551
      typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
 
4552
                     ? 1 : -1)];
 
4553
      int i = 63;
 
4554
int
 
4555
main ()
 
4556
{
 
4557
/* Test availability of runtime routines for shift and division.  */
 
4558
      long long int llmax = 9223372036854775807ll;
 
4559
      unsigned long long int ullmax = 18446744073709551615ull;
 
4560
      return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
 
4561
              | (llmax / ll) | (llmax % ll)
 
4562
              | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
 
4563
              | (ullmax / ull) | (ullmax % ull));
 
4564
  ;
 
4565
  return 0;
 
4566
}
 
4567
 
 
4568
_ACEOF
 
4569
if ac_fn_c_try_link "$LINENO"; then :
 
4570
                        if test "$cross_compiling" = yes; then :
 
4571
  ac_cv_type_long_long_int=yes
 
4572
else
 
4573
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
4574
/* end confdefs.h.  */
 
4575
#include <limits.h>
 
4576
               #ifndef LLONG_MAX
 
4577
               # define HALF \
 
4578
                        (1LL << (sizeof (long long int) * CHAR_BIT - 2))
 
4579
               # define LLONG_MAX (HALF - 1 + HALF)
 
4580
               #endif
 
4581
int
 
4582
main ()
 
4583
{
 
4584
long long int n = 1;
 
4585
               int i;
 
4586
               for (i = 0; ; i++)
 
4587
                 {
 
4588
                   long long int m = n << i;
 
4589
                   if (m >> i != n)
 
4590
                     return 1;
 
4591
                   if (LLONG_MAX / 2 < m)
 
4592
                     break;
 
4593
                 }
 
4594
               return 0;
 
4595
  ;
 
4596
  return 0;
 
4597
}
 
4598
_ACEOF
 
4599
if ac_fn_c_try_run "$LINENO"; then :
 
4600
  ac_cv_type_long_long_int=yes
 
4601
else
 
4602
  ac_cv_type_long_long_int=no
 
4603
fi
 
4604
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
 
4605
  conftest.$ac_objext conftest.beam conftest.$ac_ext
 
4606
fi
 
4607
 
 
4608
else
 
4609
  ac_cv_type_long_long_int=no
 
4610
fi
 
4611
rm -f core conftest.err conftest.$ac_objext \
 
4612
    conftest$ac_exeext conftest.$ac_ext
 
4613
fi
 
4614
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
 
4615
$as_echo "$ac_cv_type_long_long_int" >&6; }
 
4616
  if test $ac_cv_type_long_long_int = yes; then
 
4617
 
 
4618
$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
 
4619
 
 
4620
  fi
 
4621
 
 
4622
 
 
4623
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
 
4624
$as_echo_n "checking for unsigned long long int... " >&6; }
 
4625
if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then :
 
4626
  $as_echo_n "(cached) " >&6
 
4627
else
 
4628
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
4629
/* end confdefs.h.  */
 
4630
 
 
4631
  /* For now, do not test the preprocessor; as of 2007 there are too many
 
4632
         implementations with broken preprocessors.  Perhaps this can
 
4633
         be revisited in 2012.  In the meantime, code should not expect
 
4634
         #if to work with literals wider than 32 bits.  */
 
4635
      /* Test literals.  */
 
4636
      long long int ll = 9223372036854775807ll;
 
4637
      long long int nll = -9223372036854775807LL;
 
4638
      unsigned long long int ull = 18446744073709551615ULL;
 
4639
      /* Test constant expressions.   */
 
4640
      typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
 
4641
                     ? 1 : -1)];
 
4642
      typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
 
4643
                     ? 1 : -1)];
 
4644
      int i = 63;
 
4645
int
 
4646
main ()
 
4647
{
 
4648
/* Test availability of runtime routines for shift and division.  */
 
4649
      long long int llmax = 9223372036854775807ll;
 
4650
      unsigned long long int ullmax = 18446744073709551615ull;
 
4651
      return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
 
4652
              | (llmax / ll) | (llmax % ll)
 
4653
              | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
 
4654
              | (ullmax / ull) | (ullmax % ull));
 
4655
  ;
 
4656
  return 0;
 
4657
}
 
4658
 
 
4659
_ACEOF
 
4660
if ac_fn_c_try_link "$LINENO"; then :
 
4661
  ac_cv_type_unsigned_long_long_int=yes
 
4662
else
 
4663
  ac_cv_type_unsigned_long_long_int=no
 
4664
fi
 
4665
rm -f core conftest.err conftest.$ac_objext \
 
4666
    conftest$ac_exeext conftest.$ac_ext
 
4667
fi
 
4668
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
 
4669
$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
 
4670
  if test $ac_cv_type_unsigned_long_long_int = yes; then
 
4671
 
 
4672
$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
 
4673
 
 
4674
  fi
 
4675
 
 
4676
    ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
 
4677
if test "x$ac_cv_type_size_t" = x""yes; then :
 
4678
 
 
4679
else
 
4680
 
 
4681
cat >>confdefs.h <<_ACEOF
 
4682
#define size_t unsigned int
 
4683
_ACEOF
 
4684
 
 
4685
fi
 
4686
 
 
4687
 
 
4688
 
 
4689
  ac_fn_c_check_type "$LINENO" "intmax_t" "ac_cv_type_intmax_t" "$ac_includes_default"
 
4690
if test "x$ac_cv_type_intmax_t" = x""yes; then :
 
4691
 
 
4692
$as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h
 
4693
 
 
4694
else
 
4695
  test $ac_cv_type_long_long_int = yes \
 
4696
       && ac_type='long long int' \
 
4697
       || ac_type='long int'
 
4698
 
 
4699
cat >>confdefs.h <<_ACEOF
 
4700
#define intmax_t $ac_type
 
4701
_ACEOF
 
4702
 
 
4703
fi
 
4704
 
 
4705
 
 
4706
 
 
4707
 
 
4708
  ac_fn_c_check_type "$LINENO" "uintmax_t" "ac_cv_type_uintmax_t" "$ac_includes_default"
 
4709
if test "x$ac_cv_type_uintmax_t" = x""yes; then :
 
4710
 
 
4711
$as_echo "#define HAVE_UINTMAX_T 1" >>confdefs.h
 
4712
 
 
4713
else
 
4714
  test $ac_cv_type_unsigned_long_long_int = yes \
 
4715
       && ac_type='unsigned long long int' \
 
4716
       || ac_type='unsigned long int'
 
4717
 
 
4718
cat >>confdefs.h <<_ACEOF
 
4719
#define uintmax_t $ac_type
 
4720
_ACEOF
 
4721
 
 
4722
fi
 
4723
 
 
4724
 
 
4725
 
 
4726
  ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
 
4727
if test "x$ac_cv_type_uintptr_t" = x""yes; then :
 
4728
 
 
4729
$as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
 
4730
 
 
4731
else
 
4732
  for ac_type in 'unsigned int' 'unsigned long int' \
 
4733
        'unsigned long long int'; do
 
4734
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
4735
/* end confdefs.h.  */
 
4736
$ac_includes_default
 
4737
int
 
4738
main ()
 
4739
{
 
4740
static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
 
4741
test_array [0] = 0
 
4742
 
 
4743
  ;
 
4744
  return 0;
 
4745
}
 
4746
_ACEOF
 
4747
if ac_fn_c_try_compile "$LINENO"; then :
 
4748
 
 
4749
cat >>confdefs.h <<_ACEOF
 
4750
#define uintptr_t $ac_type
 
4751
_ACEOF
 
4752
 
 
4753
          ac_type=
 
4754
fi
 
4755
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
4756
       test -z "$ac_type" && break
 
4757
     done
 
4758
fi
 
4759
 
 
4760
 
 
4761
    ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
 
4762
if test "x$ac_cv_type_ptrdiff_t" = x""yes; then :
 
4763
 
 
4764
cat >>confdefs.h <<_ACEOF
 
4765
#define HAVE_PTRDIFF_T 1
 
4766
_ACEOF
 
4767
 
 
4768
 
 
4769
fi
 
4770
 
 
4771
    for ac_func in localeconv
 
4772
do :
 
4773
  ac_fn_c_check_func "$LINENO" "localeconv" "ac_cv_func_localeconv"
 
4774
if test "x$ac_cv_func_localeconv" = x""yes; then :
 
4775
  cat >>confdefs.h <<_ACEOF
 
4776
#define HAVE_LOCALECONV 1
 
4777
_ACEOF
 
4778
 
 
4779
fi
 
4780
done
 
4781
 
 
4782
 
 
4783
  if test "x$_hw_cv_func_xprintf_replace_done" != xyes; then :
 
4784
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
 
4785
$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
 
4786
if test "${ac_cv_c_const+set}" = set; then :
 
4787
  $as_echo_n "(cached) " >&6
 
4788
else
 
4789
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
4790
/* end confdefs.h.  */
 
4791
 
 
4792
int
 
4793
main ()
 
4794
{
 
4795
/* FIXME: Include the comments suggested by Paul. */
 
4796
#ifndef __cplusplus
 
4797
  /* Ultrix mips cc rejects this.  */
 
4798
  typedef int charset[2];
 
4799
  const charset cs;
 
4800
  /* SunOS 4.1.1 cc rejects this.  */
 
4801
  char const *const *pcpcc;
 
4802
  char **ppc;
 
4803
  /* NEC SVR4.0.2 mips cc rejects this.  */
 
4804
  struct point {int x, y;};
 
4805
  static struct point const zero = {0,0};
 
4806
  /* AIX XL C 1.02.0.0 rejects this.
 
4807
     It does not let you subtract one const X* pointer from another in
 
4808
     an arm of an if-expression whose if-part is not a constant
 
4809
     expression */
 
4810
  const char *g = "string";
 
4811
  pcpcc = &g + (g ? g-g : 0);
 
4812
  /* HPUX 7.0 cc rejects these. */
 
4813
  ++pcpcc;
 
4814
  ppc = (char**) pcpcc;
 
4815
  pcpcc = (char const *const *) ppc;
 
4816
  { /* SCO 3.2v4 cc rejects this.  */
 
4817
    char *t;
 
4818
    char const *s = 0 ? (char *) 0 : (char const *) 0;
 
4819
 
 
4820
    *t++ = 0;
 
4821
    if (s) return 0;
 
4822
  }
 
4823
  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
 
4824
    int x[] = {25, 17};
 
4825
    const int *foo = &x[0];
 
4826
    ++foo;
 
4827
  }
 
4828
  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
 
4829
    typedef const int *iptr;
 
4830
    iptr p = 0;
 
4831
    ++p;
 
4832
  }
 
4833
  { /* AIX XL C 1.02.0.0 rejects this saying
 
4834
       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
 
4835
    struct s { int j; const int *ap[3]; };
 
4836
    struct s *b; b->j = 5;
 
4837
  }
 
4838
  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
 
4839
    const int foo = 10;
 
4840
    if (!foo) return 0;
 
4841
  }
 
4842
  return !cs[0] && !zero.x;
 
4843
#endif
 
4844
 
 
4845
  ;
 
4846
  return 0;
 
4847
}
 
4848
_ACEOF
 
4849
if ac_fn_c_try_compile "$LINENO"; then :
 
4850
  ac_cv_c_const=yes
 
4851
else
 
4852
  ac_cv_c_const=no
 
4853
fi
 
4854
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
4855
fi
 
4856
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
 
4857
$as_echo "$ac_cv_c_const" >&6; }
 
4858
if test $ac_cv_c_const = no; then
 
4859
 
 
4860
$as_echo "#define const /**/" >>confdefs.h
 
4861
 
 
4862
fi
 
4863
 
 
4864
 
 
4865
 
 
4866
 
 
4867
    case " $LIBOBJS " in
 
4868
  *" snprintf.$ac_objext "* ) ;;
 
4869
  *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
 
4870
 ;;
 
4871
esac
 
4872
 
 
4873
    _hw_cv_func_xprintf_replace_done=yes
 
4874
fi
 
4875
 
 
4876
fi
 
4877
 
 
4878
 
 
4879
    ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
 
4880
if test "x$ac_cv_func_snprintf" = x""yes; then :
 
4881
  hw_cv_func_snprintf=yes
 
4882
else
 
4883
  hw_cv_func_snprintf=no
 
4884
fi
 
4885
 
 
4886
  if test "$hw_cv_func_snprintf" = yes; then :
 
4887
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf is C99 compliant" >&5
 
4888
$as_echo_n "checking whether snprintf is C99 compliant... " >&6; }
 
4889
if test "${hw_cv_func_snprintf_c99+set}" = set; then :
 
4890
  $as_echo_n "(cached) " >&6
 
4891
else
 
4892
  if test "$cross_compiling" = yes; then :
 
4893
  hw_cv_func_snprintf_c99=no
 
4894
else
 
4895
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
4896
/* end confdefs.h.  */
3968
4897
#include <stdio.h>
3969
 
void foo(const char *format, ...) {
3970
 
    va_list ap;
3971
 
    int len;
3972
 
    char buf[5];
3973
 
 
3974
 
    va_start(ap, format);
3975
 
    len = vsnprintf(0, 0, format, ap);
3976
 
    va_end(ap);
3977
 
    if (len != 5) exit(1);
3978
 
 
3979
 
    if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1);
3980
 
 
3981
 
    exit(0);
3982
 
}
3983
 
main() { foo("hello"); }
3984
 
 
3985
 
_ACEOF
3986
 
if ac_fn_c_try_run "$LINENO"; then :
3987
 
  ccache_cv_HAVE_C99_VSNPRINTF=yes
3988
 
else
3989
 
  ccache_cv_HAVE_C99_VSNPRINTF=no
3990
 
fi
3991
 
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3992
 
  conftest.$ac_objext conftest.beam conftest.$ac_ext
3993
 
fi
3994
 
 
3995
 
fi
3996
 
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ccache_cv_HAVE_C99_VSNPRINTF" >&5
3997
 
$as_echo "$ccache_cv_HAVE_C99_VSNPRINTF" >&6; }
3998
 
if test x"$ccache_cv_HAVE_C99_VSNPRINTF" = x"yes"; then
3999
 
 
4000
 
$as_echo "#define HAVE_C99_VSNPRINTF 1" >>confdefs.h
4001
 
 
4002
 
fi
 
4898
int
 
4899
main ()
 
4900
{
 
4901
char buf[43];
 
4902
          if (snprintf(buf, 4, "The answer is %27.2g.", 42.0) != 42 ||
 
4903
              snprintf(buf, 0, "No, it's %32zu.", (size_t)42) != 42 ||
 
4904
              buf[0] != 'T' || buf[3] != '\0')
 
4905
            return 1;
 
4906
  ;
 
4907
  return 0;
 
4908
}
 
4909
_ACEOF
 
4910
if ac_fn_c_try_run "$LINENO"; then :
 
4911
  hw_cv_func_snprintf_c99=yes
 
4912
else
 
4913
  hw_cv_func_snprintf_c99=no
 
4914
fi
 
4915
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
 
4916
  conftest.$ac_objext conftest.beam conftest.$ac_ext
 
4917
fi
 
4918
 
 
4919
fi
 
4920
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hw_cv_func_snprintf_c99" >&5
 
4921
$as_echo "$hw_cv_func_snprintf_c99" >&6; }
 
4922
else
 
4923
  hw_cv_func_snprintf_c99=no
 
4924
fi
 
4925
  if test "$hw_cv_func_snprintf_c99" = yes; then :
 
4926
 
 
4927
$as_echo "#define HAVE_SNPRINTF 1" >>confdefs.h
 
4928
 
 
4929
else
 
4930
 
 
4931
  if test "x$_hw_cv_func_xprintf_replace_done" != xyes; then :
 
4932
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
 
4933
$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
 
4934
if test "${ac_cv_c_const+set}" = set; then :
 
4935
  $as_echo_n "(cached) " >&6
 
4936
else
 
4937
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
4938
/* end confdefs.h.  */
 
4939
 
 
4940
int
 
4941
main ()
 
4942
{
 
4943
/* FIXME: Include the comments suggested by Paul. */
 
4944
#ifndef __cplusplus
 
4945
  /* Ultrix mips cc rejects this.  */
 
4946
  typedef int charset[2];
 
4947
  const charset cs;
 
4948
  /* SunOS 4.1.1 cc rejects this.  */
 
4949
  char const *const *pcpcc;
 
4950
  char **ppc;
 
4951
  /* NEC SVR4.0.2 mips cc rejects this.  */
 
4952
  struct point {int x, y;};
 
4953
  static struct point const zero = {0,0};
 
4954
  /* AIX XL C 1.02.0.0 rejects this.
 
4955
     It does not let you subtract one const X* pointer from another in
 
4956
     an arm of an if-expression whose if-part is not a constant
 
4957
     expression */
 
4958
  const char *g = "string";
 
4959
  pcpcc = &g + (g ? g-g : 0);
 
4960
  /* HPUX 7.0 cc rejects these. */
 
4961
  ++pcpcc;
 
4962
  ppc = (char**) pcpcc;
 
4963
  pcpcc = (char const *const *) ppc;
 
4964
  { /* SCO 3.2v4 cc rejects this.  */
 
4965
    char *t;
 
4966
    char const *s = 0 ? (char *) 0 : (char const *) 0;
 
4967
 
 
4968
    *t++ = 0;
 
4969
    if (s) return 0;
 
4970
  }
 
4971
  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
 
4972
    int x[] = {25, 17};
 
4973
    const int *foo = &x[0];
 
4974
    ++foo;
 
4975
  }
 
4976
  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
 
4977
    typedef const int *iptr;
 
4978
    iptr p = 0;
 
4979
    ++p;
 
4980
  }
 
4981
  { /* AIX XL C 1.02.0.0 rejects this saying
 
4982
       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
 
4983
    struct s { int j; const int *ap[3]; };
 
4984
    struct s *b; b->j = 5;
 
4985
  }
 
4986
  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
 
4987
    const int foo = 10;
 
4988
    if (!foo) return 0;
 
4989
  }
 
4990
  return !cs[0] && !zero.x;
 
4991
#endif
 
4992
 
 
4993
  ;
 
4994
  return 0;
 
4995
}
 
4996
_ACEOF
 
4997
if ac_fn_c_try_compile "$LINENO"; then :
 
4998
  ac_cv_c_const=yes
 
4999
else
 
5000
  ac_cv_c_const=no
 
5001
fi
 
5002
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
5003
fi
 
5004
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
 
5005
$as_echo "$ac_cv_c_const" >&6; }
 
5006
if test $ac_cv_c_const = no; then
 
5007
 
 
5008
$as_echo "#define const /**/" >>confdefs.h
 
5009
 
 
5010
fi
 
5011
 
 
5012
 
 
5013
 
 
5014
 
 
5015
    case " $LIBOBJS " in
 
5016
  *" snprintf.$ac_objext "* ) ;;
 
5017
  *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
 
5018
 ;;
 
5019
esac
 
5020
 
 
5021
    _hw_cv_func_xprintf_replace_done=yes
 
5022
fi
 
5023
 
 
5024
fi
 
5025
 
 
5026
 
 
5027
 
 
5028
 
 
5029
 
 
5030
 
 
5031
 
 
5032
    for ac_func in vasprintf
 
5033
do :
 
5034
  ac_fn_c_check_func "$LINENO" "vasprintf" "ac_cv_func_vasprintf"
 
5035
if test "x$ac_cv_func_vasprintf" = x""yes; then :
 
5036
  cat >>confdefs.h <<_ACEOF
 
5037
#define HAVE_VASPRINTF 1
 
5038
_ACEOF
 
5039
 hw_cv_func_vasprintf=yes
 
5040
else
 
5041
  hw_cv_func_vasprintf=no
 
5042
fi
 
5043
done
 
5044
 
 
5045
  if test "$hw_cv_func_vasprintf" = no; then :
 
5046
  for ac_header in stdlib.h
 
5047
do :
 
5048
  ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
 
5049
if test "x$ac_cv_header_stdlib_h" = x""yes; then :
 
5050
  cat >>confdefs.h <<_ACEOF
 
5051
#define HAVE_STDLIB_H 1
 
5052
_ACEOF
 
5053
 
 
5054
fi
 
5055
 
 
5056
done
 
5057
 
 
5058
 
 
5059
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
 
5060
$as_echo_n "checking for va_copy... " >&6; }
 
5061
if test "${hw_cv_func_va_copy+set}" = set; then :
 
5062
  $as_echo_n "(cached) " >&6
 
5063
else
 
5064
  if test "$cross_compiling" = yes; then :
 
5065
  hw_cv_func_va_copy=no
 
5066
else
 
5067
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
5068
/* end confdefs.h.  */
 
5069
#if HAVE_STDARG_H
 
5070
        #include <stdarg.h>
 
5071
        #elif HAVE_VARARGS_H
 
5072
        #include <varargs.h>
 
5073
        #endif
 
5074
int
 
5075
main ()
 
5076
{
 
5077
va_list ap, aq; va_copy(aq, ap);
 
5078
  ;
 
5079
  return 0;
 
5080
}
 
5081
_ACEOF
 
5082
if ac_fn_c_try_run "$LINENO"; then :
 
5083
  hw_cv_func_va_copy=yes
 
5084
else
 
5085
  hw_cv_func_va_copy=no
 
5086
fi
 
5087
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
 
5088
  conftest.$ac_objext conftest.beam conftest.$ac_ext
 
5089
fi
 
5090
 
 
5091
fi
 
5092
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hw_cv_func_va_copy" >&5
 
5093
$as_echo "$hw_cv_func_va_copy" >&6; }
 
5094
  if test "$hw_cv_func_va_copy" = yes; then :
 
5095
 
 
5096
$as_echo "#define HAVE_VA_COPY 1" >>confdefs.h
 
5097
 
 
5098
fi
 
5099
 
 
5100
    if test "$hw_cv_func_va_copy" = no; then :
 
5101
 
 
5102
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __va_copy" >&5
 
5103
$as_echo_n "checking for __va_copy... " >&6; }
 
5104
if test "${hw_cv_func___va_copy+set}" = set; then :
 
5105
  $as_echo_n "(cached) " >&6
 
5106
else
 
5107
  if test "$cross_compiling" = yes; then :
 
5108
  hw_cv_func___va_copy=no
 
5109
else
 
5110
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
5111
/* end confdefs.h.  */
 
5112
#if HAVE_STDARG_H
 
5113
        #include <stdarg.h>
 
5114
        #elif HAVE_VARARGS_H
 
5115
        #include <varargs.h>
 
5116
        #endif
 
5117
int
 
5118
main ()
 
5119
{
 
5120
va_list ap, aq; __va_copy(aq, ap);
 
5121
  ;
 
5122
  return 0;
 
5123
}
 
5124
_ACEOF
 
5125
if ac_fn_c_try_run "$LINENO"; then :
 
5126
  hw_cv_func___va_copy=yes
 
5127
else
 
5128
  hw_cv_func___va_copy=no
 
5129
fi
 
5130
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
 
5131
  conftest.$ac_objext conftest.beam conftest.$ac_ext
 
5132
fi
 
5133
 
 
5134
fi
 
5135
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hw_cv_func___va_copy" >&5
 
5136
$as_echo "$hw_cv_func___va_copy" >&6; }
 
5137
  if test "$hw_cv_func___va_copy" = yes; then :
 
5138
 
 
5139
$as_echo "#define HAVE___VA_COPY 1" >>confdefs.h
 
5140
 
 
5141
fi
 
5142
 
 
5143
fi
 
5144
 
 
5145
  if test "x$_hw_cv_func_xprintf_replace_done" != xyes; then :
 
5146
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
 
5147
$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
 
5148
if test "${ac_cv_c_const+set}" = set; then :
 
5149
  $as_echo_n "(cached) " >&6
 
5150
else
 
5151
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
5152
/* end confdefs.h.  */
 
5153
 
 
5154
int
 
5155
main ()
 
5156
{
 
5157
/* FIXME: Include the comments suggested by Paul. */
 
5158
#ifndef __cplusplus
 
5159
  /* Ultrix mips cc rejects this.  */
 
5160
  typedef int charset[2];
 
5161
  const charset cs;
 
5162
  /* SunOS 4.1.1 cc rejects this.  */
 
5163
  char const *const *pcpcc;
 
5164
  char **ppc;
 
5165
  /* NEC SVR4.0.2 mips cc rejects this.  */
 
5166
  struct point {int x, y;};
 
5167
  static struct point const zero = {0,0};
 
5168
  /* AIX XL C 1.02.0.0 rejects this.
 
5169
     It does not let you subtract one const X* pointer from another in
 
5170
     an arm of an if-expression whose if-part is not a constant
 
5171
     expression */
 
5172
  const char *g = "string";
 
5173
  pcpcc = &g + (g ? g-g : 0);
 
5174
  /* HPUX 7.0 cc rejects these. */
 
5175
  ++pcpcc;
 
5176
  ppc = (char**) pcpcc;
 
5177
  pcpcc = (char const *const *) ppc;
 
5178
  { /* SCO 3.2v4 cc rejects this.  */
 
5179
    char *t;
 
5180
    char const *s = 0 ? (char *) 0 : (char const *) 0;
 
5181
 
 
5182
    *t++ = 0;
 
5183
    if (s) return 0;
 
5184
  }
 
5185
  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
 
5186
    int x[] = {25, 17};
 
5187
    const int *foo = &x[0];
 
5188
    ++foo;
 
5189
  }
 
5190
  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
 
5191
    typedef const int *iptr;
 
5192
    iptr p = 0;
 
5193
    ++p;
 
5194
  }
 
5195
  { /* AIX XL C 1.02.0.0 rejects this saying
 
5196
       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
 
5197
    struct s { int j; const int *ap[3]; };
 
5198
    struct s *b; b->j = 5;
 
5199
  }
 
5200
  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
 
5201
    const int foo = 10;
 
5202
    if (!foo) return 0;
 
5203
  }
 
5204
  return !cs[0] && !zero.x;
 
5205
#endif
 
5206
 
 
5207
  ;
 
5208
  return 0;
 
5209
}
 
5210
_ACEOF
 
5211
if ac_fn_c_try_compile "$LINENO"; then :
 
5212
  ac_cv_c_const=yes
 
5213
else
 
5214
  ac_cv_c_const=no
 
5215
fi
 
5216
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
5217
fi
 
5218
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
 
5219
$as_echo "$ac_cv_c_const" >&6; }
 
5220
if test $ac_cv_c_const = no; then
 
5221
 
 
5222
$as_echo "#define const /**/" >>confdefs.h
 
5223
 
 
5224
fi
 
5225
 
 
5226
 
 
5227
 
 
5228
 
 
5229
    case " $LIBOBJS " in
 
5230
  *" snprintf.$ac_objext "* ) ;;
 
5231
  *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
 
5232
 ;;
 
5233
esac
 
5234
 
 
5235
    _hw_cv_func_xprintf_replace_done=yes
 
5236
fi
 
5237
 
 
5238
fi
 
5239
 
 
5240
 
 
5241
    for ac_func in asprintf
 
5242
do :
 
5243
  ac_fn_c_check_func "$LINENO" "asprintf" "ac_cv_func_asprintf"
 
5244
if test "x$ac_cv_func_asprintf" = x""yes; then :
 
5245
  cat >>confdefs.h <<_ACEOF
 
5246
#define HAVE_ASPRINTF 1
 
5247
_ACEOF
 
5248
 hw_cv_func_asprintf=yes
 
5249
else
 
5250
  hw_cv_func_asprintf=no
 
5251
fi
 
5252
done
 
5253
 
 
5254
  if test "$hw_cv_func_asprintf" = no; then :
 
5255
 
 
5256
  if test "x$_hw_cv_func_xprintf_replace_done" != xyes; then :
 
5257
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
 
5258
$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
 
5259
if test "${ac_cv_c_const+set}" = set; then :
 
5260
  $as_echo_n "(cached) " >&6
 
5261
else
 
5262
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
5263
/* end confdefs.h.  */
 
5264
 
 
5265
int
 
5266
main ()
 
5267
{
 
5268
/* FIXME: Include the comments suggested by Paul. */
 
5269
#ifndef __cplusplus
 
5270
  /* Ultrix mips cc rejects this.  */
 
5271
  typedef int charset[2];
 
5272
  const charset cs;
 
5273
  /* SunOS 4.1.1 cc rejects this.  */
 
5274
  char const *const *pcpcc;
 
5275
  char **ppc;
 
5276
  /* NEC SVR4.0.2 mips cc rejects this.  */
 
5277
  struct point {int x, y;};
 
5278
  static struct point const zero = {0,0};
 
5279
  /* AIX XL C 1.02.0.0 rejects this.
 
5280
     It does not let you subtract one const X* pointer from another in
 
5281
     an arm of an if-expression whose if-part is not a constant
 
5282
     expression */
 
5283
  const char *g = "string";
 
5284
  pcpcc = &g + (g ? g-g : 0);
 
5285
  /* HPUX 7.0 cc rejects these. */
 
5286
  ++pcpcc;
 
5287
  ppc = (char**) pcpcc;
 
5288
  pcpcc = (char const *const *) ppc;
 
5289
  { /* SCO 3.2v4 cc rejects this.  */
 
5290
    char *t;
 
5291
    char const *s = 0 ? (char *) 0 : (char const *) 0;
 
5292
 
 
5293
    *t++ = 0;
 
5294
    if (s) return 0;
 
5295
  }
 
5296
  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
 
5297
    int x[] = {25, 17};
 
5298
    const int *foo = &x[0];
 
5299
    ++foo;
 
5300
  }
 
5301
  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
 
5302
    typedef const int *iptr;
 
5303
    iptr p = 0;
 
5304
    ++p;
 
5305
  }
 
5306
  { /* AIX XL C 1.02.0.0 rejects this saying
 
5307
       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
 
5308
    struct s { int j; const int *ap[3]; };
 
5309
    struct s *b; b->j = 5;
 
5310
  }
 
5311
  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
 
5312
    const int foo = 10;
 
5313
    if (!foo) return 0;
 
5314
  }
 
5315
  return !cs[0] && !zero.x;
 
5316
#endif
 
5317
 
 
5318
  ;
 
5319
  return 0;
 
5320
}
 
5321
_ACEOF
 
5322
if ac_fn_c_try_compile "$LINENO"; then :
 
5323
  ac_cv_c_const=yes
 
5324
else
 
5325
  ac_cv_c_const=no
 
5326
fi
 
5327
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
5328
fi
 
5329
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
 
5330
$as_echo "$ac_cv_c_const" >&6; }
 
5331
if test $ac_cv_c_const = no; then
 
5332
 
 
5333
$as_echo "#define const /**/" >>confdefs.h
 
5334
 
 
5335
fi
 
5336
 
 
5337
 
 
5338
 
 
5339
 
 
5340
    case " $LIBOBJS " in
 
5341
  *" snprintf.$ac_objext "* ) ;;
 
5342
  *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
 
5343
 ;;
 
5344
esac
 
5345
 
 
5346
    _hw_cv_func_xprintf_replace_done=yes
 
5347
fi
 
5348
 
 
5349
fi
 
5350
 
4003
5351
 
4004
5352
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for zlib >= 1.2.3" >&5
4005
5353
$as_echo_n "checking for zlib >= 1.2.3... " >&6; }
4073
5421
 
4074
5422
if test $ccache_cv_zlib_1_2_3 = yes && test $ac_cv_lib_z_gzdopen = yes; then
4075
5423
    use_bundled_zlib=no
4076
 
    LIBS="-lz $LIBS"
4077
5424
else
4078
5425
    use_bundled_zlib=yes
4079
 
    extra_sources="$extra_sources zlib/adler32.c zlib/compress.c zlib/crc32.c"
4080
 
    extra_sources="$extra_sources zlib/deflate.c zlib/gzio.c zlib/inffast.c"
4081
 
    extra_sources="$extra_sources zlib/inflate.c zlib/inftrees.c zlib/trees.c"
4082
 
    extra_sources="$extra_sources zlib/zutil.c"
 
5426
    extra_deps="zlib/libz.a"
4083
5427
    CPPFLAGS="$CPPFLAGS -I\$(srcdir)/zlib"
 
5428
    LIBS="-Lzlib $LIBS"
4084
5429
    mkdir -p zlib
4085
5430
fi
4086
5431
 
4162
5507
 
4163
5508
fi
4164
5509
 
4165
 
ac_config_files="$ac_config_files Makefile dev.mk"
 
5510
if test -f $srcdir/dev.mk.in && test "$RUN_FROM_BUILD_FARM" != yes; then
 
5511
    { $as_echo "$as_me:${as_lineno-$LINENO}: Enabling developer mode" >&5
 
5512
$as_echo "$as_me: Enabling developer mode" >&6;}
 
5513
    ac_config_files="$ac_config_files dev.mk"
 
5514
 
 
5515
    include_dev_mk='include dev.mk'
 
5516
    version=`(git describe --dirty 2>/dev/null || echo vunknown) | sed -e 's/v//' -e 's/-/+/' -e 's/-/_/g'`
 
5517
    echo "const char CCACHE_VERSION[] = \"$version\";" >version.c
 
5518
elif test ! -f $srcdir/version.c; then
 
5519
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unable to determine ccache version" >&5
 
5520
$as_echo "$as_me: WARNING: unable to determine ccache version" >&2;}
 
5521
    echo "const char CCACHE_VERSION[] = \"unknown\";" >version.c
 
5522
fi
 
5523
 
 
5524
test_suites=""
 
5525
for x in $srcdir/test/test_*.c; do
 
5526
    test_suites="$test_suites $x"
 
5527
done
 
5528
 
 
5529
ac_config_files="$ac_config_files Makefile"
4166
5530
 
4167
5531
cat >confcache <<\_ACEOF
4168
5532
# This file is a shell script that caches the results of configure
4247
5611
 
4248
5612
ac_libobjs=
4249
5613
ac_ltlibobjs=
 
5614
U=
4250
5615
for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
4251
5616
  # 1. Remove the extension, and $U if already installed.
4252
5617
  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
4408
5773
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
4409
5774
 
4410
5775
 
4411
 
# as_fn_error ERROR [LINENO LOG_FD]
4412
 
# ---------------------------------
 
5776
# as_fn_error STATUS ERROR [LINENO LOG_FD]
 
5777
# ----------------------------------------
4413
5778
# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
4414
5779
# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
4415
 
# script with status $?, using 1 if that was 0.
 
5780
# script with STATUS, using 1 if that was 0.
4416
5781
as_fn_error ()
4417
5782
{
4418
 
  as_status=$?; test $as_status -eq 0 && as_status=1
4419
 
  if test "$3"; then
4420
 
    as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
4421
 
    $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
 
5783
  as_status=$1; test $as_status -eq 0 && as_status=1
 
5784
  if test "$4"; then
 
5785
    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
 
5786
    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
4422
5787
  fi
4423
 
  $as_echo "$as_me: error: $1" >&2
 
5788
  $as_echo "$as_me: error: $2" >&2
4424
5789
  as_fn_exit $as_status
4425
5790
} # as_fn_error
4426
5791
 
4616
5981
      test -d "$as_dir" && break
4617
5982
    done
4618
5983
    test -z "$as_dirs" || eval "mkdir $as_dirs"
4619
 
  } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
 
5984
  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
4620
5985
 
4621
5986
 
4622
5987
} # as_fn_mkdir_p
4670
6035
# values after options handling.
4671
6036
ac_log="
4672
6037
This file was extended by $as_me, which was
4673
 
generated by GNU Autoconf 2.65.  Invocation command line was
 
6038
generated by GNU Autoconf 2.67.  Invocation command line was
4674
6039
 
4675
6040
  CONFIG_FILES    = $CONFIG_FILES
4676
6041
  CONFIG_HEADERS  = $CONFIG_HEADERS
4732
6097
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
4733
6098
ac_cs_version="\\
4734
6099
config.status
4735
 
configured by $0, generated by GNU Autoconf 2.65,
 
6100
configured by $0, generated by GNU Autoconf 2.67,
4736
6101
  with options \\"\$ac_cs_config\\"
4737
6102
 
4738
 
Copyright (C) 2009 Free Software Foundation, Inc.
 
6103
Copyright (C) 2010 Free Software Foundation, Inc.
4739
6104
This config.status script is free software; the Free Software Foundation
4740
6105
gives unlimited permission to copy, distribute and modify it."
4741
6106
 
4751
6116
while test $# != 0
4752
6117
do
4753
6118
  case $1 in
4754
 
  --*=*)
 
6119
  --*=?*)
4755
6120
    ac_option=`expr "X$1" : 'X\([^=]*\)='`
4756
6121
    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
4757
6122
    ac_shift=:
4758
6123
    ;;
 
6124
  --*=)
 
6125
    ac_option=`expr "X$1" : 'X\([^=]*\)='`
 
6126
    ac_optarg=
 
6127
    ac_shift=:
 
6128
    ;;
4759
6129
  *)
4760
6130
    ac_option=$1
4761
6131
    ac_optarg=$2
4777
6147
    $ac_shift
4778
6148
    case $ac_optarg in
4779
6149
    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
 
6150
    '') as_fn_error $? "missing file argument" ;;
4780
6151
    esac
4781
6152
    as_fn_append CONFIG_FILES " '$ac_optarg'"
4782
6153
    ac_need_defaults=false;;
4789
6160
    ac_need_defaults=false;;
4790
6161
  --he | --h)
4791
6162
    # Conflict between --help and --header
4792
 
    as_fn_error "ambiguous option: \`$1'
 
6163
    as_fn_error $? "ambiguous option: \`$1'
4793
6164
Try \`$0 --help' for more information.";;
4794
6165
  --help | --hel | -h )
4795
6166
    $as_echo "$ac_cs_usage"; exit ;;
4798
6169
    ac_cs_silent=: ;;
4799
6170
 
4800
6171
  # This is an error.
4801
 
  -*) as_fn_error "unrecognized option: \`$1'
 
6172
  -*) as_fn_error $? "unrecognized option: \`$1'
4802
6173
Try \`$0 --help' for more information." ;;
4803
6174
 
4804
6175
  *) as_fn_append ac_config_targets " $1"
4848
6219
do
4849
6220
  case $ac_config_target in
4850
6221
    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
 
6222
    "dev.mk") CONFIG_FILES="$CONFIG_FILES dev.mk" ;;
4851
6223
    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
4852
 
    "dev.mk") CONFIG_FILES="$CONFIG_FILES dev.mk" ;;
4853
6224
 
4854
 
  *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
 
6225
  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
4855
6226
  esac
4856
6227
done
4857
6228
 
4888
6259
{
4889
6260
  tmp=./conf$$-$RANDOM
4890
6261
  (umask 077 && mkdir "$tmp")
4891
 
} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
 
6262
} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
4892
6263
 
4893
6264
# Set up the scripts for CONFIG_FILES section.
4894
6265
# No need to generate them if there are no CONFIG_FILES.
4905
6276
fi
4906
6277
ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
4907
6278
if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
4908
 
  ac_cs_awk_cr='\r'
 
6279
  ac_cs_awk_cr='\\r'
4909
6280
else
4910
6281
  ac_cs_awk_cr=$ac_cr
4911
6282
fi
4919
6290
  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
4920
6291
  echo "_ACEOF"
4921
6292
} >conf$$subs.sh ||
4922
 
  as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
4923
 
ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
 
6293
  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
 
6294
ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
4924
6295
ac_delim='%!_!# '
4925
6296
for ac_last_try in false false false false false :; do
4926
6297
  . ./conf$$subs.sh ||
4927
 
    as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
 
6298
    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
4928
6299
 
4929
6300
  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
4930
6301
  if test $ac_delim_n = $ac_delim_num; then
4931
6302
    break
4932
6303
  elif $ac_last_try; then
4933
 
    as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
 
6304
    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
4934
6305
  else
4935
6306
    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
4936
6307
  fi
5019
6390
else
5020
6391
  cat
5021
6392
fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
5022
 
  || as_fn_error "could not setup config files machinery" "$LINENO" 5
 
6393
  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
5023
6394
_ACEOF
5024
6395
 
5025
 
# VPATH may cause trouble with some makes, so we remove $(srcdir),
5026
 
# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
 
6396
# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
 
6397
# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
5027
6398
# trailing colons and then remove the whole line if VPATH becomes empty
5028
6399
# (actually we leave an empty line to preserve line numbers).
5029
6400
if test "x$srcdir" = x.; then
5030
 
  ac_vpsub='/^[  ]*VPATH[        ]*=/{
5031
 
s/:*\$(srcdir):*/:/
5032
 
s/:*\${srcdir}:*/:/
5033
 
s/:*@srcdir@:*/:/
5034
 
s/^\([^=]*=[     ]*\):*/\1/
 
6401
  ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
 
6402
h
 
6403
s///
 
6404
s/^/:/
 
6405
s/[      ]*$/:/
 
6406
s/:\$(srcdir):/:/g
 
6407
s/:\${srcdir}:/:/g
 
6408
s/:@srcdir@:/:/g
 
6409
s/^:*//
5035
6410
s/:*$//
 
6411
x
 
6412
s/\(=[   ]*\).*/\1/
 
6413
G
 
6414
s/\n//
5036
6415
s/^[^=]*=[       ]*$//
5037
6416
}'
5038
6417
fi
5060
6439
  if test -z "$ac_t"; then
5061
6440
    break
5062
6441
  elif $ac_last_try; then
5063
 
    as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
 
6442
    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
5064
6443
  else
5065
6444
    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
5066
6445
  fi
5145
6524
_ACAWK
5146
6525
_ACEOF
5147
6526
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
5148
 
  as_fn_error "could not setup config headers machinery" "$LINENO" 5
 
6527
  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
5149
6528
fi # test -n "$CONFIG_HEADERS"
5150
6529
 
5151
6530
 
5158
6537
  esac
5159
6538
  case $ac_mode$ac_tag in
5160
6539
  :[FHL]*:*);;
5161
 
  :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
 
6540
  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
5162
6541
  :[FH]-) ac_tag=-:-;;
5163
6542
  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
5164
6543
  esac
5186
6565
           [\\/$]*) false;;
5187
6566
           *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
5188
6567
           esac ||
5189
 
           as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
 
6568
           as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
5190
6569
      esac
5191
6570
      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
5192
6571
      as_fn_append ac_file_inputs " '$ac_f'"
5213
6592
 
5214
6593
    case $ac_tag in
5215
6594
    *:-:* | *:-) cat >"$tmp/stdin" \
5216
 
      || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
 
6595
      || as_fn_error $? "could not create $ac_file" "$LINENO" 5  ;;
5217
6596
    esac
5218
6597
    ;;
5219
6598
  esac
5344
6723
$ac_datarootdir_hack
5345
6724
"
5346
6725
eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
5347
 
  || as_fn_error "could not create $ac_file" "$LINENO" 5
 
6726
  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
5348
6727
 
5349
6728
test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
5350
6729
  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
5351
6730
  { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
5352
6731
  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
5353
 
which seems to be undefined.  Please make sure it is defined." >&5
 
6732
which seems to be undefined.  Please make sure it is defined" >&5
5354
6733
$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
5355
 
which seems to be undefined.  Please make sure it is defined." >&2;}
 
6734
which seems to be undefined.  Please make sure it is defined" >&2;}
5356
6735
 
5357
6736
  rm -f "$tmp/stdin"
5358
6737
  case $ac_file in
5359
6738
  -) cat "$tmp/out" && rm -f "$tmp/out";;
5360
6739
  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
5361
6740
  esac \
5362
 
  || as_fn_error "could not create $ac_file" "$LINENO" 5
 
6741
  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
5363
6742
 ;;
5364
6743
  :H)
5365
6744
  #
5370
6749
      $as_echo "/* $configure_input  */" \
5371
6750
      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
5372
6751
    } >"$tmp/config.h" \
5373
 
      || as_fn_error "could not create $ac_file" "$LINENO" 5
 
6752
      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
5374
6753
    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
5375
6754
      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
5376
6755
$as_echo "$as_me: $ac_file is unchanged" >&6;}
5377
6756
    else
5378
6757
      rm -f "$ac_file"
5379
6758
      mv "$tmp/config.h" "$ac_file" \
5380
 
        || as_fn_error "could not create $ac_file" "$LINENO" 5
 
6759
        || as_fn_error $? "could not create $ac_file" "$LINENO" 5
5381
6760
    fi
5382
6761
  else
5383
6762
    $as_echo "/* $configure_input  */" \
5384
6763
      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
5385
 
      || as_fn_error "could not create -" "$LINENO" 5
 
6764
      || as_fn_error $? "could not create -" "$LINENO" 5
5386
6765
  fi
5387
6766
 ;;
5388
6767
 
5397
6776
ac_clean_files=$ac_clean_files_save
5398
6777
 
5399
6778
test $ac_write_fail = 0 ||
5400
 
  as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
 
6779
  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
5401
6780
 
5402
6781
 
5403
6782
# configure is writing to config.log, and then calls config.status.
5418
6797
  exec 5>>config.log
5419
6798
  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
5420
6799
  # would make configure fail if this is the last instruction.
5421
 
  $ac_cs_success || as_fn_exit $?
 
6800
  $ac_cs_success || as_fn_exit 1
5422
6801
fi
5423
6802
if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
5424
6803
  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
5434
6813
echo '#endif' >>config.h.tmp
5435
6814
mv config.h.tmp config.h
5436
6815
 
5437
 
if test "x$ccache_dev" = "xyes"; then
5438
 
    version=`(git describe --dirty 2>/dev/null || echo vunknown) | sed -e 's/v//' -e 's/-/+/' -e 's/-/_/g'`
5439
 
    echo "const char CCACHE_VERSION[] = \"$version\";" >version.c
5440
 
elif test ! -f $srcdir/version.c; then
5441
 
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unable to determine ccache version" >&5
5442
 
$as_echo "$as_me: WARNING: unable to determine ccache version" >&2;}
5443
 
    echo "const char CCACHE_VERSION[] = \"unknown\";" >version.c
5444
 
fi
5445
 
 
5446
 
mkdir -p .deps
 
6816
mkdir -p .deps test
5447
6817
 
5448
6818
if test x$use_bundled_zlib = xyes; then
5449
6819
   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using bundled zlib" >&5