git.fiddlerwoaroof.com
Browse code

Check for Openssl Headers...

Ed Langley authored on 30/05/2017 21:58:54
Showing 2 changed files
... ...
@@ -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
... ...
@@ -585,8 +586,47 @@ PACKAGE_BUGREPORT='BUG-REPORT-ADDRESS'
585 586
 PACKAGE_URL=''
586 587
 
587 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
 PAM_MODULE_DIRECTORY
591 631
 OBJEXT
592 632
 EXEEXT
... ...
@@ -646,7 +686,8 @@ CC
646 686
 CFLAGS
647 687
 LDFLAGS
648 688
 LIBS
649
-CPPFLAGS'
689
+CPPFLAGS
690
+CPP'
650 691
 
651 692
 
652 693
 # Initialize some variables set by options.
... ...
@@ -1268,6 +1309,7 @@ Some influential environment variables:
1268 1309
   LIBS        libraries to pass to the linker, e.g. -l<library>
1269 1310
   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1270 1311
               you have headers in a nonstandard directory <include dir>
1312
+  CPP         C preprocessor
1271 1313
 
1272 1314
 Use these variables to override the choices made by `configure' or to help
1273 1315
 it to find libraries and programs with nonstandard names/locations.
... ...
@@ -1387,6 +1429,207 @@ fi
1387 1429
 
1388 1430
 } # ac_fn_c_try_compile
1389 1431
 
1432
+# ac_fn_c_try_cpp LINENO
1433
+# ----------------------
1434
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1435
+ac_fn_c_try_cpp ()
1436
+{
1437
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1438
+  if { { ac_try="$ac_cpp conftest.$ac_ext"
1439
+case "(($ac_try" in
1440
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1441
+  *) ac_try_echo=$ac_try;;
1442
+esac
1443
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1444
+$as_echo "$ac_try_echo"; } >&5
1445
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1446
+  ac_status=$?
1447
+  if test -s conftest.err; then
1448
+    grep -v '^ *+' conftest.err >conftest.er1
1449
+    cat conftest.er1 >&5
1450
+    mv -f conftest.er1 conftest.err
1451
+  fi
1452
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1453
+  test $ac_status = 0; } > conftest.i && {
1454
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1455
+	 test ! -s conftest.err
1456
+       }; then :
1457
+  ac_retval=0
1458
+else
1459
+  $as_echo "$as_me: failed program was:" >&5
1460
+sed 's/^/| /' conftest.$ac_ext >&5
1461
+
1462
+    ac_retval=1
1463
+fi
1464
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1465
+  as_fn_set_status $ac_retval
1466
+
1467
+} # ac_fn_c_try_cpp
1468
+
1469
+# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1470
+# -------------------------------------------------------
1471
+# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1472
+# the include files in INCLUDES and setting the cache variable VAR
1473
+# accordingly.
1474
+ac_fn_c_check_header_mongrel ()
1475
+{
1476
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1477
+  if eval \${$3+:} false; then :
1478
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1479
+$as_echo_n "checking for $2... " >&6; }
1480
+if eval \${$3+:} false; then :
1481
+  $as_echo_n "(cached) " >&6
1482
+fi
1483
+eval ac_res=\$$3
1484
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1485
+$as_echo "$ac_res" >&6; }
1486
+else
1487
+  # Is the header compilable?
1488
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1489
+$as_echo_n "checking $2 usability... " >&6; }
1490
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1491
+/* end confdefs.h.  */
1492
+$4
1493
+#include <$2>
1494
+_ACEOF
1495
+if ac_fn_c_try_compile "$LINENO"; then :
1496
+  ac_header_compiler=yes
1497
+else
1498
+  ac_header_compiler=no
1499
+fi
1500
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1501
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1502
+$as_echo "$ac_header_compiler" >&6; }
1503
+
1504
+# Is the header present?
1505
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1506
+$as_echo_n "checking $2 presence... " >&6; }
1507
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1508
+/* end confdefs.h.  */
1509
+#include <$2>
1510
+_ACEOF
1511
+if ac_fn_c_try_cpp "$LINENO"; then :
1512
+  ac_header_preproc=yes
1513
+else
1514
+  ac_header_preproc=no
1515
+fi
1516
+rm -f conftest.err conftest.i conftest.$ac_ext
1517
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1518
+$as_echo "$ac_header_preproc" >&6; }
1519
+
1520
+# So?  What about this header?
1521
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1522
+  yes:no: )
1523
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1524
+$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1525
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1526
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1527
+    ;;
1528
+  no:yes:* )
1529
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1530
+$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1531
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1532
+$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1533
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1534
+$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1535
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1536
+$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1537
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1538
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1539
+( $as_echo "## --------------------------------- ##
1540
+## Report this to BUG-REPORT-ADDRESS ##
1541
+## --------------------------------- ##"
1542
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
1543
+    ;;
1544
+esac
1545
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1546
+$as_echo_n "checking for $2... " >&6; }
1547
+if eval \${$3+:} false; then :
1548
+  $as_echo_n "(cached) " >&6
1549
+else
1550
+  eval "$3=\$ac_header_compiler"
1551
+fi
1552
+eval ac_res=\$$3
1553
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1554
+$as_echo "$ac_res" >&6; }
1555
+fi
1556
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1557
+
1558
+} # ac_fn_c_check_header_mongrel
1559
+
1560
+# ac_fn_c_try_run LINENO
1561
+# ----------------------
1562
+# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1563
+# that executables *can* be run.
1564
+ac_fn_c_try_run ()
1565
+{
1566
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1567
+  if { { ac_try="$ac_link"
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_link") 2>&5
1575
+  ac_status=$?
1576
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1577
+  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
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_try") 2>&5
1585
+  ac_status=$?
1586
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1587
+  test $ac_status = 0; }; }; then :
1588
+  ac_retval=0
1589
+else
1590
+  $as_echo "$as_me: program exited with status $ac_status" >&5
1591
+       $as_echo "$as_me: failed program was:" >&5
1592
+sed 's/^/| /' conftest.$ac_ext >&5
1593
+
1594
+       ac_retval=$ac_status
1595
+fi
1596
+  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1597
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1598
+  as_fn_set_status $ac_retval
1599
+
1600
+} # ac_fn_c_try_run
1601
+
1602
+# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1603
+# -------------------------------------------------------
1604
+# Tests whether HEADER exists and can be compiled using the include files in
1605
+# INCLUDES, setting the cache variable VAR accordingly.
1606
+ac_fn_c_check_header_compile ()
1607
+{
1608
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1609
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1610
+$as_echo_n "checking for $2... " >&6; }
1611
+if eval \${$3+:} false; then :
1612
+  $as_echo_n "(cached) " >&6
1613
+else
1614
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1615
+/* end confdefs.h.  */
1616
+$4
1617
+#include <$2>
1618
+_ACEOF
1619
+if ac_fn_c_try_compile "$LINENO"; then :
1620
+  eval "$3=yes"
1621
+else
1622
+  eval "$3=no"
1623
+fi
1624
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1625
+fi
1626
+eval ac_res=\$$3
1627
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1628
+$as_echo "$ac_res" >&6; }
1629
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1630
+
1631
+} # ac_fn_c_check_header_compile
1632
+
1390 1633
 # ac_fn_c_try_link LINENO
1391 1634
 # -----------------------
1392 1635
 # Try to link conftest.$ac_ext, and return whether this succeeded.
... ...
@@ -2610,6 +2853,418 @@ fi
2610 2853
 
2611 2854
 
2612 2855
 
2856
+ac_ext=c
2857
+ac_cpp='$CPP $CPPFLAGS'
2858
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2859
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2860
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
2861
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
2862
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
2863
+# On Suns, sometimes $CPP names a directory.
2864
+if test -n "$CPP" && test -d "$CPP"; then
2865
+  CPP=
2866
+fi
2867
+if test -z "$CPP"; then
2868
+  if ${ac_cv_prog_CPP+:} false; then :
2869
+  $as_echo_n "(cached) " >&6
2870
+else
2871
+      # Double quotes because CPP needs to be expanded
2872
+    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2873
+    do
2874
+      ac_preproc_ok=false
2875
+for ac_c_preproc_warn_flag in '' yes
2876
+do
2877
+  # Use a header file that comes with gcc, so configuring glibc
2878
+  # with a fresh cross-compiler works.
2879
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2880
+  # <limits.h> exists even on freestanding compilers.
2881
+  # On the NeXT, cc -E runs the code through the compiler's parser,
2882
+  # not just through cpp. "Syntax error" is here to catch this case.
2883
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2884
+/* end confdefs.h.  */
2885
+#ifdef __STDC__
2886
+# include <limits.h>
2887
+#else
2888
+# include <assert.h>
2889
+#endif
2890
+		     Syntax error
2891
+_ACEOF
2892
+if ac_fn_c_try_cpp "$LINENO"; then :
2893
+
2894
+else
2895
+  # Broken: fails on valid input.
2896
+continue
2897
+fi
2898
+rm -f conftest.err conftest.i conftest.$ac_ext
2899
+
2900
+  # OK, works on sane cases.  Now check whether nonexistent headers
2901
+  # can be detected and how.
2902
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2903
+/* end confdefs.h.  */
2904
+#include <ac_nonexistent.h>
2905
+_ACEOF
2906
+if ac_fn_c_try_cpp "$LINENO"; then :
2907
+  # Broken: success on invalid input.
2908
+continue
2909
+else
2910
+  # Passes both tests.
2911
+ac_preproc_ok=:
2912
+break
2913
+fi
2914
+rm -f conftest.err conftest.i conftest.$ac_ext
2915
+
2916
+done
2917
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2918
+rm -f conftest.i conftest.err conftest.$ac_ext
2919
+if $ac_preproc_ok; then :
2920
+  break
2921
+fi
2922
+
2923
+    done
2924
+    ac_cv_prog_CPP=$CPP
2925
+
2926
+fi
2927
+  CPP=$ac_cv_prog_CPP
2928
+else
2929
+  ac_cv_prog_CPP=$CPP
2930
+fi
2931
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
2932
+$as_echo "$CPP" >&6; }
2933
+ac_preproc_ok=false
2934
+for ac_c_preproc_warn_flag in '' yes
2935
+do
2936
+  # Use a header file that comes with gcc, so configuring glibc
2937
+  # with a fresh cross-compiler works.
2938
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2939
+  # <limits.h> exists even on freestanding compilers.
2940
+  # On the NeXT, cc -E runs the code through the compiler's parser,
2941
+  # not just through cpp. "Syntax error" is here to catch this case.
2942
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2943
+/* end confdefs.h.  */
2944
+#ifdef __STDC__
2945
+# include <limits.h>
2946
+#else
2947
+# include <assert.h>
2948
+#endif
2949
+		     Syntax error
2950
+_ACEOF
2951
+if ac_fn_c_try_cpp "$LINENO"; then :
2952
+
2953
+else
2954
+  # Broken: fails on valid input.
2955
+continue
2956
+fi
2957
+rm -f conftest.err conftest.i conftest.$ac_ext
2958
+
2959
+  # OK, works on sane cases.  Now check whether nonexistent headers
2960
+  # can be detected and how.
2961
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2962
+/* end confdefs.h.  */
2963
+#include <ac_nonexistent.h>
2964
+_ACEOF
2965
+if ac_fn_c_try_cpp "$LINENO"; then :
2966
+  # Broken: success on invalid input.
2967
+continue
2968
+else
2969
+  # Passes both tests.
2970
+ac_preproc_ok=:
2971
+break
2972
+fi
2973
+rm -f conftest.err conftest.i conftest.$ac_ext
2974
+
2975
+done
2976
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2977
+rm -f conftest.i conftest.err conftest.$ac_ext
2978
+if $ac_preproc_ok; then :
2979
+
2980
+else
2981
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2982
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2983
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
2984
+See \`config.log' for more details" "$LINENO" 5; }
2985
+fi
2986
+
2987
+ac_ext=c
2988
+ac_cpp='$CPP $CPPFLAGS'
2989
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2990
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2991
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
2992
+
2993
+
2994
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
2995
+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
2996
+if ${ac_cv_path_GREP+:} false; then :
2997
+  $as_echo_n "(cached) " >&6
2998
+else
2999
+  if test -z "$GREP"; then
3000
+  ac_path_GREP_found=false
3001
+  # Loop through the user's path and test for each of PROGNAME-LIST
3002
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3003
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3004
+do
3005
+  IFS=$as_save_IFS
3006
+  test -z "$as_dir" && as_dir=.
3007
+    for ac_prog in grep ggrep; do
3008
+    for ac_exec_ext in '' $ac_executable_extensions; do
3009
+      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3010
+      as_fn_executable_p "$ac_path_GREP" || continue
3011
+# Check for GNU ac_path_GREP and select it if it is found.
3012
+  # Check for GNU $ac_path_GREP
3013
+case `"$ac_path_GREP" --version 2>&1` in
3014
+*GNU*)
3015
+  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3016
+*)
3017
+  ac_count=0
3018
+  $as_echo_n 0123456789 >"conftest.in"
3019
+  while :
3020
+  do
3021
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
3022
+    mv "conftest.tmp" "conftest.in"
3023
+    cp "conftest.in" "conftest.nl"
3024
+    $as_echo 'GREP' >> "conftest.nl"
3025
+    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3026
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3027
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
3028
+    if test $ac_count -gt ${ac_path_GREP_max-0}; then
3029
+      # Best one so far, save it but keep looking for a better one
3030
+      ac_cv_path_GREP="$ac_path_GREP"
3031
+      ac_path_GREP_max=$ac_count
3032
+    fi
3033
+    # 10*(2^10) chars as input seems more than enough
3034
+    test $ac_count -gt 10 && break
3035
+  done
3036
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3037
+esac
3038
+
3039
+      $ac_path_GREP_found && break 3
3040
+    done
3041
+  done
3042
+  done
3043
+IFS=$as_save_IFS
3044
+  if test -z "$ac_cv_path_GREP"; then
3045
+    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3046
+  fi
3047
+else
3048
+  ac_cv_path_GREP=$GREP
3049
+fi
3050
+
3051
+fi
3052
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3053
+$as_echo "$ac_cv_path_GREP" >&6; }
3054
+ GREP="$ac_cv_path_GREP"
3055
+
3056
+
3057
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3058
+$as_echo_n "checking for egrep... " >&6; }
3059
+if ${ac_cv_path_EGREP+:} false; then :
3060
+  $as_echo_n "(cached) " >&6
3061
+else
3062
+  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3063
+   then ac_cv_path_EGREP="$GREP -E"
3064
+   else
3065
+     if test -z "$EGREP"; then
3066
+  ac_path_EGREP_found=false
3067
+  # Loop through the user's path and test for each of PROGNAME-LIST
3068
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3069
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3070
+do
3071
+  IFS=$as_save_IFS
3072
+  test -z "$as_dir" && as_dir=.
3073
+    for ac_prog in egrep; do
3074
+    for ac_exec_ext in '' $ac_executable_extensions; do
3075
+      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3076
+      as_fn_executable_p "$ac_path_EGREP" || continue
3077
+# Check for GNU ac_path_EGREP and select it if it is found.
3078
+  # Check for GNU $ac_path_EGREP
3079
+case `"$ac_path_EGREP" --version 2>&1` in
3080
+*GNU*)
3081
+  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3082
+*)
3083
+  ac_count=0
3084
+  $as_echo_n 0123456789 >"conftest.in"
3085
+  while :
3086
+  do
3087
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
3088
+    mv "conftest.tmp" "conftest.in"
3089
+    cp "conftest.in" "conftest.nl"
3090
+    $as_echo 'EGREP' >> "conftest.nl"
3091
+    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3092
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3093
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
3094
+    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3095
+      # Best one so far, save it but keep looking for a better one
3096
+      ac_cv_path_EGREP="$ac_path_EGREP"
3097
+      ac_path_EGREP_max=$ac_count
3098
+    fi
3099
+    # 10*(2^10) chars as input seems more than enough
3100
+    test $ac_count -gt 10 && break
3101
+  done
3102
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3103
+esac
3104
+
3105
+      $ac_path_EGREP_found && break 3
3106
+    done
3107
+  done
3108
+  done
3109
+IFS=$as_save_IFS
3110
+  if test -z "$ac_cv_path_EGREP"; then
3111
+    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3112
+  fi
3113
+else
3114
+  ac_cv_path_EGREP=$EGREP
3115
+fi
3116
+
3117
+   fi
3118
+fi
3119
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3120
+$as_echo "$ac_cv_path_EGREP" >&6; }
3121
+ EGREP="$ac_cv_path_EGREP"
3122
+
3123
+
3124
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
3125
+$as_echo_n "checking for ANSI C header files... " >&6; }
3126
+if ${ac_cv_header_stdc+:} false; then :
3127
+  $as_echo_n "(cached) " >&6
3128
+else
3129
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3130
+/* end confdefs.h.  */
3131
+#include <stdlib.h>
3132
+#include <stdarg.h>
3133
+#include <string.h>
3134
+#include <float.h>
3135
+
3136
+int
3137
+main ()
3138
+{
3139
+
3140
+  ;
3141
+  return 0;
3142
+}
3143
+_ACEOF
3144
+if ac_fn_c_try_compile "$LINENO"; then :
3145
+  ac_cv_header_stdc=yes
3146
+else
3147
+  ac_cv_header_stdc=no
3148
+fi
3149
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3150
+
3151
+if test $ac_cv_header_stdc = yes; then
3152
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3153
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3154
+/* end confdefs.h.  */
3155
+#include <string.h>
3156
+
3157
+_ACEOF
3158
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3159
+  $EGREP "memchr" >/dev/null 2>&1; then :
3160
+
3161
+else
3162
+  ac_cv_header_stdc=no
3163
+fi
3164
+rm -f conftest*
3165
+
3166
+fi
3167
+
3168
+if test $ac_cv_header_stdc = yes; then
3169
+  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3170
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3171
+/* end confdefs.h.  */
3172
+#include <stdlib.h>
3173
+
3174
+_ACEOF
3175
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3176
+  $EGREP "free" >/dev/null 2>&1; then :
3177
+
3178
+else
3179
+  ac_cv_header_stdc=no
3180
+fi
3181
+rm -f conftest*
3182
+
3183
+fi
3184
+
3185
+if test $ac_cv_header_stdc = yes; then
3186
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3187
+  if test "$cross_compiling" = yes; then :
3188
+  :
3189
+else
3190
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3191
+/* end confdefs.h.  */
3192
+#include <ctype.h>
3193
+#include <stdlib.h>
3194
+#if ((' ' & 0x0FF) == 0x020)
3195
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3196
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3197
+#else
3198
+# define ISLOWER(c) \
3199
+		   (('a' <= (c) && (c) <= 'i') \
3200
+		     || ('j' <= (c) && (c) <= 'r') \
3201
+		     || ('s' <= (c) && (c) <= 'z'))
3202
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3203
+#endif
3204
+
3205
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3206
+int
3207
+main ()
3208
+{
3209
+  int i;
3210
+  for (i = 0; i < 256; i++)
3211
+    if (XOR (islower (i), ISLOWER (i))
3212
+	|| toupper (i) != TOUPPER (i))
3213
+      return 2;
3214
+  return 0;
3215
+}
3216
+_ACEOF
3217
+if ac_fn_c_try_run "$LINENO"; then :
3218
+
3219
+else
3220
+  ac_cv_header_stdc=no
3221
+fi
3222
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3223
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
3224
+fi
3225
+
3226
+fi
3227
+fi
3228
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
3229
+$as_echo "$ac_cv_header_stdc" >&6; }
3230
+if test $ac_cv_header_stdc = yes; then
3231
+
3232
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
3233
+
3234
+fi
3235
+
3236
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
3237
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3238
+		  inttypes.h stdint.h unistd.h
3239
+do :
3240
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
3241
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
3242
+"
3243
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
3244
+  cat >>confdefs.h <<_ACEOF
3245
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
3246
+_ACEOF
3247
+
3248
+fi
3249
+
3250
+done
3251
+
3252
+
3253
+for ac_header in openssl/hmac.h openssl/evp.h
3254
+do :
3255
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
3256
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
3257
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
3258
+  cat >>confdefs.h <<_ACEOF
3259
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
3260
+_ACEOF
3261
+
3262
+else
3263
+  as_fn_error $? "\"Can't find Openssl\"" "$LINENO" 5
3264
+fi
3265
+
3266
+done
3267
+
2613 3268
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_library_init in -lssl" >&5
2614 3269
 $as_echo_n "checking for SSL_library_init in -lssl... " >&6; }
2615 3270
 if ${ac_cv_lib_ssl_SSL_library_init+:} false; then :
... ...
@@ -32,6 +32,7 @@ AC_ARG_WITH([cryptopp],
32 32
 	[WITH_CRYPTOPP=$withval],
33 33
 	[WITH_CRYPTOPP=yes])
34 34
 
35
+AC_CHECK_HEADERS([openssl/hmac.h openssl/evp.h],,[AC_MSG_ERROR("Can't find Openssl")])
35 36
 AC_CHECK_LIB([ssl], [SSL_library_init],,[AC_MSG_ERROR("Can't find -lssl")])
36 37
 AC_CHECK_LIB([crypto], [EVP_EncryptInit],,[AC_MSG_ERROR("Can't find -lcrypto")])
37 38