git.fiddlerwoaroof.com
Browse code

adds config for more complex code

Greg Wiley authored on 28/03/2017 18:10:16
Showing 3 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,55 @@
1
+/* config.h.in.  Generated from configure.ac by autoheader.  */
2
+
3
+/* Define to 1 if you have the `gettimeofday' function. */
4
+#undef HAVE_GETTIMEOFDAY
5
+
6
+/* Define to 1 if you have the <inttypes.h> header file. */
7
+#undef HAVE_INTTYPES_H
8
+
9
+/* Define to 1 if you have the <memory.h> header file. */
10
+#undef HAVE_MEMORY_H
11
+
12
+/* Define to 1 if you have the <stdint.h> header file. */
13
+#undef HAVE_STDINT_H
14
+
15
+/* Define to 1 if you have the <stdlib.h> header file. */
16
+#undef HAVE_STDLIB_H
17
+
18
+/* Define to 1 if you have the <strings.h> header file. */
19
+#undef HAVE_STRINGS_H
20
+
21
+/* Define to 1 if you have the <string.h> header file. */
22
+#undef HAVE_STRING_H
23
+
24
+/* Define to 1 if you have the <sys/stat.h> header file. */
25
+#undef HAVE_SYS_STAT_H
26
+
27
+/* Define to 1 if you have the <sys/time.h> header file. */
28
+#undef HAVE_SYS_TIME_H
29
+
30
+/* Define to 1 if you have the <sys/types.h> header file. */
31
+#undef HAVE_SYS_TYPES_H
32
+
33
+/* Define to 1 if you have the <unistd.h> header file. */
34
+#undef HAVE_UNISTD_H
35
+
36
+/* Define to the address where bug reports for this package should be sent. */
37
+#undef PACKAGE_BUGREPORT
38
+
39
+/* Define to the full name of this package. */
40
+#undef PACKAGE_NAME
41
+
42
+/* Define to the full name and version of this package. */
43
+#undef PACKAGE_STRING
44
+
45
+/* Define to the one symbol short name of this package. */
46
+#undef PACKAGE_TARNAME
47
+
48
+/* Define to the home page for this package. */
49
+#undef PACKAGE_URL
50
+
51
+/* Define to the version of this package. */
52
+#undef PACKAGE_VERSION
53
+
54
+/* Define to 1 if you have the ANSI C header files. */
55
+#undef STDC_HEADERS
... ...
@@ -197,7 +197,8 @@ test -x / || exit 1"
197 197
   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198 198
   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199 199
   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200
-  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1"
200
+  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201
+test \$(( 1 + 1 )) = 2 || exit 1"
201 202
   if (eval "$as_required") 2>/dev/null; then :
202 203
   as_have_required=yes
203 204
 else
... ...
@@ -584,9 +585,48 @@ PACKAGE_STRING='FULL-PACKAGE-NAME VERSION'
584 585
 PACKAGE_BUGREPORT='BUG-REPORT-ADDRESS'
585 586
 PACKAGE_URL=''
586 587
 
587
-ac_unique_file="hello.c"
588
+ac_unique_file="config.h.in"
589
+# Factoring default headers for most tests.
590
+ac_includes_default="\
591
+#include <stdio.h>
592
+#ifdef HAVE_SYS_TYPES_H
593
+# include <sys/types.h>
594
+#endif
595
+#ifdef HAVE_SYS_STAT_H
596
+# include <sys/stat.h>
597
+#endif
598
+#ifdef STDC_HEADERS
599
+# include <stdlib.h>
600
+# include <stddef.h>
601
+#else
602
+# ifdef HAVE_STDLIB_H
603
+#  include <stdlib.h>
604
+# endif
605
+#endif
606
+#ifdef HAVE_STRING_H
607
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
608
+#  include <memory.h>
609
+# endif
610
+# include <string.h>
611
+#endif
612
+#ifdef HAVE_STRINGS_H
613
+# include <strings.h>
614
+#endif
615
+#ifdef HAVE_INTTYPES_H
616
+# include <inttypes.h>
617
+#endif
618
+#ifdef HAVE_STDINT_H
619
+# include <stdint.h>
620
+#endif
621
+#ifdef HAVE_UNISTD_H
622
+# include <unistd.h>
623
+#endif"
624
+
588 625
 ac_subst_vars='LTLIBOBJS
589 626
 LIBOBJS
627
+EGREP
628
+GREP
629
+CPP
590 630
 OBJEXT
591 631
 EXEEXT
592 632
 ac_ct_CC
... ...
@@ -643,7 +683,8 @@ CC
643 683
 CFLAGS
644 684
 LDFLAGS
645 685
 LIBS
646
-CPPFLAGS'
686
+CPPFLAGS
687
+CPP'
647 688
 
648 689
 
649 690
 # Initialize some variables set by options.
... ...
@@ -1258,6 +1299,7 @@ Some influential environment variables:
1258 1299
   LIBS        libraries to pass to the linker, e.g. -l<library>
1259 1300
   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1260 1301
               you have headers in a nonstandard directory <include dir>
1302
+  CPP         C preprocessor
1261 1303
 
1262 1304
 Use these variables to override the choices made by `configure' or to help
1263 1305
 it to find libraries and programs with nonstandard names/locations.
... ...
@@ -1376,6 +1418,320 @@ fi
1376 1418
   as_fn_set_status $ac_retval
1377 1419
 
1378 1420
 } # ac_fn_c_try_compile
1421
+
1422
+# ac_fn_c_try_cpp LINENO
1423
+# ----------------------
1424
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1425
+ac_fn_c_try_cpp ()
1426
+{
1427
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1428
+  if { { ac_try="$ac_cpp conftest.$ac_ext"
1429
+case "(($ac_try" in
1430
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1431
+  *) ac_try_echo=$ac_try;;
1432
+esac
1433
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1434
+$as_echo "$ac_try_echo"; } >&5
1435
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1436
+  ac_status=$?
1437
+  if test -s conftest.err; then
1438
+    grep -v '^ *+' conftest.err >conftest.er1
1439
+    cat conftest.er1 >&5
1440
+    mv -f conftest.er1 conftest.err
1441
+  fi
1442
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1443
+  test $ac_status = 0; } > conftest.i && {
1444
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1445
+	 test ! -s conftest.err
1446
+       }; then :
1447
+  ac_retval=0
1448
+else
1449
+  $as_echo "$as_me: failed program was:" >&5
1450
+sed 's/^/| /' conftest.$ac_ext >&5
1451
+
1452
+    ac_retval=1
1453
+fi
1454
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1455
+  as_fn_set_status $ac_retval
1456
+
1457
+} # ac_fn_c_try_cpp
1458
+
1459
+# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1460
+# -------------------------------------------------------
1461
+# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1462
+# the include files in INCLUDES and setting the cache variable VAR
1463
+# accordingly.
1464
+ac_fn_c_check_header_mongrel ()
1465
+{
1466
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1467
+  if eval \${$3+:} false; then :
1468
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1469
+$as_echo_n "checking for $2... " >&6; }
1470
+if eval \${$3+:} false; then :
1471
+  $as_echo_n "(cached) " >&6
1472
+fi
1473
+eval ac_res=\$$3
1474
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1475
+$as_echo "$ac_res" >&6; }
1476
+else
1477
+  # Is the header compilable?
1478
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1479
+$as_echo_n "checking $2 usability... " >&6; }
1480
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1481
+/* end confdefs.h.  */
1482
+$4
1483
+#include <$2>
1484
+_ACEOF
1485
+if ac_fn_c_try_compile "$LINENO"; then :
1486
+  ac_header_compiler=yes
1487
+else
1488
+  ac_header_compiler=no
1489
+fi
1490
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1491
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1492
+$as_echo "$ac_header_compiler" >&6; }
1493
+
1494
+# Is the header present?
1495
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1496
+$as_echo_n "checking $2 presence... " >&6; }
1497
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1498
+/* end confdefs.h.  */
1499
+#include <$2>
1500
+_ACEOF
1501
+if ac_fn_c_try_cpp "$LINENO"; then :
1502
+  ac_header_preproc=yes
1503
+else
1504
+  ac_header_preproc=no
1505
+fi
1506
+rm -f conftest.err conftest.i conftest.$ac_ext
1507
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1508
+$as_echo "$ac_header_preproc" >&6; }
1509
+
1510
+# So?  What about this header?
1511
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1512
+  yes:no: )
1513
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1514
+$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1515
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1516
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1517
+    ;;
1518
+  no:yes:* )
1519
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1520
+$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1521
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1522
+$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1523
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1524
+$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1525
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1526
+$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1527
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1528
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1529
+( $as_echo "## --------------------------------- ##
1530
+## Report this to BUG-REPORT-ADDRESS ##
1531
+## --------------------------------- ##"
1532
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
1533
+    ;;
1534
+esac
1535
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1536
+$as_echo_n "checking for $2... " >&6; }
1537
+if eval \${$3+:} false; then :
1538
+  $as_echo_n "(cached) " >&6
1539
+else
1540
+  eval "$3=\$ac_header_compiler"
1541
+fi
1542
+eval ac_res=\$$3
1543
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1544
+$as_echo "$ac_res" >&6; }
1545
+fi
1546
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1547
+
1548
+} # ac_fn_c_check_header_mongrel
1549
+
1550
+# ac_fn_c_try_run LINENO
1551
+# ----------------------
1552
+# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1553
+# that executables *can* be run.
1554
+ac_fn_c_try_run ()
1555
+{
1556
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1557
+  if { { ac_try="$ac_link"
1558
+case "(($ac_try" in
1559
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1560
+  *) ac_try_echo=$ac_try;;
1561
+esac
1562
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1563
+$as_echo "$ac_try_echo"; } >&5
1564
+  (eval "$ac_link") 2>&5
1565
+  ac_status=$?
1566
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1567
+  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1568
+  { { case "(($ac_try" in
1569
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1570
+  *) ac_try_echo=$ac_try;;
1571
+esac
1572
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1573
+$as_echo "$ac_try_echo"; } >&5
1574
+  (eval "$ac_try") 2>&5
1575
+  ac_status=$?
1576
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1577
+  test $ac_status = 0; }; }; then :
1578
+  ac_retval=0
1579
+else
1580
+  $as_echo "$as_me: program exited with status $ac_status" >&5
1581
+       $as_echo "$as_me: failed program was:" >&5
1582
+sed 's/^/| /' conftest.$ac_ext >&5
1583
+
1584
+       ac_retval=$ac_status
1585
+fi
1586
+  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1587
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1588
+  as_fn_set_status $ac_retval
1589
+
1590
+} # ac_fn_c_try_run
1591
+
1592
+# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1593
+# -------------------------------------------------------
1594
+# Tests whether HEADER exists and can be compiled using the include files in
1595
+# INCLUDES, setting the cache variable VAR accordingly.
1596
+ac_fn_c_check_header_compile ()
1597
+{
1598
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1599
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1600
+$as_echo_n "checking for $2... " >&6; }
1601
+if eval \${$3+:} false; then :
1602
+  $as_echo_n "(cached) " >&6
1603
+else
1604
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1605
+/* end confdefs.h.  */
1606
+$4
1607
+#include <$2>
1608
+_ACEOF
1609
+if ac_fn_c_try_compile "$LINENO"; then :
1610
+  eval "$3=yes"
1611
+else
1612
+  eval "$3=no"
1613
+fi
1614
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1615
+fi
1616
+eval ac_res=\$$3
1617
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1618
+$as_echo "$ac_res" >&6; }
1619
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1620
+
1621
+} # ac_fn_c_check_header_compile
1622
+
1623
+# ac_fn_c_try_link LINENO
1624
+# -----------------------
1625
+# Try to link conftest.$ac_ext, and return whether this succeeded.
1626
+ac_fn_c_try_link ()
1627
+{
1628
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1629
+  rm -f conftest.$ac_objext conftest$ac_exeext
1630
+  if { { ac_try="$ac_link"
1631
+case "(($ac_try" in
1632
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1633
+  *) ac_try_echo=$ac_try;;
1634
+esac
1635
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1636
+$as_echo "$ac_try_echo"; } >&5
1637
+  (eval "$ac_link") 2>conftest.err
1638
+  ac_status=$?
1639
+  if test -s conftest.err; then
1640
+    grep -v '^ *+' conftest.err >conftest.er1
1641
+    cat conftest.er1 >&5
1642
+    mv -f conftest.er1 conftest.err
1643
+  fi
1644
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1645
+  test $ac_status = 0; } && {
1646
+	 test -z "$ac_c_werror_flag" ||
1647
+	 test ! -s conftest.err
1648
+       } && test -s conftest$ac_exeext && {
1649
+	 test "$cross_compiling" = yes ||
1650
+	 test -x conftest$ac_exeext
1651
+       }; then :
1652
+  ac_retval=0
1653
+else
1654
+  $as_echo "$as_me: failed program was:" >&5
1655
+sed 's/^/| /' conftest.$ac_ext >&5
1656
+
1657
+	ac_retval=1
1658
+fi
1659
+  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1660
+  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1661
+  # interfere with the next link command; also delete a directory that is
1662
+  # left behind by Apple's compiler.  We do this before executing the actions.
1663
+  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1664
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1665
+  as_fn_set_status $ac_retval
1666
+
1667
+} # ac_fn_c_try_link
1668
+
1669
+# ac_fn_c_check_func LINENO FUNC VAR
1670
+# ----------------------------------
1671
+# Tests whether FUNC exists, setting the cache variable VAR accordingly
1672
+ac_fn_c_check_func ()
1673
+{
1674
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1675
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1676
+$as_echo_n "checking for $2... " >&6; }
1677
+if eval \${$3+:} false; then :
1678
+  $as_echo_n "(cached) " >&6
1679
+else
1680
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1681
+/* end confdefs.h.  */
1682
+/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1683
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
1684
+#define $2 innocuous_$2
1685
+
1686
+/* System header to define __stub macros and hopefully few prototypes,
1687
+    which can conflict with char $2 (); below.
1688
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1689
+    <limits.h> exists even on freestanding compilers.  */
1690
+
1691
+#ifdef __STDC__
1692
+# include <limits.h>
1693
+#else
1694
+# include <assert.h>
1695
+#endif
1696
+
1697
+#undef $2
1698
+
1699
+/* Override any GCC internal prototype to avoid an error.
1700
+   Use char because int might match the return type of a GCC
1701
+   builtin and then its argument prototype would still apply.  */
1702
+#ifdef __cplusplus
1703
+extern "C"
1704
+#endif
1705
+char $2 ();
1706
+/* The GNU C library defines this for functions which it implements
1707
+    to always fail with ENOSYS.  Some functions are actually named
1708
+    something starting with __ and the normal name is an alias.  */
1709
+#if defined __stub_$2 || defined __stub___$2
1710
+choke me
1711
+#endif
1712
+
1713
+int
1714
+main ()
1715
+{
1716
+return $2 ();
1717
+  ;
1718
+  return 0;
1719
+}
1720
+_ACEOF
1721
+if ac_fn_c_try_link "$LINENO"; then :
1722
+  eval "$3=yes"
1723
+else
1724
+  eval "$3=no"
1725
+fi
1726
+rm -f core conftest.err conftest.$ac_objext \
1727
+    conftest$ac_exeext conftest.$ac_ext
1728
+fi
1729
+eval ac_res=\$$3
1730
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1731
+$as_echo "$ac_res" >&6; }
1732
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1733
+
1734
+} # ac_fn_c_check_func
1379 1735
 cat >config.log <<_ACEOF
1380 1736
 This file contains any messages produced by compilers while
1381 1737
 running configure, to aid debugging if configure makes a mistake.
... ...
@@ -2527,9 +2883,430 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
2527 2883
 
2528 2884
 # Checks for header files.
2529 2885
 
2886
+ac_ext=c
2887
+ac_cpp='$CPP $CPPFLAGS'
2888
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2889
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2890
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
2891
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
2892
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
2893
+# On Suns, sometimes $CPP names a directory.
2894
+if test -n "$CPP" && test -d "$CPP"; then
2895
+  CPP=
2896
+fi
2897
+if test -z "$CPP"; then
2898
+  if ${ac_cv_prog_CPP+:} false; then :
2899
+  $as_echo_n "(cached) " >&6
2900
+else
2901
+      # Double quotes because CPP needs to be expanded
2902
+    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2903
+    do
2904
+      ac_preproc_ok=false
2905
+for ac_c_preproc_warn_flag in '' yes
2906
+do
2907
+  # Use a header file that comes with gcc, so configuring glibc
2908
+  # with a fresh cross-compiler works.
2909
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2910
+  # <limits.h> exists even on freestanding compilers.
2911
+  # On the NeXT, cc -E runs the code through the compiler's parser,
2912
+  # not just through cpp. "Syntax error" is here to catch this case.
2913
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2914
+/* end confdefs.h.  */
2915
+#ifdef __STDC__
2916
+# include <limits.h>
2917
+#else
2918
+# include <assert.h>
2919
+#endif
2920
+		     Syntax error
2921
+_ACEOF
2922
+if ac_fn_c_try_cpp "$LINENO"; then :
2923
+
2924
+else
2925
+  # Broken: fails on valid input.
2926
+continue
2927
+fi
2928
+rm -f conftest.err conftest.i conftest.$ac_ext
2929
+
2930
+  # OK, works on sane cases.  Now check whether nonexistent headers
2931
+  # can be detected and how.
2932
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2933
+/* end confdefs.h.  */
2934
+#include <ac_nonexistent.h>
2935
+_ACEOF
2936
+if ac_fn_c_try_cpp "$LINENO"; then :
2937
+  # Broken: success on invalid input.
2938
+continue
2939
+else
2940
+  # Passes both tests.
2941
+ac_preproc_ok=:
2942
+break
2943
+fi
2944
+rm -f conftest.err conftest.i conftest.$ac_ext
2945
+
2946
+done
2947
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2948
+rm -f conftest.i conftest.err conftest.$ac_ext
2949
+if $ac_preproc_ok; then :
2950
+  break
2951
+fi
2952
+
2953
+    done
2954
+    ac_cv_prog_CPP=$CPP
2955
+
2956
+fi
2957
+  CPP=$ac_cv_prog_CPP
2958
+else
2959
+  ac_cv_prog_CPP=$CPP
2960
+fi
2961
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
2962
+$as_echo "$CPP" >&6; }
2963
+ac_preproc_ok=false
2964
+for ac_c_preproc_warn_flag in '' yes
2965
+do
2966
+  # Use a header file that comes with gcc, so configuring glibc
2967
+  # with a fresh cross-compiler works.
2968
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2969
+  # <limits.h> exists even on freestanding compilers.
2970
+  # On the NeXT, cc -E runs the code through the compiler's parser,
2971
+  # not just through cpp. "Syntax error" is here to catch this case.
2972
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2973
+/* end confdefs.h.  */
2974
+#ifdef __STDC__
2975
+# include <limits.h>
2976
+#else
2977
+# include <assert.h>
2978
+#endif
2979
+		     Syntax error
2980
+_ACEOF
2981
+if ac_fn_c_try_cpp "$LINENO"; then :
2982
+
2983
+else
2984
+  # Broken: fails on valid input.
2985
+continue
2986
+fi
2987
+rm -f conftest.err conftest.i conftest.$ac_ext
2988
+
2989
+  # OK, works on sane cases.  Now check whether nonexistent headers
2990
+  # can be detected and how.
2991
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2992
+/* end confdefs.h.  */
2993
+#include <ac_nonexistent.h>
2994
+_ACEOF
2995
+if ac_fn_c_try_cpp "$LINENO"; then :
2996
+  # Broken: success on invalid input.
2997
+continue
2998
+else
2999
+  # Passes both tests.
3000
+ac_preproc_ok=:
3001
+break
3002
+fi
3003
+rm -f conftest.err conftest.i conftest.$ac_ext
3004
+
3005
+done
3006
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3007
+rm -f conftest.i conftest.err conftest.$ac_ext
3008
+if $ac_preproc_ok; then :
3009
+
3010
+else
3011
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3012
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3013
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
3014
+See \`config.log' for more details" "$LINENO" 5; }
3015
+fi
3016
+
3017
+ac_ext=c
3018
+ac_cpp='$CPP $CPPFLAGS'
3019
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3020
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3021
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
3022
+
3023
+
3024
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3025
+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3026
+if ${ac_cv_path_GREP+:} false; then :
3027
+  $as_echo_n "(cached) " >&6
3028
+else
3029
+  if test -z "$GREP"; then
3030
+  ac_path_GREP_found=false
3031
+  # Loop through the user's path and test for each of PROGNAME-LIST
3032
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3033
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3034
+do
3035
+  IFS=$as_save_IFS
3036
+  test -z "$as_dir" && as_dir=.
3037
+    for ac_prog in grep ggrep; do
3038
+    for ac_exec_ext in '' $ac_executable_extensions; do
3039
+      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3040
+      as_fn_executable_p "$ac_path_GREP" || continue
3041
+# Check for GNU ac_path_GREP and select it if it is found.
3042
+  # Check for GNU $ac_path_GREP
3043
+case `"$ac_path_GREP" --version 2>&1` in
3044
+*GNU*)
3045
+  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3046
+*)
3047
+  ac_count=0
3048
+  $as_echo_n 0123456789 >"conftest.in"
3049
+  while :
3050
+  do
3051
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
3052
+    mv "conftest.tmp" "conftest.in"
3053
+    cp "conftest.in" "conftest.nl"
3054
+    $as_echo 'GREP' >> "conftest.nl"
3055
+    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3056
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3057
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
3058
+    if test $ac_count -gt ${ac_path_GREP_max-0}; then
3059
+      # Best one so far, save it but keep looking for a better one
3060
+      ac_cv_path_GREP="$ac_path_GREP"
3061
+      ac_path_GREP_max=$ac_count
3062
+    fi
3063
+    # 10*(2^10) chars as input seems more than enough
3064
+    test $ac_count -gt 10 && break
3065
+  done
3066
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3067
+esac
3068
+
3069
+      $ac_path_GREP_found && break 3
3070
+    done
3071
+  done
3072
+  done
3073
+IFS=$as_save_IFS
3074
+  if test -z "$ac_cv_path_GREP"; then
3075
+    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3076
+  fi
3077
+else
3078
+  ac_cv_path_GREP=$GREP
3079
+fi
3080
+
3081
+fi
3082
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3083
+$as_echo "$ac_cv_path_GREP" >&6; }
3084
+ GREP="$ac_cv_path_GREP"
3085
+
3086
+
3087
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3088
+$as_echo_n "checking for egrep... " >&6; }
3089
+if ${ac_cv_path_EGREP+:} false; then :
3090
+  $as_echo_n "(cached) " >&6
3091
+else
3092
+  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3093
+   then ac_cv_path_EGREP="$GREP -E"
3094
+   else
3095
+     if test -z "$EGREP"; then
3096
+  ac_path_EGREP_found=false
3097
+  # Loop through the user's path and test for each of PROGNAME-LIST
3098
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3099
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3100
+do
3101
+  IFS=$as_save_IFS
3102
+  test -z "$as_dir" && as_dir=.
3103
+    for ac_prog in egrep; do
3104
+    for ac_exec_ext in '' $ac_executable_extensions; do
3105
+      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3106
+      as_fn_executable_p "$ac_path_EGREP" || continue
3107
+# Check for GNU ac_path_EGREP and select it if it is found.
3108
+  # Check for GNU $ac_path_EGREP
3109
+case `"$ac_path_EGREP" --version 2>&1` in
3110
+*GNU*)
3111
+  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3112
+*)
3113
+  ac_count=0
3114
+  $as_echo_n 0123456789 >"conftest.in"
3115
+  while :
3116
+  do
3117
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
3118
+    mv "conftest.tmp" "conftest.in"
3119
+    cp "conftest.in" "conftest.nl"
3120
+    $as_echo 'EGREP' >> "conftest.nl"
3121
+    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3122
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3123
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
3124
+    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3125
+      # Best one so far, save it but keep looking for a better one
3126
+      ac_cv_path_EGREP="$ac_path_EGREP"
3127
+      ac_path_EGREP_max=$ac_count
3128
+    fi
3129
+    # 10*(2^10) chars as input seems more than enough
3130
+    test $ac_count -gt 10 && break
3131
+  done
3132
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3133
+esac
3134
+
3135
+      $ac_path_EGREP_found && break 3
3136
+    done
3137
+  done
3138
+  done
3139
+IFS=$as_save_IFS
3140
+  if test -z "$ac_cv_path_EGREP"; then
3141
+    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3142
+  fi
3143
+else
3144
+  ac_cv_path_EGREP=$EGREP
3145
+fi
3146
+
3147
+   fi
3148
+fi
3149
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3150
+$as_echo "$ac_cv_path_EGREP" >&6; }
3151
+ EGREP="$ac_cv_path_EGREP"
3152
+
3153
+
3154
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
3155
+$as_echo_n "checking for ANSI C header files... " >&6; }
3156
+if ${ac_cv_header_stdc+:} false; then :
3157
+  $as_echo_n "(cached) " >&6
3158
+else
3159
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3160
+/* end confdefs.h.  */
3161
+#include <stdlib.h>
3162
+#include <stdarg.h>
3163
+#include <string.h>
3164
+#include <float.h>
3165
+
3166
+int
3167
+main ()
3168
+{
3169
+
3170
+  ;
3171
+  return 0;
3172
+}
3173
+_ACEOF
3174
+if ac_fn_c_try_compile "$LINENO"; then :
3175
+  ac_cv_header_stdc=yes
3176
+else
3177
+  ac_cv_header_stdc=no
3178
+fi
3179
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3180
+
3181
+if test $ac_cv_header_stdc = yes; then
3182
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3183
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3184
+/* end confdefs.h.  */
3185
+#include <string.h>
3186
+
3187
+_ACEOF
3188
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3189
+  $EGREP "memchr" >/dev/null 2>&1; then :
3190
+
3191
+else
3192
+  ac_cv_header_stdc=no
3193
+fi
3194
+rm -f conftest*
3195
+
3196
+fi
3197
+
3198
+if test $ac_cv_header_stdc = yes; then
3199
+  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3200
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3201
+/* end confdefs.h.  */
3202
+#include <stdlib.h>
3203
+
3204
+_ACEOF
3205
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3206
+  $EGREP "free" >/dev/null 2>&1; then :
3207
+
3208
+else
3209
+  ac_cv_header_stdc=no
3210
+fi
3211
+rm -f conftest*
3212
+
3213
+fi
3214
+
3215
+if test $ac_cv_header_stdc = yes; then
3216
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3217
+  if test "$cross_compiling" = yes; then :
3218
+  :
3219
+else
3220
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3221
+/* end confdefs.h.  */
3222
+#include <ctype.h>
3223
+#include <stdlib.h>
3224
+#if ((' ' & 0x0FF) == 0x020)
3225
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3226
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3227
+#else
3228
+# define ISLOWER(c) \
3229
+		   (('a' <= (c) && (c) <= 'i') \
3230
+		     || ('j' <= (c) && (c) <= 'r') \
3231
+		     || ('s' <= (c) && (c) <= 'z'))
3232
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3233
+#endif
3234
+
3235
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3236
+int
3237
+main ()
3238
+{
3239
+  int i;
3240
+  for (i = 0; i < 256; i++)
3241
+    if (XOR (islower (i), ISLOWER (i))
3242
+	|| toupper (i) != TOUPPER (i))
3243
+      return 2;
3244
+  return 0;
3245
+}
3246
+_ACEOF
3247
+if ac_fn_c_try_run "$LINENO"; then :
3248
+
3249
+else
3250
+  ac_cv_header_stdc=no
3251
+fi
3252
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3253
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
3254
+fi
3255
+
3256
+fi
3257
+fi
3258
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
3259
+$as_echo "$ac_cv_header_stdc" >&6; }
3260
+if test $ac_cv_header_stdc = yes; then
3261
+
3262
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
3263
+
3264
+fi
3265
+
3266
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
3267
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3268
+		  inttypes.h stdint.h unistd.h
3269
+do :
3270
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
3271
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
3272
+"
3273
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
3274
+  cat >>confdefs.h <<_ACEOF
3275
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
3276
+_ACEOF
3277
+
3278
+fi
3279
+
3280
+done
3281
+
3282
+
3283
+for ac_header in sys/time.h
3284
+do :
3285
+  ac_fn_c_check_header_mongrel "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default"
3286
+if test "x$ac_cv_header_sys_time_h" = xyes; then :
3287
+  cat >>confdefs.h <<_ACEOF
3288
+#define HAVE_SYS_TIME_H 1
3289
+_ACEOF
3290
+
3291
+fi
3292
+
3293
+done
3294
+
3295
+
2530 3296
 # Checks for typedefs, structures, and compiler characteristics.
2531 3297
 
2532 3298
 # Checks for library functions.
3299
+for ac_func in gettimeofday
3300
+do :
3301
+  ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
3302
+if test "x$ac_cv_func_gettimeofday" = xyes; then :
3303
+  cat >>confdefs.h <<_ACEOF
3304
+#define HAVE_GETTIMEOFDAY 1
3305
+_ACEOF
3306
+
3307
+fi
3308
+done
3309
+
2533 3310
 
2534 3311
 ac_config_files="$ac_config_files Makefile"
2535 3312
 
... ...
@@ -12,10 +12,12 @@ AC_PROG_CC
12 12
 # Checks for libraries.
13 13
 
14 14
 # Checks for header files.
15
+AC_CHECK_HEADERS([sys/time.h])
15 16
 
16 17
 # Checks for typedefs, structures, and compiler characteristics.
17 18
 
18 19
 # Checks for library functions.
20
+AC_CHECK_FUNCS([gettimeofday])
19 21
 
20 22
 AC_CONFIG_FILES([Makefile])
21 23
 AC_OUTPUT