git.fiddlerwoaroof.com
Browse code

Finish Makefile

Ed Langley authored on 29/05/2017 18:08:23
Showing 3 changed files
... ...
@@ -1,7 +1,9 @@
1
-CXXFLAGS += -fPIC -fno-stack-protector -std=c++11  -g
1
+CRYPTOPP_NAME=@CRYPTOPP_NAME@
2
+
3
+CXXFLAGS += -fPIC -fno-stack-protector -std=c++11  -g -DCRYPTOPP_NAME=$(CRYPTOPP_NAME)
2 4
 CFLAGS += -fPIC -fno-stack-protector -g
3
-LDFLAGS = -Wl,-Bstatic -lcrypto++ -Wl,-Bdynamic -lpam -Wl,--as-needed
4
-#LDFLAGS = -lcrypto++ -lpam -Wl,--as-needed
5
+#LDFLAGS = -Wl,-Bstatic -l$(CRYPTOPP_NAME) -Wl,-Bdynamic -lpam -Wl,--as-needed
6
+LDFLAGS = -lpam -l$(CRYPTOPP_NAME)
5 7
 
6 8
 INTEGRATION_OBJS = sys_syslog.o sys_fstream.o sys_unistd.o sys_pwd.o sys_pam.o \
7 9
                    sys_stdlib.o sys_time.o
... ...
@@ -14,10 +16,6 @@ MODULELIB = pam_dual_control.so
14 16
 
15 17
 UNAME_S := $(shell uname -s)
16 18
 
17
-CRYPTOPP_NAME=@CRYPTOPP_NAME@
18
-
19
-MYDEFS = @DEFS@
20
-
21 19
 .PHONY: all
22 20
 all: .depend dual_control.a dual_control
23 21
 
... ...
@@ -46,12 +44,12 @@ distclean: clean
46 44
 
47 45
 .depend: $(OBJS:.o=.cc) $(TEST_SOURCES)
48 46
 	rm -f ./.depend
49
-	$(CXX) -std=c++11 -MM $^ > ./.depend;
47
+	$(CXX) -std=c++11 -MM -DCRYPTOPP_NAME=$(CRYPTOPP_NAME) $^ > ./.depend;
50 48
 
51 49
 -include .depend
52 50
 
53 51
 %_test.out: %_test.o $(OBJS)
54
-	$(CXX) $(CXXFLAGS) $(CPPFLAGS) -o $@ $^ -lcryptopp
52
+	$(CXX) $(CXXFLAGS) $(CPPFLAGS) -o $@ $^ -l$(CRYPTOPP_NAME)
55 53
 
56 54
 RUN_%: %.out
57 55
 	@echo running $<
... ...
@@ -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,51 @@ 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
+CRYPTOPP_NAME
628
+EGREP
629
+GREP
630
+CXXCPP
631
+ac_ct_CXX
632
+CXXFLAGS
633
+CXX
590 634
 PAM_MODULE_DIRECTORY
591 635
 OBJEXT
592 636
 EXEEXT
... ...
@@ -637,6 +681,7 @@ ac_subst_files=''
637 681
 ac_user_opts='
638 682
 enable_option_checking
639 683
 with_pam_module_directory
684
+with_cryptopp
640 685
 '
641 686
       ac_precious_vars='build_alias
642 687
 host_alias
... ...
@@ -645,7 +690,11 @@ CC
645 690
 CFLAGS
646 691
 LDFLAGS
647 692
 LIBS
648
-CPPFLAGS'
693
+CPPFLAGS
694
+CXX
695
+CXXFLAGS
696
+CCC
697
+CXXCPP'
649 698
 
650 699
 
651 700
 # Initialize some variables set by options.
... ...
@@ -1257,6 +1306,7 @@ Optional Packages:
1257 1306
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1258 1307
   --with-pam-module-directory=NAME
1259 1308
         Use NAME as installation directory for PAM modules
1309
+  --with-cryptopp         Build algorithms that need Crypto++ support
1260 1310
 
1261 1311
 Some influential environment variables:
1262 1312
   CC          C compiler command
... ...
@@ -1266,6 +1316,9 @@ Some influential environment variables:
1266 1316
   LIBS        libraries to pass to the linker, e.g. -l<library>
1267 1317
   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1268 1318
               you have headers in a nonstandard directory <include dir>
1319
+  CXX         C++ compiler command
1320
+  CXXFLAGS    C++ compiler flags
1321
+  CXXCPP      C++ preprocessor
1269 1322
 
1270 1323
 Use these variables to override the choices made by `configure' or to help
1271 1324
 it to find libraries and programs with nonstandard names/locations.
... ...
@@ -1384,6 +1437,245 @@ fi
1384 1437
   as_fn_set_status $ac_retval
1385 1438
 
1386 1439
 } # ac_fn_c_try_compile
1440
+
1441
+# ac_fn_cxx_try_compile LINENO
1442
+# ----------------------------
1443
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
1444
+ac_fn_cxx_try_compile ()
1445
+{
1446
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1447
+  rm -f conftest.$ac_objext
1448
+  if { { ac_try="$ac_compile"
1449
+case "(($ac_try" in
1450
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1451
+  *) ac_try_echo=$ac_try;;
1452
+esac
1453
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1454
+$as_echo "$ac_try_echo"; } >&5
1455
+  (eval "$ac_compile") 2>conftest.err
1456
+  ac_status=$?
1457
+  if test -s conftest.err; then
1458
+    grep -v '^ *+' conftest.err >conftest.er1
1459
+    cat conftest.er1 >&5
1460
+    mv -f conftest.er1 conftest.err
1461
+  fi
1462
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1463
+  test $ac_status = 0; } && {
1464
+	 test -z "$ac_cxx_werror_flag" ||
1465
+	 test ! -s conftest.err
1466
+       } && test -s conftest.$ac_objext; then :
1467
+  ac_retval=0
1468
+else
1469
+  $as_echo "$as_me: failed program was:" >&5
1470
+sed 's/^/| /' conftest.$ac_ext >&5
1471
+
1472
+	ac_retval=1
1473
+fi
1474
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1475
+  as_fn_set_status $ac_retval
1476
+
1477
+} # ac_fn_cxx_try_compile
1478
+
1479
+# ac_fn_cxx_try_cpp LINENO
1480
+# ------------------------
1481
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1482
+ac_fn_cxx_try_cpp ()
1483
+{
1484
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1485
+  if { { ac_try="$ac_cpp conftest.$ac_ext"
1486
+case "(($ac_try" in
1487
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1488
+  *) ac_try_echo=$ac_try;;
1489
+esac
1490
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1491
+$as_echo "$ac_try_echo"; } >&5
1492
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1493
+  ac_status=$?
1494
+  if test -s conftest.err; then
1495
+    grep -v '^ *+' conftest.err >conftest.er1
1496
+    cat conftest.er1 >&5
1497
+    mv -f conftest.er1 conftest.err
1498
+  fi
1499
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1500
+  test $ac_status = 0; } > conftest.i && {
1501
+	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
1502
+	 test ! -s conftest.err
1503
+       }; then :
1504
+  ac_retval=0
1505
+else
1506
+  $as_echo "$as_me: failed program was:" >&5
1507
+sed 's/^/| /' conftest.$ac_ext >&5
1508
+
1509
+    ac_retval=1
1510
+fi
1511
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1512
+  as_fn_set_status $ac_retval
1513
+
1514
+} # ac_fn_cxx_try_cpp
1515
+
1516
+# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
1517
+# ---------------------------------------------------------
1518
+# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1519
+# the include files in INCLUDES and setting the cache variable VAR
1520
+# accordingly.
1521
+ac_fn_cxx_check_header_mongrel ()
1522
+{
1523
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1524
+  if eval \${$3+:} false; then :
1525
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1526
+$as_echo_n "checking for $2... " >&6; }
1527
+if eval \${$3+:} false; then :
1528
+  $as_echo_n "(cached) " >&6
1529
+fi
1530
+eval ac_res=\$$3
1531
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1532
+$as_echo "$ac_res" >&6; }
1533
+else
1534
+  # Is the header compilable?
1535
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1536
+$as_echo_n "checking $2 usability... " >&6; }
1537
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1538
+/* end confdefs.h.  */
1539
+$4
1540
+#include <$2>
1541
+_ACEOF
1542
+if ac_fn_cxx_try_compile "$LINENO"; then :
1543
+  ac_header_compiler=yes
1544
+else
1545
+  ac_header_compiler=no
1546
+fi
1547
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1548
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1549
+$as_echo "$ac_header_compiler" >&6; }
1550
+
1551
+# Is the header present?
1552
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1553
+$as_echo_n "checking $2 presence... " >&6; }
1554
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1555
+/* end confdefs.h.  */
1556
+#include <$2>
1557
+_ACEOF
1558
+if ac_fn_cxx_try_cpp "$LINENO"; then :
1559
+  ac_header_preproc=yes
1560
+else
1561
+  ac_header_preproc=no
1562
+fi
1563
+rm -f conftest.err conftest.i conftest.$ac_ext
1564
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1565
+$as_echo "$ac_header_preproc" >&6; }
1566
+
1567
+# So?  What about this header?
1568
+case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
1569
+  yes:no: )
1570
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1571
+$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1572
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1573
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1574
+    ;;
1575
+  no:yes:* )
1576
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1577
+$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1578
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1579
+$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1580
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1581
+$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1582
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1583
+$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1584
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1585
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1586
+( $as_echo "## --------------------------------- ##
1587
+## Report this to BUG-REPORT-ADDRESS ##
1588
+## --------------------------------- ##"
1589
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
1590
+    ;;
1591
+esac
1592
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1593
+$as_echo_n "checking for $2... " >&6; }
1594
+if eval \${$3+:} false; then :
1595
+  $as_echo_n "(cached) " >&6
1596
+else
1597
+  eval "$3=\$ac_header_compiler"
1598
+fi
1599
+eval ac_res=\$$3
1600
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1601
+$as_echo "$ac_res" >&6; }
1602
+fi
1603
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1604
+
1605
+} # ac_fn_cxx_check_header_mongrel
1606
+
1607
+# ac_fn_cxx_try_run LINENO
1608
+# ------------------------
1609
+# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1610
+# that executables *can* be run.
1611
+ac_fn_cxx_try_run ()
1612
+{
1613
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1614
+  if { { ac_try="$ac_link"
1615
+case "(($ac_try" in
1616
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1617
+  *) ac_try_echo=$ac_try;;
1618
+esac
1619
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1620
+$as_echo "$ac_try_echo"; } >&5
1621
+  (eval "$ac_link") 2>&5
1622
+  ac_status=$?
1623
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1624
+  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1625
+  { { case "(($ac_try" in
1626
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1627
+  *) ac_try_echo=$ac_try;;
1628
+esac
1629
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1630
+$as_echo "$ac_try_echo"; } >&5
1631
+  (eval "$ac_try") 2>&5
1632
+  ac_status=$?
1633
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1634
+  test $ac_status = 0; }; }; then :
1635
+  ac_retval=0
1636
+else
1637
+  $as_echo "$as_me: program exited with status $ac_status" >&5
1638
+       $as_echo "$as_me: failed program was:" >&5
1639
+sed 's/^/| /' conftest.$ac_ext >&5
1640
+
1641
+       ac_retval=$ac_status
1642
+fi
1643
+  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1644
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1645
+  as_fn_set_status $ac_retval
1646
+
1647
+} # ac_fn_cxx_try_run
1648
+
1649
+# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
1650
+# ---------------------------------------------------------
1651
+# Tests whether HEADER exists and can be compiled using the include files in
1652
+# INCLUDES, setting the cache variable VAR accordingly.
1653
+ac_fn_cxx_check_header_compile ()
1654
+{
1655
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1656
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1657
+$as_echo_n "checking for $2... " >&6; }
1658
+if eval \${$3+:} false; then :
1659
+  $as_echo_n "(cached) " >&6
1660
+else
1661
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1662
+/* end confdefs.h.  */
1663
+$4
1664
+#include <$2>
1665
+_ACEOF
1666
+if ac_fn_cxx_try_compile "$LINENO"; then :
1667
+  eval "$3=yes"
1668
+else
1669
+  eval "$3=no"
1670
+fi
1671
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1672
+fi
1673
+eval ac_res=\$$3
1674
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1675
+$as_echo "$ac_res" >&6; }
1676
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1677
+
1678
+} # ac_fn_cxx_check_header_compile
1387 1679
 cat >config.log <<_ACEOF
1388 1680
 This file contains any messages produced by compilers while
1389 1681
 running configure, to aid debugging if configure makes a mistake.
... ...
@@ -2551,103 +2843,820 @@ fi
2551 2843
 
2552 2844
 
2553 2845
 
2846
+#check whether to build with crypto++
2554 2847
 
2555
-ac_config_files="$ac_config_files Makefile"
2556
-
2557
-cat >confcache <<\_ACEOF
2558
-# This file is a shell script that caches the results of configure
2559
-# tests run on this system so they can be shared between configure
2560
-# scripts and configure runs, see configure's option --config-cache.
2561
-# It is not useful on other systems.  If it contains results you don't
2562
-# want to keep, you may remove or edit it.
2563
-#
2564
-# config.status only pays attention to the cache file if you give it
2565
-# the --recheck option to rerun configure.
2566
-#
2567
-# `ac_cv_env_foo' variables (set or unset) will be overridden when
2568
-# loading this file, other *unset* `ac_cv_foo' will be assigned the
2569
-# following values.
2570
-
2571
-_ACEOF
2848
+# Check whether --with-cryptopp was given.
2849
+if test "${with_cryptopp+set}" = set; then :
2850
+  withval=$with_cryptopp; WITH_CRYPTOPP=$withval
2851
+else
2852
+  WITH_CRYPTOPP=yes
2853
+fi
2572 2854
 
2573
-# The following way of writing the cache mishandles newlines in values,
2574
-# but we know of no workaround that is simple, portable, and efficient.
2575
-# So, we kill variables containing newlines.
2576
-# Ultrix sh set writes to stderr and can't be redirected directly,
2577
-# and sets the high bit in the cache file unless we assign to the vars.
2578
-(
2579
-  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
2580
-    eval ac_val=\$$ac_var
2581
-    case $ac_val in #(
2582
-    *${as_nl}*)
2583
-      case $ac_var in #(
2584
-      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2585
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2586
-      esac
2587
-      case $ac_var in #(
2588
-      _ | IFS | as_nl) ;; #(
2589
-      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2590
-      *) { eval $ac_var=; unset $ac_var;} ;;
2591
-      esac ;;
2592
-    esac
2593
-  done
2594 2855
 
2595
-  (set) 2>&1 |
2596
-    case $as_nl`(ac_space=' '; set) 2>&1` in #(
2597
-    *${as_nl}ac_space=\ *)
2598
-      # `set' does not quote correctly, so add quotes: double-quote
2599
-      # substitution turns \\\\ into \\, and sed turns \\ into \.
2600
-      sed -n \
2601
-	"s/'/'\\\\''/g;
2602
-	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
2603
-      ;; #(
2604
-    *)
2605
-      # `set' quotes correctly as required by POSIX, so do not add quotes.
2606
-      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2607
-      ;;
2608
-    esac |
2609
-    sort
2610
-) |
2611
-  sed '
2612
-     /^ac_cv_env_/b end
2613
-     t clear
2614
-     :clear
2615
-     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
2616
-     t end
2617
-     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
2618
-     :end' >>confcache
2619
-if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
2620
-  if test -w "$cache_file"; then
2621
-    if test "x$cache_file" != "x/dev/null"; then
2622
-      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
2623
-$as_echo "$as_me: updating cache $cache_file" >&6;}
2624
-      if test ! -f "$cache_file" || test -h "$cache_file"; then
2625
-	cat confcache >"$cache_file"
2626
-      else
2627
-        case $cache_file in #(
2628
-        */* | ?:*)
2629
-	  mv -f confcache "$cache_file"$$ &&
2630
-	  mv -f "$cache_file"$$ "$cache_file" ;; #(
2631
-        *)
2632
-	  mv -f confcache "$cache_file" ;;
2633
-	esac
2634
-      fi
2635
-    fi
2856
+#and check crypto++
2857
+if test "$WITH_CRYPTOPP" = "yes"; then
2858
+	#crypto++ headers are either in include/crypto++ or include/cryptopp,
2859
+	#the information is otherwise unavailable from standard configuration
2860
+	#means. Please report/add more tests if you encounter distros that
2861
+	#place them elsewhere.
2862
+	ac_ext=cpp
2863
+ac_cpp='$CXXCPP $CPPFLAGS'
2864
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2865
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2866
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2867
+
2868
+	ac_ext=cpp
2869
+ac_cpp='$CXXCPP $CPPFLAGS'
2870
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2871
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2872
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2873
+if test -z "$CXX"; then
2874
+  if test -n "$CCC"; then
2875
+    CXX=$CCC
2636 2876
   else
2637
-    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
2638
-$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
2877
+    if test -n "$ac_tool_prefix"; then
2878
+  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
2879
+  do
2880
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2881
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2882
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2883
+$as_echo_n "checking for $ac_word... " >&6; }
2884
+if ${ac_cv_prog_CXX+:} false; then :
2885
+  $as_echo_n "(cached) " >&6
2886
+else
2887
+  if test -n "$CXX"; then
2888
+  ac_cv_prog_CXX="$CXX" # Let the user override the test.
2889
+else
2890
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2891
+for as_dir in $PATH
2892
+do
2893
+  IFS=$as_save_IFS
2894
+  test -z "$as_dir" && as_dir=.
2895
+    for ac_exec_ext in '' $ac_executable_extensions; do
2896
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2897
+    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2898
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2899
+    break 2
2639 2900
   fi
2640
-fi
2641
-rm -f confcache
2901
+done
2902
+  done
2903
+IFS=$as_save_IFS
2642 2904
 
2643
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
2644
-# Let make expand exec_prefix.
2645
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2905
+fi
2906
+fi
2907
+CXX=$ac_cv_prog_CXX
2908
+if test -n "$CXX"; then
2909
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
2910
+$as_echo "$CXX" >&6; }
2911
+else
2912
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2913
+$as_echo "no" >&6; }
2914
+fi
2646 2915
 
2647
-DEFS=-DHAVE_CONFIG_H
2648 2916
 
2649
-ac_libobjs=
2650
-ac_ltlibobjs=
2917
+    test -n "$CXX" && break
2918
+  done
2919
+fi
2920
+if test -z "$CXX"; then
2921
+  ac_ct_CXX=$CXX
2922
+  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
2923
+do
2924
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
2925
+set dummy $ac_prog; ac_word=$2
2926
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2927
+$as_echo_n "checking for $ac_word... " >&6; }
2928
+if ${ac_cv_prog_ac_ct_CXX+:} false; then :
2929
+  $as_echo_n "(cached) " >&6
2930
+else
2931
+  if test -n "$ac_ct_CXX"; then
2932
+  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2933
+else
2934
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2935
+for as_dir in $PATH
2936
+do
2937
+  IFS=$as_save_IFS
2938
+  test -z "$as_dir" && as_dir=.
2939
+    for ac_exec_ext in '' $ac_executable_extensions; do
2940
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2941
+    ac_cv_prog_ac_ct_CXX="$ac_prog"
2942
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2943
+    break 2
2944
+  fi
2945
+done
2946
+  done
2947
+IFS=$as_save_IFS
2948
+
2949
+fi
2950
+fi
2951
+ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2952
+if test -n "$ac_ct_CXX"; then
2953
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
2954
+$as_echo "$ac_ct_CXX" >&6; }
2955
+else
2956
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2957
+$as_echo "no" >&6; }
2958
+fi
2959
+
2960
+
2961
+  test -n "$ac_ct_CXX" && break
2962
+done
2963
+
2964
+  if test "x$ac_ct_CXX" = x; then
2965
+    CXX="g++"
2966
+  else
2967
+    case $cross_compiling:$ac_tool_warned in
2968
+yes:)
2969
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2970
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2971
+ac_tool_warned=yes ;;
2972
+esac
2973
+    CXX=$ac_ct_CXX
2974
+  fi
2975
+fi
2976
+
2977
+  fi
2978
+fi
2979
+# Provide some information about the compiler.
2980
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
2981
+set X $ac_compile
2982
+ac_compiler=$2
2983
+for ac_option in --version -v -V -qversion; do
2984
+  { { ac_try="$ac_compiler $ac_option >&5"
2985
+case "(($ac_try" in
2986
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2987
+  *) ac_try_echo=$ac_try;;
2988
+esac
2989
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2990
+$as_echo "$ac_try_echo"; } >&5
2991
+  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
2992
+  ac_status=$?
2993
+  if test -s conftest.err; then
2994
+    sed '10a\
2995
+... rest of stderr output deleted ...
2996
+         10q' conftest.err >conftest.er1
2997
+    cat conftest.er1 >&5
2998
+  fi
2999
+  rm -f conftest.er1 conftest.err
3000
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3001
+  test $ac_status = 0; }
3002
+done
3003
+
3004
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3005
+$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
3006
+if ${ac_cv_cxx_compiler_gnu+:} false; then :
3007
+  $as_echo_n "(cached) " >&6
3008
+else
3009
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3010
+/* end confdefs.h.  */
3011
+
3012
+int
3013
+main ()
3014
+{
3015
+#ifndef __GNUC__
3016
+       choke me
3017
+#endif
3018
+
3019
+  ;
3020
+  return 0;
3021
+}
3022
+_ACEOF
3023
+if ac_fn_cxx_try_compile "$LINENO"; then :
3024
+  ac_compiler_gnu=yes
3025
+else
3026
+  ac_compiler_gnu=no
3027
+fi
3028
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3029
+ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3030
+
3031
+fi
3032
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3033
+$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3034
+if test $ac_compiler_gnu = yes; then
3035
+  GXX=yes
3036
+else
3037
+  GXX=
3038
+fi
3039
+ac_test_CXXFLAGS=${CXXFLAGS+set}
3040
+ac_save_CXXFLAGS=$CXXFLAGS
3041
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3042
+$as_echo_n "checking whether $CXX accepts -g... " >&6; }
3043
+if ${ac_cv_prog_cxx_g+:} false; then :
3044
+  $as_echo_n "(cached) " >&6
3045
+else
3046
+  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3047
+   ac_cxx_werror_flag=yes
3048
+   ac_cv_prog_cxx_g=no
3049
+   CXXFLAGS="-g"
3050
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3051
+/* end confdefs.h.  */
3052
+
3053
+int
3054
+main ()
3055
+{
3056
+
3057
+  ;
3058
+  return 0;
3059
+}
3060
+_ACEOF
3061
+if ac_fn_cxx_try_compile "$LINENO"; then :
3062
+  ac_cv_prog_cxx_g=yes
3063
+else
3064
+  CXXFLAGS=""
3065
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3066
+/* end confdefs.h.  */
3067
+
3068
+int
3069
+main ()
3070
+{
3071
+
3072
+  ;
3073
+  return 0;
3074
+}
3075
+_ACEOF
3076
+if ac_fn_cxx_try_compile "$LINENO"; then :
3077
+
3078
+else
3079
+  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3080
+	 CXXFLAGS="-g"
3081
+	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3082
+/* end confdefs.h.  */
3083
+
3084
+int
3085
+main ()
3086
+{
3087
+
3088
+  ;
3089
+  return 0;
3090
+}
3091
+_ACEOF
3092
+if ac_fn_cxx_try_compile "$LINENO"; then :
3093
+  ac_cv_prog_cxx_g=yes
3094
+fi
3095
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3096
+fi
3097
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3098
+fi
3099
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3100
+   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3101
+fi
3102
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
3103
+$as_echo "$ac_cv_prog_cxx_g" >&6; }
3104
+if test "$ac_test_CXXFLAGS" = set; then
3105
+  CXXFLAGS=$ac_save_CXXFLAGS
3106
+elif test $ac_cv_prog_cxx_g = yes; then
3107
+  if test "$GXX" = yes; then
3108
+    CXXFLAGS="-g -O2"
3109
+  else
3110
+    CXXFLAGS="-g"
3111
+  fi
3112
+else
3113
+  if test "$GXX" = yes; then
3114
+    CXXFLAGS="-O2"
3115
+  else
3116
+    CXXFLAGS=
3117
+  fi
3118
+fi
3119
+ac_ext=cpp
3120
+ac_cpp='$CXXCPP $CPPFLAGS'
3121
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3122
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3123
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3124
+
3125
+
3126
+ac_ext=cpp
3127
+ac_cpp='$CXXCPP $CPPFLAGS'
3128
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3129
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3130
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3131
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
3132
+$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
3133
+if test -z "$CXXCPP"; then
3134
+  if ${ac_cv_prog_CXXCPP+:} false; then :
3135
+  $as_echo_n "(cached) " >&6
3136
+else
3137
+      # Double quotes because CXXCPP needs to be expanded
3138
+    for CXXCPP in "$CXX -E" "/lib/cpp"
3139
+    do
3140
+      ac_preproc_ok=false
3141
+for ac_cxx_preproc_warn_flag in '' yes
3142
+do
3143
+  # Use a header file that comes with gcc, so configuring glibc
3144
+  # with a fresh cross-compiler works.
3145
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3146
+  # <limits.h> exists even on freestanding compilers.
3147
+  # On the NeXT, cc -E runs the code through the compiler's parser,
3148
+  # not just through cpp. "Syntax error" is here to catch this case.
3149
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3150
+/* end confdefs.h.  */
3151
+#ifdef __STDC__
3152
+# include <limits.h>
3153
+#else
3154
+# include <assert.h>
3155
+#endif
3156
+		     Syntax error
3157
+_ACEOF
3158
+if ac_fn_cxx_try_cpp "$LINENO"; then :
3159
+
3160
+else
3161
+  # Broken: fails on valid input.
3162
+continue
3163
+fi
3164
+rm -f conftest.err conftest.i conftest.$ac_ext
3165
+
3166
+  # OK, works on sane cases.  Now check whether nonexistent headers
3167
+  # can be detected and how.
3168
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3169
+/* end confdefs.h.  */
3170
+#include <ac_nonexistent.h>
3171
+_ACEOF
3172
+if ac_fn_cxx_try_cpp "$LINENO"; then :
3173
+  # Broken: success on invalid input.
3174
+continue
3175
+else
3176
+  # Passes both tests.
3177
+ac_preproc_ok=:
3178
+break
3179
+fi
3180
+rm -f conftest.err conftest.i conftest.$ac_ext
3181
+
3182
+done
3183
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3184
+rm -f conftest.i conftest.err conftest.$ac_ext
3185
+if $ac_preproc_ok; then :
3186
+  break
3187
+fi
3188
+
3189
+    done
3190
+    ac_cv_prog_CXXCPP=$CXXCPP
3191
+
3192
+fi
3193
+  CXXCPP=$ac_cv_prog_CXXCPP
3194
+else
3195
+  ac_cv_prog_CXXCPP=$CXXCPP
3196
+fi
3197
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
3198
+$as_echo "$CXXCPP" >&6; }
3199
+ac_preproc_ok=false
3200
+for ac_cxx_preproc_warn_flag in '' yes
3201
+do
3202
+  # Use a header file that comes with gcc, so configuring glibc
3203
+  # with a fresh cross-compiler works.
3204
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3205
+  # <limits.h> exists even on freestanding compilers.
3206
+  # On the NeXT, cc -E runs the code through the compiler's parser,
3207
+  # not just through cpp. "Syntax error" is here to catch this case.
3208
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3209
+/* end confdefs.h.  */
3210
+#ifdef __STDC__
3211
+# include <limits.h>
3212
+#else
3213
+# include <assert.h>
3214
+#endif
3215
+		     Syntax error
3216
+_ACEOF
3217
+if ac_fn_cxx_try_cpp "$LINENO"; then :
3218
+
3219
+else
3220
+  # Broken: fails on valid input.
3221
+continue
3222
+fi
3223
+rm -f conftest.err conftest.i conftest.$ac_ext
3224
+
3225
+  # OK, works on sane cases.  Now check whether nonexistent headers
3226
+  # can be detected and how.
3227
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3228
+/* end confdefs.h.  */
3229
+#include <ac_nonexistent.h>
3230
+_ACEOF
3231
+if ac_fn_cxx_try_cpp "$LINENO"; then :
3232
+  # Broken: success on invalid input.
3233
+continue
3234
+else
3235
+  # Passes both tests.
3236
+ac_preproc_ok=:
3237
+break
3238
+fi
3239
+rm -f conftest.err conftest.i conftest.$ac_ext
3240
+
3241
+done
3242
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3243
+rm -f conftest.i conftest.err conftest.$ac_ext
3244
+if $ac_preproc_ok; then :
3245
+
3246
+else
3247
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3248
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3249
+as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
3250
+See \`config.log' for more details" "$LINENO" 5; }
3251
+fi
3252
+
3253
+ac_ext=cpp
3254
+ac_cpp='$CXXCPP $CPPFLAGS'
3255
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3256
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3257
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3258
+
3259
+
3260
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3261
+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3262
+if ${ac_cv_path_GREP+:} false; then :
3263
+  $as_echo_n "(cached) " >&6
3264
+else
3265
+  if test -z "$GREP"; then
3266
+  ac_path_GREP_found=false
3267
+  # Loop through the user's path and test for each of PROGNAME-LIST
3268
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3269
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3270
+do
3271
+  IFS=$as_save_IFS
3272
+  test -z "$as_dir" && as_dir=.
3273
+    for ac_prog in grep ggrep; do
3274
+    for ac_exec_ext in '' $ac_executable_extensions; do
3275
+      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3276
+      as_fn_executable_p "$ac_path_GREP" || continue
3277
+# Check for GNU ac_path_GREP and select it if it is found.
3278
+  # Check for GNU $ac_path_GREP
3279
+case `"$ac_path_GREP" --version 2>&1` in
3280
+*GNU*)
3281
+  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3282
+*)
3283
+  ac_count=0
3284
+  $as_echo_n 0123456789 >"conftest.in"
3285
+  while :
3286
+  do
3287
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
3288
+    mv "conftest.tmp" "conftest.in"
3289
+    cp "conftest.in" "conftest.nl"
3290
+    $as_echo 'GREP' >> "conftest.nl"
3291
+    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3292
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3293
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
3294
+    if test $ac_count -gt ${ac_path_GREP_max-0}; then
3295
+      # Best one so far, save it but keep looking for a better one
3296
+      ac_cv_path_GREP="$ac_path_GREP"
3297
+      ac_path_GREP_max=$ac_count
3298
+    fi
3299
+    # 10*(2^10) chars as input seems more than enough
3300
+    test $ac_count -gt 10 && break
3301
+  done
3302
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3303
+esac
3304
+
3305
+      $ac_path_GREP_found && break 3
3306
+    done
3307
+  done
3308
+  done
3309
+IFS=$as_save_IFS
3310
+  if test -z "$ac_cv_path_GREP"; then
3311
+    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3312
+  fi
3313
+else
3314
+  ac_cv_path_GREP=$GREP
3315
+fi
3316
+
3317
+fi
3318
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3319
+$as_echo "$ac_cv_path_GREP" >&6; }
3320
+ GREP="$ac_cv_path_GREP"
3321
+
3322
+
3323
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3324
+$as_echo_n "checking for egrep... " >&6; }
3325
+if ${ac_cv_path_EGREP+:} false; then :
3326
+  $as_echo_n "(cached) " >&6
3327
+else
3328
+  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3329
+   then ac_cv_path_EGREP="$GREP -E"
3330
+   else
3331
+     if test -z "$EGREP"; then
3332
+  ac_path_EGREP_found=false
3333
+  # Loop through the user's path and test for each of PROGNAME-LIST
3334
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3335
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3336
+do
3337
+  IFS=$as_save_IFS
3338
+  test -z "$as_dir" && as_dir=.
3339
+    for ac_prog in egrep; do
3340
+    for ac_exec_ext in '' $ac_executable_extensions; do
3341
+      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3342
+      as_fn_executable_p "$ac_path_EGREP" || continue
3343
+# Check for GNU ac_path_EGREP and select it if it is found.
3344
+  # Check for GNU $ac_path_EGREP
3345
+case `"$ac_path_EGREP" --version 2>&1` in
3346
+*GNU*)
3347
+  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3348
+*)
3349
+  ac_count=0
3350
+  $as_echo_n 0123456789 >"conftest.in"
3351
+  while :
3352
+  do
3353
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
3354
+    mv "conftest.tmp" "conftest.in"
3355
+    cp "conftest.in" "conftest.nl"
3356
+    $as_echo 'EGREP' >> "conftest.nl"
3357
+    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3358
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3359
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
3360
+    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3361
+      # Best one so far, save it but keep looking for a better one
3362
+      ac_cv_path_EGREP="$ac_path_EGREP"
3363
+      ac_path_EGREP_max=$ac_count
3364
+    fi
3365
+    # 10*(2^10) chars as input seems more than enough
3366
+    test $ac_count -gt 10 && break
3367
+  done
3368
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3369
+esac
3370
+
3371
+      $ac_path_EGREP_found && break 3
3372
+    done
3373
+  done
3374
+  done
3375
+IFS=$as_save_IFS
3376
+  if test -z "$ac_cv_path_EGREP"; then
3377
+    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3378
+  fi
3379
+else
3380
+  ac_cv_path_EGREP=$EGREP
3381
+fi
3382
+
3383
+   fi
3384
+fi
3385
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3386
+$as_echo "$ac_cv_path_EGREP" >&6; }
3387
+ EGREP="$ac_cv_path_EGREP"
3388
+
3389
+
3390
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
3391
+$as_echo_n "checking for ANSI C header files... " >&6; }
3392
+if ${ac_cv_header_stdc+:} false; then :
3393
+  $as_echo_n "(cached) " >&6
3394
+else
3395
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3396
+/* end confdefs.h.  */
3397
+#include <stdlib.h>
3398
+#include <stdarg.h>
3399
+#include <string.h>
3400
+#include <float.h>
3401
+
3402
+int
3403
+main ()
3404
+{
3405
+
3406
+  ;
3407
+  return 0;
3408
+}
3409
+_ACEOF
3410
+if ac_fn_cxx_try_compile "$LINENO"; then :
3411
+  ac_cv_header_stdc=yes
3412
+else
3413
+  ac_cv_header_stdc=no
3414
+fi
3415
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3416
+
3417
+if test $ac_cv_header_stdc = yes; then
3418
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3419
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3420
+/* end confdefs.h.  */
3421
+#include <string.h>
3422
+
3423
+_ACEOF
3424
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3425
+  $EGREP "memchr" >/dev/null 2>&1; then :
3426
+
3427
+else
3428
+  ac_cv_header_stdc=no
3429
+fi
3430
+rm -f conftest*
3431
+
3432
+fi
3433
+
3434
+if test $ac_cv_header_stdc = yes; then
3435
+  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3436
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3437
+/* end confdefs.h.  */
3438
+#include <stdlib.h>
3439
+
3440
+_ACEOF
3441
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3442
+  $EGREP "free" >/dev/null 2>&1; then :
3443
+
3444
+else
3445
+  ac_cv_header_stdc=no
3446
+fi
3447
+rm -f conftest*
3448
+
3449
+fi
3450
+
3451
+if test $ac_cv_header_stdc = yes; then
3452
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3453
+  if test "$cross_compiling" = yes; then :
3454
+  :
3455
+else
3456
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3457
+/* end confdefs.h.  */
3458
+#include <ctype.h>
3459
+#include <stdlib.h>
3460
+#if ((' ' & 0x0FF) == 0x020)
3461
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3462
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3463
+#else
3464
+# define ISLOWER(c) \
3465
+		   (('a' <= (c) && (c) <= 'i') \
3466
+		     || ('j' <= (c) && (c) <= 'r') \
3467
+		     || ('s' <= (c) && (c) <= 'z'))
3468
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3469
+#endif
3470
+
3471
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3472
+int
3473
+main ()
3474
+{
3475
+  int i;
3476
+  for (i = 0; i < 256; i++)
3477
+    if (XOR (islower (i), ISLOWER (i))
3478
+	|| toupper (i) != TOUPPER (i))
3479
+      return 2;
3480
+  return 0;
3481
+}
3482
+_ACEOF
3483
+if ac_fn_cxx_try_run "$LINENO"; then :
3484
+
3485
+else
3486
+  ac_cv_header_stdc=no
3487
+fi
3488
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3489
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
3490
+fi
3491
+
3492
+fi
3493
+fi
3494
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
3495
+$as_echo "$ac_cv_header_stdc" >&6; }
3496
+if test $ac_cv_header_stdc = yes; then
3497
+
3498
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
3499
+
3500
+fi
3501
+
3502
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
3503
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3504
+		  inttypes.h stdint.h unistd.h
3505
+do :
3506
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
3507
+ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
3508
+"
3509
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
3510
+  cat >>confdefs.h <<_ACEOF
3511
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
3512
+_ACEOF
3513
+
3514
+fi
3515
+
3516
+done
3517
+
3518
+
3519
+for ac_header in crypto++/hex.h cryptopp/base32.h
3520
+do :
3521
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
3522
+ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
3523
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
3524
+  cat >>confdefs.h <<_ACEOF
3525
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
3526
+_ACEOF
3527
+ dualcontrol_found_cryptopp_headers=yes;break;
3528
+else
3529
+  echo ...
3530
+fi
3531
+
3532
+done
3533
+
3534
+	if test "x$dualcontrol_found_cryptopp_headers" != "xyes"; then :
3535
+  as_fn_error $? "Unable to find Crypto++" "$LINENO" 5
3536
+fi
3537
+	$as_echo "#define HAVE_CRYPTOPP 1" >>confdefs.h
3538
+
3539
+
3540
+	CRYPTOPP_NAME=cryptopp
3541
+	ac_fn_cxx_check_header_mongrel "$LINENO" "crypto++/config.h" "ac_cv_header_cryptopp_config_h" "$ac_includes_default"
3542
+if test "x$ac_cv_header_cryptopp_config_h" = xyes; then :
3543
+  CRYPTOPP_NAME=crypto++
3544
+
3545
+fi
3546
+
3547
+
3548
+	ac_ext=c
3549
+ac_cpp='$CPP $CPPFLAGS'
3550
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3551
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3552
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
3553
+
3554
+
3555
+
3556
+
3557
+else
3558
+	$as_echo "#define HAVE_CRYPTOPP 0" >>confdefs.h
3559
+
3560
+fi
3561
+
3562
+
3563
+
3564
+ac_config_files="$ac_config_files Makefile"
3565
+
3566
+cat >confcache <<\_ACEOF
3567
+# This file is a shell script that caches the results of configure
3568
+# tests run on this system so they can be shared between configure
3569
+# scripts and configure runs, see configure's option --config-cache.
3570
+# It is not useful on other systems.  If it contains results you don't
3571
+# want to keep, you may remove or edit it.
3572
+#
3573
+# config.status only pays attention to the cache file if you give it
3574
+# the --recheck option to rerun configure.
3575
+#
3576
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
3577
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
3578
+# following values.
3579
+
3580
+_ACEOF
3581
+
3582
+# The following way of writing the cache mishandles newlines in values,
3583
+# but we know of no workaround that is simple, portable, and efficient.
3584
+# So, we kill variables containing newlines.
3585
+# Ultrix sh set writes to stderr and can't be redirected directly,
3586
+# and sets the high bit in the cache file unless we assign to the vars.
3587
+(
3588
+  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
3589
+    eval ac_val=\$$ac_var
3590
+    case $ac_val in #(
3591
+    *${as_nl}*)
3592
+      case $ac_var in #(
3593
+      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3594
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3595
+      esac
3596
+      case $ac_var in #(
3597
+      _ | IFS | as_nl) ;; #(
3598
+      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3599
+      *) { eval $ac_var=; unset $ac_var;} ;;
3600
+      esac ;;
3601
+    esac
3602
+  done
3603
+
3604
+  (set) 2>&1 |
3605
+    case $as_nl`(ac_space=' '; set) 2>&1` in #(
3606
+    *${as_nl}ac_space=\ *)
3607
+      # `set' does not quote correctly, so add quotes: double-quote
3608
+      # substitution turns \\\\ into \\, and sed turns \\ into \.
3609
+      sed -n \
3610
+	"s/'/'\\\\''/g;
3611
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
3612
+      ;; #(
3613
+    *)
3614
+      # `set' quotes correctly as required by POSIX, so do not add quotes.
3615
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3616
+      ;;
3617
+    esac |
3618
+    sort
3619
+) |
3620
+  sed '
3621
+     /^ac_cv_env_/b end
3622
+     t clear
3623
+     :clear
3624
+     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
3625
+     t end
3626
+     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
3627
+     :end' >>confcache
3628
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
3629
+  if test -w "$cache_file"; then
3630
+    if test "x$cache_file" != "x/dev/null"; then
3631
+      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
3632
+$as_echo "$as_me: updating cache $cache_file" >&6;}
3633
+      if test ! -f "$cache_file" || test -h "$cache_file"; then
3634
+	cat confcache >"$cache_file"
3635
+      else
3636
+        case $cache_file in #(
3637
+        */* | ?:*)
3638
+	  mv -f confcache "$cache_file"$$ &&
3639
+	  mv -f "$cache_file"$$ "$cache_file" ;; #(
3640
+        *)
3641
+	  mv -f confcache "$cache_file" ;;
3642
+	esac
3643
+      fi
3644
+    fi
3645
+  else
3646
+    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
3647
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
3648
+  fi
3649
+fi
3650
+rm -f confcache
3651
+
3652
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
3653
+# Let make expand exec_prefix.
3654
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3655
+
3656
+DEFS=-DHAVE_CONFIG_H
3657
+
3658
+ac_libobjs=
3659
+ac_ltlibobjs=
2651 3660
 U=
2652 3661
 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
2653 3662
   # 1. Remove the extension, and $U if already installed.
... ...
@@ -3854,5 +4863,3 @@ else
3854 4863
     { $as_echo "$as_me:${as_lineno-$LINENO}: PAM module installation directory: $PAM_MODULE_DIRECTORY" >&5
3855 4864
 $as_echo "$as_me: PAM module installation directory: $PAM_MODULE_DIRECTORY" >&6;}
3856 4865
 fi
3857
-
3858
-
... ...
@@ -12,6 +12,18 @@
12 12
 #include "generator.h"
13 13
 #include <iostream>
14 14
 
15
+#ifdef CRYPTOPP_NAME
16
+/// Prefixed with __ to avoid symbol conflicts with Cryptopp
17
+#define __CRYPTOPP_BASE32_H <CRYPTOPP_NAME/base32.h>
18
+#define __CRYPTOPP_HEX_H <cryptopp/hex.h>
19
+#define __CRYPTOPP_HMAC_H <cryptopp/hmac.h>
20
+#include __CRYPTOPP_BASE32_H
21
+#include __CRYPTOPP_HEX_H
22
+#include __CRYPTOPP_HMAC_H
23
+#else
24
+#error "CRYPTOPP_NAME not defined"
25
+#endif
26
+
15 27
 namespace {
16 28
 int ipow (int base, int exp)
17 29
 {