Revert "Merge branch 'upstream' into tizen"
[platform/upstream/nettle.git] / configure
index 4955f97..de720a6 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for nettle 3.2.
+# Generated by GNU Autoconf 2.69 for nettle 2.7.1.
 #
 # Report bugs to <nettle-bugs@lists.lysator.liu.se>.
 #
@@ -580,8 +580,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='nettle'
 PACKAGE_TARNAME='nettle'
-PACKAGE_VERSION='3.2'
-PACKAGE_STRING='nettle 3.2'
+PACKAGE_VERSION='2.7.1'
+PACKAGE_STRING='nettle 2.7.1'
 PACKAGE_BUGREPORT='nettle-bugs@lists.lysator.liu.se'
 PACKAGE_URL=''
 
@@ -623,18 +623,21 @@ ac_includes_default="\
 #endif"
 
 ac_subst_vars='LTLIBOBJS
-LIBOBJS
 BENCH_LIBS
 OPENSSL_LIBFLAGS
-IF_MINI_GMP
 IF_DLL
 IF_DOCUMENTATION
-IF_DLOPEN_TEST
-IF_NOT_SHARED
 IF_SHARED
 IF_STATIC
 IF_HOGWEED
 MAKEINFO
+GMP_NUMB_BITS
+LIBOBJS
+ALLOCA
+ALIGNOF_UINT64_T
+EGREP
+GREP
+CPP
 M4
 LIBHOGWEED_LIBS
 LIBHOGWEED_LINK
@@ -652,26 +655,18 @@ LIBNETTLE_SONAME
 LIBNETTLE_FORLINK
 LIBNETTLE_MINOR
 LIBNETTLE_MAJOR
+SHLIBCFLAGS
 EMULATOR
 W64_ABI
 ASM_ALIGN_LOG
 ASM_MARK_NOEXEC_STACK
 ASM_TYPE_PROGBITS
 ASM_TYPE_FUNCTION
-ASM_COFF_STYLE
 ASM_ELF_STYLE
 ASM_SYMBOL_PREFIX
+CCPIC_MAYBE
 CCPIC
-IF_ASM
-ASM_RODATA
-OPT_NETTLE_SOURCES
-OPT_HOGWEED_OBJS
-OPT_NETTLE_OBJS
-GMP_NUMB_BITS
-ALLOCA
-EGREP
-GREP
-CPP
+OPT_ASM_SOURCES
 DEP_PROCESS
 DEP_FLAGS
 DEP_INCLUDE
@@ -687,8 +682,6 @@ OBJDUMP
 NM
 RANLIB
 SET_MAKE
-EXTRA_HOGWEED_LINKER_FLAGS
-EXTRA_LINKER_FLAGS
 IF_CXX
 ac_ct_CXX
 CXXFLAGS
@@ -700,8 +693,6 @@ CPPFLAGS
 LDFLAGS
 CFLAGS
 CC
-HOGWEED_EXTRA_SYMBOLS
-NETTLE_USE_MINI_GMP
 host_os
 host_vendor
 host_cpu
@@ -710,8 +701,6 @@ build_os
 build_vendor
 build_cpu
 build
-MINOR_VERSION
-MAJOR_VERSION
 target_alias
 host_alias
 build_alias
@@ -763,11 +752,7 @@ enable_pic
 enable_openssl
 enable_gcov
 enable_documentation
-enable_fat
 enable_arm_neon
-enable_x86_aesni
-enable_mini_gmp
-enable_ld_version_script
 enable_dependency_tracking
 '
       ac_precious_vars='build_alias
@@ -1323,7 +1308,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures nettle 3.2 to adapt to many kinds of systems.
+\`configure' configures nettle 2.7.1 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1388,7 +1373,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of nettle 3.2:";;
+     short | recursive ) echo "Configuration of nettle 2.7.1:";;
    esac
   cat <<\_ACEOF
 
@@ -1406,13 +1391,7 @@ Optional Features:
   --enable-gcov           Instrument for gcov (requires a modern gcc)
   --disable-documentation Omit building and installing the documentation.
                           (default=auto)
-  --enable-fat            Enable fat library build (default=no)
   --enable-arm-neon       Enable ARM Neon assembly. (default=auto)
-  --enable-x86-aesni      Enable x86_64 aes instructions. (default=no)
-  --enable-mini-gmp       Enable mini-gmp, used instead of libgmp.
-  --enable-ld-version-script
-                          enable linker version script (default is enabled
-                          when possible)
   --disable-dependency-tracking
                           Disable dependency tracking. Dependency tracking
                           doesn't work with BSD make
@@ -1505,7 +1484,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-nettle configure 3.2
+nettle configure 2.7.1
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2033,6 +2012,52 @@ fi
 
 } # ac_fn_c_check_header_mongrel
 
+# ac_fn_c_try_link LINENO
+# -----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_link ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  rm -f conftest.$ac_objext conftest$ac_exeext
+  if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        test -x conftest$ac_exeext
+       }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_retval=1
+fi
+  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+  # interfere with the next link command; also delete a directory that is
+  # left behind by Apple's compiler.  We do this before executing the actions.
+  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_link
+
 # ac_fn_c_check_func LINENO FUNC VAR
 # ----------------------------------
 # Tests whether FUNC exists, setting the cache variable VAR accordingly
@@ -2103,7 +2128,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by nettle $as_me 3.2, which was
+It was created by nettle $as_me 2.7.1, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2487,16 +2512,11 @@ ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
 ac_config_headers="$ac_config_headers config.h"
 
 
-LIBNETTLE_MAJOR=6
-LIBNETTLE_MINOR=2
-
-LIBHOGWEED_MAJOR=4
-LIBHOGWEED_MINOR=2
-
-MAJOR_VERSION=`echo $PACKAGE_VERSION | sed 's/^\([^.]*\)\..*/\1/'`
-MINOR_VERSION=`echo $PACKAGE_VERSION | sed 's/^[^.]*\.\([0-9]*\).*/\1/'`
-
+LIBNETTLE_MAJOR=4
+LIBNETTLE_MINOR=7
 
+LIBHOGWEED_MAJOR=2
+LIBHOGWEED_MINOR=5
 
 # Make sure we can run config.sub.
 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
@@ -2661,14 +2681,6 @@ else
 fi
 
 
-# Check whether --enable-fat was given.
-if test "${enable_fat+set}" = set; then :
-  enableval=$enable_fat;
-else
-  enable_fat=no
-fi
-
-
 # Check whether --enable-arm-neon was given.
 if test "${enable_arm_neon+set}" = set; then :
   enableval=$enable_arm_neon;
@@ -2677,32 +2689,6 @@ else
 fi
 
 
-# Check whether --enable-x86-aesni was given.
-if test "${enable_x86_aesni+set}" = set; then :
-  enableval=$enable_x86_aesni;
-else
-  enable_x86_aesni=no
-fi
-
-
-# Check whether --enable-mini-gmp was given.
-if test "${enable_mini_gmp+set}" = set; then :
-  enableval=$enable_mini_gmp;
-else
-  enable_mini_gmp=no
-fi
-
-
-if test "x$enable_mini_gmp" = xyes ; then
-  NETTLE_USE_MINI_GMP=1
-  HOGWEED_EXTRA_SYMBOLS="mpz_*;gmp_*;mpn_*;"
-else
-  NETTLE_USE_MINI_GMP=0
-  HOGWEED_EXTRA_SYMBOLS=""
-fi
-
-
-
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -R flag" >&5
 $as_echo_n "checking for -R flag... " >&6; }
 RPATHFLAG=''
@@ -2717,7 +2703,7 @@ case "$host_os" in
       RPATHFLAG=-R
     fi
     ;;
-  linux*|freebsd*)     RPATHFLAG="-Wl,-rpath," ;;
+  linux*)              RPATHFLAG="-Wl,-rpath," ;;
   *)                   RPATHFLAG="" ;;
 esac
 
@@ -3564,106 +3550,6 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ifunc support" >&5
-$as_echo_n "checking for ifunc support... " >&6; }
-if ${nettle_cv_link_ifunc+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-
-# ac_fn_c_try_link LINENO
-# -----------------------
-# Try to link conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_link ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  rm -f conftest.$ac_objext conftest$ac_exeext
-  if { { ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_link") 2>conftest.err
-  ac_status=$?
-  if test -s conftest.err; then
-    grep -v '^ *+' conftest.err >conftest.er1
-    cat conftest.er1 >&5
-    mv -f conftest.er1 conftest.err
-  fi
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-        test "$cross_compiling" = yes ||
-        test -x conftest$ac_exeext
-       }; then :
-  ac_retval=0
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_retval=1
-fi
-  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
-  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
-  # interfere with the next link command; also delete a directory that is
-  # left behind by Apple's compiler.  We do this before executing the actions.
-  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
-  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-  as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_link
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-static int
-foo_imp(int x)
-{
-  return 1;
-}
-
-typedef void void_func (void);
-
-static void_func *
-foo_resolv(void)
-{
-  return (void_func *) foo_imp;
-}
-
-int foo (int x) __attribute__ ((ifunc("foo_resolv")));
-
-int
-main ()
-{
-
-  return foo(0);
-
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  nettle_cv_link_ifunc=yes
-else
-  nettle_cv_link_ifunc=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $nettle_cv_link_ifunc" >&5
-$as_echo "$nettle_cv_link_ifunc" >&6; }
-
-if test "x$nettle_cv_link_ifunc" = xyes ; then
-  $as_echo "#define HAVE_LINK_IFUNC 1" >>confdefs.h
-
-fi
-
-
 # When $CC foo.c -o foo creates both foo and foo.exe, autoconf picks
 # up the foo.exe and sets exeext to .exe. That is correct for cygwin,
 # which has some kind of magic link from foo to foo.exe, but not for
@@ -3971,82 +3857,6 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
-
-  # Check whether --enable-ld-version-script was given.
-if test "${enable_ld_version_script+set}" = set; then :
-  enableval=$enable_ld_version_script; have_ld_version_script=$enableval
-fi
-
-  if test -z "$have_ld_version_script"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if LD -Wl,--version-script works" >&5
-$as_echo_n "checking if LD -Wl,--version-script works... " >&6; }
-    save_LDFLAGS="$LDFLAGS"
-    LDFLAGS="$LDFLAGS -Wl,--version-script=conftest.map"
-    cat > conftest.map <<EOF
-foo
-EOF
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  accepts_syntax_errors=yes
-else
-  accepts_syntax_errors=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-    if test "$accepts_syntax_errors" = no; then
-      cat > conftest.map <<EOF
-VERS_1 {
-        global: sym;
-};
-
-VERS_2 {
-        global: sym;
-} VERS_1;
-EOF
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  have_ld_version_script=yes
-else
-  have_ld_version_script=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-    else
-      have_ld_version_script=no
-    fi
-    rm -f conftest.map
-    LDFLAGS="$save_LDFLAGS"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ld_version_script" >&5
-$as_echo "$have_ld_version_script" >&6; }
-  fi
-  if test "$have_ld_version_script" = "yes";then
-       EXTRA_LINKER_FLAGS="-Wl,--version-script=libnettle.map"
-
-       EXTRA_HOGWEED_LINKER_FLAGS="-Wl,--version-script=libhogweed.map"
-
-  fi
-
-
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
 set x ${MAKE-make}
@@ -4669,12 +4479,11 @@ else
   as_fn_error $? "Specified HOST_CC doesn't seem to work" "$LINENO" 5
 fi
 
+elif test $cross_compiling = no ; then
+  CC_FOR_BUILD="$CC"
 else
-  if test $cross_compiling = no ; then
-    CC_FOR_BUILD="$CC"
-  else
-    for i in gcc cc c89 c99; do
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system compiler $i" >&5
+  for i in cc gcc c89 c99; do
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system compiler $i" >&5
 $as_echo_n "checking build system compiler $i... " >&6; }
 # remove anything that might look like compiler output to our "||" expression
 rm -f conftest* a.out b.out a.exe a_out.exe
@@ -4701,18 +4510,14 @@ rm -f conftest* a.out b.out a.exe a_out.exe
 $as_echo "$cc_for_build_works" >&6; }
 if test "$cc_for_build_works" = yes; then
   CC_FOR_BUILD=$i
-         break
+       break
 else
   :
 fi
 
-    done
-    if test -z "$CC_FOR_BUILD"; then
-      as_fn_error $? "Cannot find a build system compiler" "$LINENO" 5
-    fi
-  fi
-  if test "$CC_FOR_BUILD" = gcc ; then
-    CC_FOR_BUILD="$CC_FOR_BUILD -O"
+  done
+  if test -z "$CC_FOR_BUILD"; then
+    as_fn_error $? "Cannot find a build system compiler" "$LINENO" 5
   fi
 fi
 
@@ -4811,1895 +4616,1863 @@ if test x$enable_dependency_tracking = xyes ; then
 
 fi
 
-if test "x$enable_gcov" = "xyes"; then
-  CFLAGS="$CFLAGS -ftest-coverage -fprofile-arcs"
-fi
+# Figure out ABI. Currently, configurable only by setting CFLAGS.
+ABI=standard
+
+case "$host_cpu" in
+  x86_64 | amd64)
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#if defined(__x86_64__) || defined(__arch64__)
+#error 64-bit x86
+#endif
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+      ABI=32
 
-# Checks for typedefs, structures, and compiler characteristics.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
-$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
-if ${ac_cv_c_const+:} false; then :
-  $as_echo_n "(cached) " >&6
 else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+      ABI=64
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    ;;
+  *sparc*)
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
+#if defined(__sparcv9) || defined(__arch64__)
+#error 64-bit sparc
+#endif
+
 int
 main ()
 {
 
-#ifndef __cplusplus
-  /* Ultrix mips cc rejects this sort of thing.  */
-  typedef int charset[2];
-  const charset cs = { 0, 0 };
-  /* SunOS 4.1.1 cc rejects this.  */
-  char const *const *pcpcc;
-  char **ppc;
-  /* NEC SVR4.0.2 mips cc rejects this.  */
-  struct point {int x, y;};
-  static struct point const zero = {0,0};
-  /* AIX XL C 1.02.0.0 rejects this.
-     It does not let you subtract one const X* pointer from another in
-     an arm of an if-expression whose if-part is not a constant
-     expression */
-  const char *g = "string";
-  pcpcc = &g + (g ? g-g : 0);
-  /* HPUX 7.0 cc rejects these. */
-  ++pcpcc;
-  ppc = (char**) pcpcc;
-  pcpcc = (char const *const *) ppc;
-  { /* SCO 3.2v4 cc rejects this sort of thing.  */
-    char tx;
-    char *t = &tx;
-    char const *s = 0 ? (char *) 0 : (char const *) 0;
-
-    *t++ = 0;
-    if (s) return 0;
-  }
-  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
-    int x[] = {25, 17};
-    const int *foo = &x[0];
-    ++foo;
-  }
-  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
-    typedef const int *iptr;
-    iptr p = 0;
-    ++p;
-  }
-  { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
-       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
-    struct s { int j; const int *ap[3]; } bx;
-    struct s *b = &bx; b->j = 5;
-  }
-  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
-    const int foo = 10;
-    if (!foo) return 0;
-  }
-  return !cs[0] && !zero.x;
-#endif
-
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_c_const=yes
-else
-  ac_cv_c_const=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
-$as_echo "$ac_cv_c_const" >&6; }
-if test $ac_cv_c_const = no; then
-
-$as_echo "#define const /**/" >>confdefs.h
 
-fi
+      ABI=32
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
-$as_echo_n "checking for inline... " >&6; }
-if ${ac_cv_c_inline+:} false; then :
-  $as_echo_n "(cached) " >&6
 else
-  ac_cv_c_inline=no
-for ac_kw in inline __inline__ __inline; do
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#ifndef __cplusplus
-typedef int foo_t;
-static $ac_kw foo_t static_foo () {return 0; }
-$ac_kw foo_t foo () {return 0; }
-#endif
 
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_c_inline=$ac_kw
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  test "$ac_cv_c_inline" != no && break
-done
+      ABI=64
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
-$as_echo "$ac_cv_c_inline" >&6; }
-
-case $ac_cv_c_inline in
-  inline | yes) ;;
-  *)
-    case $ac_cv_c_inline in
-      no) ac_val=;;
-      *) ac_val=$ac_cv_c_inline;;
-    esac
-    cat >>confdefs.h <<_ACEOF
-#ifndef __cplusplus
-#define inline $ac_val
-#endif
-_ACEOF
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     ;;
 esac
 
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
-$as_echo_n "checking how to run the C preprocessor... " >&6; }
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
-  CPP=
+if test "x$ABI" != xstandard ; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: Compiler uses $ABI-bit ABI. To change, set CC." >&5
+$as_echo "$as_me: Compiler uses $ABI-bit ABI. To change, set CC." >&6;}
+  if test "$libdir" = '${exec_prefix}/lib' ; then
+    # Try setting a better default
+    case "$host_cpu:$host_os:$ABI" in
+      *:solaris*:32|*:sunos*:32)
+       libdir='${exec_prefix}/lib'
+       ;;
+      *:solaris*:64|*:sunos*:64)
+       libdir='${exec_prefix}/lib/64'
+       ;;
+      # Linux conventions are a mess... According to the Linux File
+      # Hierarchy Standard, all architectures except IA64 puts 32-bit
+      # libraries in lib, and 64-bit in lib64. Some distributions,
+      # e.g., Fedora and Gentoo, adhere to this standard, while at
+      # least Debian has decided to put 64-bit libraries in lib and
+      # 32-bit libraries in lib32.
+
+      # We try to figure out the convention, except if we're cross
+      # compiling. We use lib${ABI} if /usr/lib${ABI} exists and
+      # appears to not be a symlink to a different name.
+      *:linux*:32|*:linux*:64)
+       if test "$cross_compiling" = yes ; then
+          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cross compiling for linux. Can't guess if libraries go in lib${ABI} or lib." >&5
+$as_echo "$as_me: WARNING: Cross compiling for linux. Can't guess if libraries go in lib${ABI} or lib." >&2;};         else
+         # The dash builtin pwd tries to be "helpful" and remember
+         # symlink names. Use -P option, and hope it's portable enough.
+         test -d /usr/lib${ABI} \
+           && (cd /usr/lib${ABI} && pwd -P | grep >/dev/null "/lib${ABI}"'$') \
+           && libdir='${exec_prefix}/'"lib${ABI}"
+       fi
+       ;;
+      # On freebsd, it seems 32-bit libraries are in lib32,
+      # and 64-bit in lib. Don't know about "kfreebsd", does
+      # it follow the Linux fhs conventions?
+      *:freebsd*:32)
+       libdir='${exec_prefix}/lib32'
+       ;;
+      *:freebsd*:64)
+       libdir='${exec_prefix}/lib'
+       ;;
+      *)
+        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Don't know where to install $ABI-bit libraries on this system." >&5
+$as_echo "$as_me: WARNING: Don't know where to install $ABI-bit libraries on this system." >&2;};
+    esac
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Libraries to be installed in $libdir." >&5
+$as_echo "$as_me: Libraries to be installed in $libdir." >&6;}
+  fi
 fi
-if test -z "$CPP"; then
-  if ${ac_cv_prog_CPP+:} false; then :
+
+# Select assembler code
+asm_path=
+if test "x$enable_assembler" = xyes ; then
+  case "$host_cpu" in
+    i?86* | k[5-8]* | pentium* | athlon)
+      asm_path=x86
+      ;;
+    x86_64 | amd64)
+      if test "$ABI" = 64 ; then
+       asm_path=x86_64
+      else
+       asm_path=x86
+      fi
+      ;;
+    *sparc*)
+      if test "$ABI" = 64 ; then
+       asm_path=sparc64
+      else
+       asm_path=sparc32
+      fi
+      ;;
+    armv6* | armv7*)
+      if test "$enable_arm_neon" = auto ; then
+  if test "$cross_compiling" = yes ; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if assembler accepts Neon instructions" >&5
+$as_echo_n "checking if assembler accepts Neon instructions... " >&6; }
+if ${nettle_cv_asm_arm_neon+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-      # Double quotes because CPP needs to be expanded
-    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
-    do
-      ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-                    Syntax error
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
+  cat >conftest.s <<EOF
 
-else
-  # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
+.text
+foo:
+       vmlal.u32       q1, d0, d1
 
-  # OK, works on sane cases.  Now check whether nonexistent headers
-  # can be detected and how.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <ac_nonexistent.h>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-  # Broken: success on invalid input.
-continue
+EOF
+gmp_assemble="$CC $CFLAGS $CPPFLAGS -c conftest.s >conftest.out 2>&1"
+if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5
+  (eval $gmp_assemble) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  cat conftest.out >&5
+  nettle_cv_asm_arm_neon=yes
 else
-  # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
-  break
+  cat conftest.out >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.s >&5
+  nettle_cv_asm_arm_neon=no
 fi
-
-    done
-    ac_cv_prog_CPP=$CPP
+rm -f conftest*
 
 fi
-  CPP=$ac_cv_prog_CPP
-else
-  ac_cv_prog_CPP=$CPP
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $nettle_cv_asm_arm_neon" >&5
+$as_echo "$nettle_cv_asm_arm_neon" >&6; }
+    enable_arm_neon="$nettle_cv_asm_arm_neon"
+  else
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if /proc/cpuinfo claims neon support" >&5
+$as_echo_n "checking if /proc/cpuinfo claims neon support... " >&6; }
+    if grep '^Features.*:.* neon' /proc/cpuinfo >/dev/null ; then
+      enable_arm_neon=yes
+    else
+      enable_arm_neon=no
+    fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_arm_neon" >&5
+$as_echo "$enable_arm_neon" >&6; }
+  fi
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
-$as_echo "$CPP" >&6; }
-ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-                    Syntax error
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
 
-else
-  # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
 
-  # OK, works on sane cases.  Now check whether nonexistent headers
-  # can be detected and how.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <ac_nonexistent.h>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-  # Broken: success on invalid input.
-continue
-else
-  # Passes both tests.
-ac_preproc_ok=:
-break
+      asm_path="arm/v6 arm"
+
+      if test "x$enable_arm_neon" = xyes ; then
+       asm_path="arm/neon $asm_path"
+      fi
+      ;;
+    arm*)
+      asm_path=arm
+      ;;
+    *)
+      enable_assembler=no
+      ;;
+  esac
 fi
-rm -f conftest.err conftest.i conftest.$ac_ext
 
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
+# Files which replace a C source file (or otherwise don't correspond
+# to a new object file).
+asm_replace_list="aes-encrypt-internal.asm aes-decrypt-internal.asm \
+               arcfour-crypt.asm camellia-crypt-internal.asm \
+               md5-compress.asm memxor.asm \
+               salsa20-crypt.asm salsa20-core-internal.asm \
+               serpent-encrypt.asm serpent-decrypt.asm \
+               sha1-compress.asm sha256-compress.asm sha512-compress.asm \
+               sha3-permute.asm umac-nh.asm umac-nh-n.asm machine.m4"
 
-else
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details" "$LINENO" 5; }
+# Assembler files which generate additional object files if they are used.
+asm_optional_list=""
+
+if test "x$enable_public_key" = "xyes" ; then
+  asm_optional_list="ecc-192-modp.asm ecc-224-modp.asm ecc-256-redc.asm \
+      ecc-384-modp.asm ecc-521-modp.asm"
 fi
 
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
+OPT_ASM_SOURCES=""
 
+asm_file_list=""
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
-$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
-if ${ac_cv_path_GREP+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -z "$GREP"; then
-  ac_path_GREP_found=false
-  # Loop through the user's path and test for each of PROGNAME-LIST
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_prog in grep ggrep; do
-    for ac_exec_ext in '' $ac_executable_extensions; do
-      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
-      as_fn_executable_p "$ac_path_GREP" || continue
-# Check for GNU ac_path_GREP and select it if it is found.
-  # Check for GNU $ac_path_GREP
-case `"$ac_path_GREP" --version 2>&1` in
-*GNU*)
-  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
-*)
-  ac_count=0
-  $as_echo_n 0123456789 >"conftest.in"
-  while :
-  do
-    cat "conftest.in" "conftest.in" >"conftest.tmp"
-    mv "conftest.tmp" "conftest.in"
-    cp "conftest.in" "conftest.nl"
-    $as_echo 'GREP' >> "conftest.nl"
-    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
-    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
-    as_fn_arith $ac_count + 1 && ac_count=$as_val
-    if test $ac_count -gt ${ac_path_GREP_max-0}; then
-      # Best one so far, save it but keep looking for a better one
-      ac_cv_path_GREP="$ac_path_GREP"
-      ac_path_GREP_max=$ac_count
-    fi
-    # 10*(2^10) chars as input seems more than enough
-    test $ac_count -gt 10 && break
-  done
-  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
+if test "x$enable_assembler" = xyes ; then
+  if test -n "$asm_path"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Looking for assembler files in $asm_path." >&5
+$as_echo "$as_me: Looking for assembler files in $asm_path." >&6;}
+    for tmp_f in $asm_replace_list ; do
+      for asm_dir in $asm_path ; do
+        if test -f "$srcdir/$asm_dir/$tmp_f"; then
+         asm_file_list="$asm_file_list $tmp_f"
+          ac_config_links="$ac_config_links $tmp_f:$asm_dir/$tmp_f"
 
-      $ac_path_GREP_found && break 3
+         break
+        fi
+      done
     done
-  done
-  done
-IFS=$as_save_IFS
-  if test -z "$ac_cv_path_GREP"; then
-    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+            for tmp_o in $asm_optional_list ; do
+      for asm_dir in $asm_path ; do
+       if test -f "$srcdir/$asm_dir/$tmp_o"; then
+         asm_file_list="$asm_file_list $tmp_o"
+         ac_config_links="$ac_config_links $tmp_o:$asm_dir/$tmp_o"
+
+         while read tmp_func ; do
+           cat >>confdefs.h <<_ACEOF
+#define HAVE_NATIVE_$tmp_func 1
+_ACEOF
+
+           eval HAVE_NATIVE_$tmp_func=yes
+         done <<EOF
+`sed -n 's/[^  ]*PROLOGUE(_*\(nettle_\)*\([^)]*\)).*$/\2/p' < "$srcdir/$asm_dir/$tmp_o"`
+EOF
+         OPT_ASM_SOURCES="$OPT_ASM_SOURCES $tmp_o"
+         break
+       fi
+      done
+    done
+    if test -z "$asm_file_list"; then
+      enable_assembler=no
+      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No assembler files found." >&5
+$as_echo "$as_me: WARNING: No assembler files found." >&2;}
+    fi
   fi
-else
-  ac_cv_path_GREP=$GREP
 fi
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
-$as_echo "$ac_cv_path_GREP" >&6; }
- GREP="$ac_cv_path_GREP"
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
-$as_echo_n "checking for egrep... " >&6; }
-if ${ac_cv_path_EGREP+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
-   then ac_cv_path_EGREP="$GREP -E"
-   else
-     if test -z "$EGREP"; then
-  ac_path_EGREP_found=false
-  # Loop through the user's path and test for each of PROGNAME-LIST
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_prog in egrep; do
-    for ac_exec_ext in '' $ac_executable_extensions; do
-      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
-      as_fn_executable_p "$ac_path_EGREP" || continue
-# Check for GNU ac_path_EGREP and select it if it is found.
-  # Check for GNU $ac_path_EGREP
-case `"$ac_path_EGREP" --version 2>&1` in
-*GNU*)
-  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
-*)
-  ac_count=0
-  $as_echo_n 0123456789 >"conftest.in"
-  while :
-  do
-    cat "conftest.in" "conftest.in" >"conftest.tmp"
-    mv "conftest.tmp" "conftest.in"
-    cp "conftest.in" "conftest.nl"
-    $as_echo 'EGREP' >> "conftest.nl"
-    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
-    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
-    as_fn_arith $ac_count + 1 && ac_count=$as_val
-    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
-      # Best one so far, save it but keep looking for a better one
-      ac_cv_path_EGREP="$ac_path_EGREP"
-      ac_path_EGREP_max=$ac_count
-    fi
-    # 10*(2^10) chars as input seems more than enough
-    test $ac_count -gt 10 && break
-  done
-  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
 
-      $ac_path_EGREP_found && break 3
-    done
-  done
-  done
-IFS=$as_save_IFS
-  if test -z "$ac_cv_path_EGREP"; then
-    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
-  fi
-else
-  ac_cv_path_EGREP=$EGREP
-fi
 
-   fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
-$as_echo "$ac_cv_path_EGREP" >&6; }
- EGREP="$ac_cv_path_EGREP"
+# Besides getting correct dependencies, the explicit rules also tell
+# make that the .s files "ought to exist", so they are preferred over
+# .c files.
+ac_config_commands="$ac_config_commands asm.d"
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
-$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
-if ${ac_cv_type_uid_t+:} false; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCPIC" >&5
+$as_echo_n "checking CCPIC... " >&6; }
+if ${lsh_cv_sys_ccpic+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/types.h>
 
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "uid_t" >/dev/null 2>&1; then :
-  ac_cv_type_uid_t=yes
-else
-  ac_cv_type_uid_t=no
-fi
-rm -f conftest*
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
-$as_echo "$ac_cv_type_uid_t" >&6; }
-if test $ac_cv_type_uid_t = no; then
-
-$as_echo "#define uid_t int" >>confdefs.h
-
-
-$as_echo "#define gid_t int" >>confdefs.h
-
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
-$as_echo_n "checking for ANSI C header files... " >&6; }
-if ${ac_cv_header_stdc+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+  if test -z "$CCPIC" ; then
+    if test "$GCC" = yes ; then
+      case "$host_os" in
+       bsdi4.*)        CCPIC="-fPIC" ;;
+       bsdi*)          CCPIC="" ;;
+       darwin*)        CCPIC="-fPIC" ;;
+       # Could also use -fpic, depending on the number of symbol references
+       solaris*)       CCPIC="-fPIC" ;;
+       cygwin*)        CCPIC="" ;;
+       mingw32*)       CCPIC="" ;;
+       *)              CCPIC="-fpic" ;;
+      esac
+    else
+      case "$host_os" in
+       darwin*)        CCPIC="-fPIC" ;;
+        irix*)         CCPIC="-share" ;;
+       hpux*)          CCPIC="+z"; ;;
+       *freebsd*)      CCPIC="-fpic" ;;
+       sco*|sysv4.*)   CCPIC="-KPIC -dy -Bdynamic" ;;
+       solaris*)       CCPIC="-KPIC -Bdynamic" ;;
+       winnt*)         CCPIC="-shared" ;;
+       *)              CCPIC="" ;;
+      esac
+    fi
+  fi
+  OLD_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS $CCPIC"
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
 
 int
 main ()
 {
-
+exit(0);
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_header_stdc=yes
+  lsh_cv_sys_ccpic="$CCPIC"
 else
-  ac_cv_header_stdc=no
+  lsh_cv_sys_ccpic=''
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  CFLAGS="$OLD_CFLAGS"
 
-if test $ac_cv_header_stdc = yes; then
-  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <string.h>
+fi
 
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "memchr" >/dev/null 2>&1; then :
+CCPIC="$lsh_cv_sys_ccpic"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCPIC" >&5
+$as_echo "$CCPIC" >&6; }
 
-else
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
 
-fi
+SHLIBCFLAGS="$CCPIC"
 
-if test $ac_cv_header_stdc = yes; then
-  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdlib.h>
+IF_DLL='#'
+LIBNETTLE_FILE_SRC='$(LIBNETTLE_FORLINK)'
+LIBHOGWEED_FILE_SRC='$(LIBHOGWEED_FORLINK)'
+EMULATOR=''
+W64_ABI=no
 
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "free" >/dev/null 2>&1; then :
+case "$host_os" in
+  mingw32*|cygwin*)
+    # The actual DLLs, e.g. libnettle-$major-$minor.dll, are normally
+    # installed into the bin dir (or more exactly $libdir/../bin, for
+    # automake), while libnettle.dll.a, which is a stub file for
+    # linking to the DLL, is installed into the lib dir.
+    case "$host_os" in
+      mingw32*)
+        LIBNETTLE_FORLINK='libnettle-$(LIBNETTLE_MAJOR)-$(LIBNETTLE_MINOR).dll'
+        LIBHOGWEED_FORLINK='libhogweed-$(LIBHOGWEED_MAJOR)-$(LIBHOGWEED_MINOR).dll'
+        ;;
+      cygwin*)
+        LIBNETTLE_FORLINK='cygnettle-$(LIBNETTLE_MAJOR)-$(LIBNETTLE_MINOR).dll'
+        LIBHOGWEED_FORLINK='cyghogweed-$(LIBHOGWEED_MAJOR)-$(LIBHOGWEED_MINOR).dll'
+        ;;
+    esac
+    if test "x$cross_compiling" = xyes ; then
+       case "$ABI" in
+           64)
+               EMULATOR=wine64
+               ;;
+           *)
+               EMULATOR=wine
+               ;;
+       esac
+    fi
+    if test "x$ABI" = x64 ; then
+        W64_ABI=yes
+    fi
+    LIBNETTLE_SONAME=''
+    LIBNETTLE_FILE='libnettle.dll.a'
+    LIBNETTLE_FILE_SRC='$(LIBNETTLE_FILE)'
+    LIBNETTLE_LINK='$(CC) $(CFLAGS) $(LDFLAGS) -shared -Wl,--out-implib=$(LIBNETTLE_FILE) -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--whole-archive'
+    LIBNETTLE_LIBS='-Wl,--no-whole-archive $(LIBS)'
+
+    LIBHOGWEED_SONAME=''
+    LIBHOGWEED_FILE='libhogweed.dll.a'
+    LIBHOGWEED_FILE_SRC='$(LIBHOGWEED_FILE)'
+    LIBHOGWEED_LINK='$(CC) $(CFLAGS) $(LDFLAGS) -shared -Wl,--out-implib=$(LIBHOGWEED_FILE) -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--whole-archive'
+    LIBHOGWEED_LIBS='-Wl,--no-whole-archive $(LIBS) libnettle.dll.a'
+    IF_DLL=''
+    ;;
+  darwin*)
+    LIBNETTLE_FORLINK=libnettle.dylib
+    LIBNETTLE_SONAME='libnettle.$(LIBNETTLE_MAJOR).dylib'
+    LIBNETTLE_FILE='libnettle.$(LIBNETTLE_MAJOR).$(LIBNETTLE_MINOR).dylib'
+    LIBNETTLE_LINK='$(CC) $(CFLAGS) -dynamiclib $(LDFLAGS) -install_name ${libdir}/$(LIBNETTLE_SONAME) -compatibility_version $(LIBNETTLE_MAJOR) -current_version $(LIBNETTLE_MAJOR).$(LIBNETTLE_MINOR)'
+    LIBNETTLE_LIBS=''
+
+    LIBHOGWEED_FORLINK=libhogweed.dylib
+    LIBHOGWEED_SONAME='libhogweed.$(LIBHOGWEED_MAJOR).dylib'
+    LIBHOGWEED_FILE='libhogweed.$(LIBHOGWEED_MAJOR).$(LIBHOGWEED_MINOR).dylib'
+    LIBHOGWEED_LINK='$(CC) $(CFLAGS) -dynamiclib -L. $(LDFLAGS) -install_name ${libdir}/$(LIBHOGWEED_SONAME) -compatibility_version $(LIBHOGWEED_MAJOR) -current_version $(LIBHOGWEED_MAJOR).$(LIBHOGWEED_MINOR)'
+    LIBHOGWEED_LIBS='-lnettle -lgmp'
+    ;;
+  solaris*)
+    # Sun's ld uses -h to set the soname, and this option is passed
+    # through by both Sun's compiler and gcc. Might not work with GNU
+    # ld, but it's unusual to use GNU ld on Solaris.
+    LIBNETTLE_FORLINK=libnettle.so
+    LIBNETTLE_SONAME='$(LIBNETTLE_FORLINK).$(LIBNETTLE_MAJOR)'
+    LIBNETTLE_FILE='$(LIBNETTLE_SONAME).$(LIBNETTLE_MINOR)'
+    LIBNETTLE_LINK='$(CC) $(CFLAGS) $(LDFLAGS) -G -h $(LIBNETTLE_SONAME)'
+    LIBNETTLE_LIBS=''
+
+    LIBHOGWEED_FORLINK=libhogweed.so
+    LIBHOGWEED_SONAME='$(LIBHOGWEED_FORLINK).$(LIBHOGWEED_MAJOR)'
+    LIBHOGWEED_FILE='$(LIBHOGWEED_SONAME).$(LIBHOGWEED_MINOR)'
+    LIBHOGWEED_LINK='$(CC) $(CFLAGS) $(LDFLAGS) -L. -G -h $(LIBHOGWEED_SONAME)'
+    LIBHOGWEED_LIBS='-lnettle -lgmp'
+    ;;
+  *)
+    LIBNETTLE_FORLINK=libnettle.so
+    LIBNETTLE_SONAME='$(LIBNETTLE_FORLINK).$(LIBNETTLE_MAJOR)'
+    LIBNETTLE_FILE='$(LIBNETTLE_SONAME).$(LIBNETTLE_MINOR)'
+    LIBNETTLE_LINK='$(CC) $(CFLAGS) $(LDFLAGS) -shared -Wl,-soname=$(LIBNETTLE_SONAME)'
+    LIBNETTLE_LIBS=''
+
+    LIBHOGWEED_FORLINK=libhogweed.so
+    LIBHOGWEED_SONAME='$(LIBHOGWEED_FORLINK).$(LIBHOGWEED_MAJOR)'
+    LIBHOGWEED_FILE='$(LIBHOGWEED_SONAME).$(LIBHOGWEED_MINOR)'
+    LIBHOGWEED_LINK='$(CC) $(CFLAGS) $(LDFLAGS) -L. -shared -Wl,-soname=$(LIBHOGWEED_SONAME)'
+    # Requested by debian, to make linking with only -lhogweed work
+    # (does not work in general, e.g., with static linking all of
+    # -lhogweed -lgmp -lnettle are still required). Also makes dlopen
+    # of libhogweed.so work, without having to use RTLD_GLOBAL.
+    # Depends on -L. above, to locate nettle.so.
+    LIBHOGWEED_LIBS='-lnettle -lgmp'
+    ;;
+esac
 
+if test "x$enable_pic" = xyes; then
+  CCPIC_MAYBE="$CCPIC"
 else
-  ac_cv_header_stdc=no
+  CCPIC_MAYBE=''
 fi
-rm -f conftest*
 
-fi
 
-if test $ac_cv_header_stdc = yes; then
-  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-  if test "$cross_compiling" = yes; then :
-  :
+ASM_SYMBOL_PREFIX=''
+ASM_ELF_STYLE='no'
+# GNU as default is to use @
+ASM_TYPE_FUNCTION='@function'
+ASM_TYPE_PROGBITS='@progbits'
+ASM_MARK_NOEXEC_STACK=''
+ASM_ALIGN_LOG=''
+
+if test x$enable_assembler = xyes ; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if globals are prefixed by underscore" >&5
+$as_echo_n "checking if globals are prefixed by underscore... " >&6; }
+if ${nettle_cv_asm_underscore+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+   # Default is no underscore
+    nettle_cv_asm_underscore=no
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <ctype.h>
-#include <stdlib.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
-                  (('a' <= (c) && (c) <= 'i') \
-                    || ('j' <= (c) && (c) <= 'r') \
-                    || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
-
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int
-main ()
-{
-  int i;
-  for (i = 0; i < 256; i++)
-    if (XOR (islower (i), ISLOWER (i))
-       || toupper (i) != TOUPPER (i))
-      return 2;
-  return 0;
-}
+int a_global_symbol;
 _ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-
+if ac_fn_c_try_compile "$LINENO"; then :
+   $NM conftest.$OBJEXT >conftest.out
+        if grep _a_global_symbol conftest.out >/dev/null ; then
+          nettle_cv_asm_underscore=yes
+        elif grep a_global_symbol conftest.out >/dev/null ; then
+          nettle_cv_asm_underscore=no
+        else
+          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: nm doesn't list a_global_symbol at all" >&5
+$as_echo "$as_me: WARNING: nm doesn't list a_global_symbol at all" >&2;}
+       fi
 else
-  ac_cv_header_stdc=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: test program with a single global could not be compiled!?" >&5
+$as_echo "$as_me: WARNING: test program with a single global could not be compiled!?" >&2;}
 fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
-$as_echo "$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $nettle_cv_asm_underscore" >&5
+$as_echo "$nettle_cv_asm_underscore" >&6; }
+  if test x$nettle_cv_asm_underscore = xyes ; then
+    ASM_SYMBOL_PREFIX='_'
+  fi
 
-$as_echo "#define STDC_HEADERS 1" >>confdefs.h
-
-fi
-
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
-                 inttypes.h stdint.h unistd.h
-do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
-"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF-style .type,%function pseudo-ops" >&5
+$as_echo_n "checking for ELF-style .type,%function pseudo-ops... " >&6; }
+if ${nettle_cv_asm_type_percent_function+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.s <<EOF
 
+.text
+.globl foo
+.type foo,%function
+foo:
+.Lend:
 
-ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
-if test "x$ac_cv_type_size_t" = xyes; then :
+.size foo, .Lend - foo
 
+EOF
+gmp_assemble="$CC $CFLAGS $CPPFLAGS -c conftest.s >conftest.out 2>&1"
+if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5
+  (eval $gmp_assemble) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  cat conftest.out >&5
+  nettle_cv_asm_type_percent_function=yes
 else
-
-cat >>confdefs.h <<_ACEOF
-#define size_t unsigned int
-_ACEOF
+  cat conftest.out >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.s >&5
+  nettle_cv_asm_type_percent_function=no
+fi
+rm -f conftest*
 
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $nettle_cv_asm_type_percent_function" >&5
+$as_echo "$nettle_cv_asm_type_percent_function" >&6; }
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
-$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
-if ${ac_cv_header_time+:} false; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF-style .type,#function pseudo-ops" >&5
+$as_echo_n "checking for ELF-style .type,#function pseudo-ops... " >&6; }
+if ${nettle_cv_asm_type_hash_function+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/types.h>
-#include <sys/time.h>
-#include <time.h>
+  cat >conftest.s <<EOF
 
-int
-main ()
-{
-if ((struct tm *) 0)
-return 0;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_header_time=yes
+.text
+.globl foo
+.type foo,#function
+foo:
+.Lend:
+
+.size foo, .Lend - foo
+
+EOF
+gmp_assemble="$CC $CFLAGS $CPPFLAGS -c conftest.s >conftest.out 2>&1"
+if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5
+  (eval $gmp_assemble) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  cat conftest.out >&5
+  nettle_cv_asm_type_hash_function=yes
 else
-  ac_cv_header_time=no
+  cat conftest.out >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.s >&5
+  nettle_cv_asm_type_hash_function=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f conftest*
+
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
-$as_echo "$ac_cv_header_time" >&6; }
-if test $ac_cv_header_time = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $nettle_cv_asm_type_hash_function" >&5
+$as_echo "$nettle_cv_asm_type_hash_function" >&6; }
 
-$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
+  if test x$nettle_cv_asm_type_percent_function = xyes ; then
+    ASM_ELF_STYLE='yes'
+    ASM_TYPE_FUNCTION='%function'
+    ASM_TYPE_PROGBITS='%progbits'
+  else
+    if test x$nettle_cv_asm_type_hash_function = xyes ; then
+      ASM_ELF_STYLE='yes'
+      ASM_TYPE_FUNCTION='#function'
+      ASM_TYPE_PROGBITS='#progbits'
+    fi
+  fi
 
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should use a .note.GNU-stack section" >&5
+$as_echo_n "checking if we should use a .note.GNU-stack section... " >&6; }
+if ${nettle_cv_asm_gnu_stack+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+   # Default
+    nettle_cv_asm_gnu_stack=no
+
+    cat >conftest.c <<EOF
+int foo() { return 0; }
+EOF
+    nettle_compile="$CC $CFLAGS $CPPFLAGS -c conftest.c >conftest.out 2>&1"
+    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$nettle_compile\""; } >&5
+  (eval $nettle_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+      cat conftest.out >&5
+      $OBJDUMP -x conftest.o | grep '\.note\.GNU-stack' > /dev/null \
+      && nettle_cv_asm_gnu_stack=yes
+    else
+      cat conftest.out >&5
+      echo "configure: failed program was:" >&5
+      cat conftest.s >&5
+    fi
+    rm -f conftest.*
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $nettle_cv_asm_gnu_stack" >&5
+$as_echo "$nettle_cv_asm_gnu_stack" >&6; }
+  if test x$nettle_cv_asm_gnu_stack = xyes ; then
+    ASM_MARK_NOEXEC_STACK='.section .note.GNU-stack,"",TYPE_PROGBITS'
+  fi
 
-# The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
-$as_echo_n "checking size of long... " >&6; }
-if ${ac_cv_sizeof_long+:} false; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if .align assembly directive is logarithmic" >&5
+$as_echo_n "checking if .align assembly directive is logarithmic... " >&6; }
+if ${nettle_cv_asm_align_log+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
+  cat >conftest.s <<EOF
+
+.align 3
 
+EOF
+gmp_assemble="$CC $CFLAGS $CPPFLAGS -c conftest.s >conftest.out 2>&1"
+if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5
+  (eval $gmp_assemble) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  cat conftest.out >&5
+  nettle_cv_asm_align_log=yes
 else
-  if test "$ac_cv_type_long" = yes; then
-     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "cannot compute sizeof (long)
-See \`config.log' for more details" "$LINENO" 5; }
-   else
-     ac_cv_sizeof_long=0
-   fi
+  cat conftest.out >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.s >&5
+  nettle_cv_asm_align_log=no
 fi
+rm -f conftest*
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
-$as_echo "$ac_cv_sizeof_long" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $nettle_cv_asm_align_log" >&5
+$as_echo "$nettle_cv_asm_align_log" >&6; }
+  ASM_ALIGN_LOG="$nettle_cv_asm_align_log"
+fi
 
 
 
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_LONG $ac_cv_sizeof_long
-_ACEOF
 
 
-# The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
-$as_echo_n "checking size of size_t... " >&6; }
-if ${ac_cv_sizeof_size_t+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t"        "$ac_includes_default"; then :
 
-else
-  if test "$ac_cv_type_size_t" = yes; then
-     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "cannot compute sizeof (size_t)
-See \`config.log' for more details" "$LINENO" 5; }
-   else
-     ac_cv_sizeof_size_t=0
-   fi
-fi
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
-$as_echo "$ac_cv_sizeof_size_t" >&6; }
 
 
 
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
-_ACEOF
 
 
 
-for ac_header in openssl/blowfish.h openssl/des.h openssl/cast.h openssl/aes.h openssl/ecdsa.h
-do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
 
-else
-  enable_openssl=no
- break
-fi
 
-done
 
 
-# For use by the testsuite
-for ac_header in valgrind/memcheck.h
-do :
-  ac_fn_c_check_header_mongrel "$LINENO" "valgrind/memcheck.h" "ac_cv_header_valgrind_memcheck_h" "$ac_includes_default"
-if test "x$ac_cv_header_valgrind_memcheck_h" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_VALGRIND_MEMCHECK_H 1
-_ACEOF
 
-fi
 
-done
 
-for ac_header in dlfcn.h
-do :
-  ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
-if test "x$ac_cv_header_dlfcn_h" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_DLFCN_H 1
-_ACEOF
 
-fi
 
-done
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
-$as_echo_n "checking for dlopen in -ldl... " >&6; }
-if ${ac_cv_lib_dl_dlopen+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldl  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dlopen ();
-int
-main ()
-{
-return dlopen ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_dl_dlopen=yes
-else
-  ac_cv_lib_dl_dlopen=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
-$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
-if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
 
-$as_echo "#define HAVE_LIBDL 1" >>confdefs.h
 
-fi
 
 
-# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
-# for constant arguments.  Useless!
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
-$as_echo_n "checking for working alloca.h... " >&6; }
-if ${ac_cv_working_alloca_h+:} false; then :
+
+
+# Extract the first word of "m4", so it can be a program name with args.
+set dummy m4; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_M4+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <alloca.h>
-int
-main ()
-{
-char *p = (char *) alloca (2 * sizeof (int));
-                         if (p) return 0;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_working_alloca_h=yes
-else
-  ac_cv_working_alloca_h=no
+  case $M4 in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_M4="$M4" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_M4="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  test -z "$ac_cv_path_M4" && ac_cv_path_M4="m4"
+  ;;
+esac
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
+M4=$ac_cv_path_M4
+if test -n "$M4"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $M4" >&5
+$as_echo "$M4" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
-$as_echo "$ac_cv_working_alloca_h" >&6; }
-if test $ac_cv_working_alloca_h = yes; then
 
-$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
 
+
+if test "x$enable_gcov" = "xyes"; then
+  CFLAGS="$CFLAGS -ftest-coverage -fprofile-arcs"
 fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
-$as_echo_n "checking for alloca... " >&6; }
-if ${ac_cv_func_alloca_works+:} false; then :
+# Checks for typedefs, structures, and compiler characteristics.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
+$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
+if ${ac_cv_c_const+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#ifdef __GNUC__
-# define alloca __builtin_alloca
-#else
-# ifdef _MSC_VER
-#  include <malloc.h>
-#  define alloca _alloca
-# else
-#  ifdef HAVE_ALLOCA_H
-#   include <alloca.h>
-#  else
-#   ifdef _AIX
- #pragma alloca
-#   else
-#    ifndef alloca /* predefined by HP cc +Olibcalls */
-void *alloca (size_t);
-#    endif
-#   endif
-#  endif
-# endif
-#endif
 
 int
 main ()
 {
-char *p = (char *) alloca (1);
-                                   if (p) return 0;
+
+#ifndef __cplusplus
+  /* Ultrix mips cc rejects this sort of thing.  */
+  typedef int charset[2];
+  const charset cs = { 0, 0 };
+  /* SunOS 4.1.1 cc rejects this.  */
+  char const *const *pcpcc;
+  char **ppc;
+  /* NEC SVR4.0.2 mips cc rejects this.  */
+  struct point {int x, y;};
+  static struct point const zero = {0,0};
+  /* AIX XL C 1.02.0.0 rejects this.
+     It does not let you subtract one const X* pointer from another in
+     an arm of an if-expression whose if-part is not a constant
+     expression */
+  const char *g = "string";
+  pcpcc = &g + (g ? g-g : 0);
+  /* HPUX 7.0 cc rejects these. */
+  ++pcpcc;
+  ppc = (char**) pcpcc;
+  pcpcc = (char const *const *) ppc;
+  { /* SCO 3.2v4 cc rejects this sort of thing.  */
+    char tx;
+    char *t = &tx;
+    char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+    *t++ = 0;
+    if (s) return 0;
+  }
+  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
+    int x[] = {25, 17};
+    const int *foo = &x[0];
+    ++foo;
+  }
+  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+    typedef const int *iptr;
+    iptr p = 0;
+    ++p;
+  }
+  { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
+       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+    struct s { int j; const int *ap[3]; } bx;
+    struct s *b = &bx; b->j = 5;
+  }
+  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+    const int foo = 10;
+    if (!foo) return 0;
+  }
+  return !cs[0] && !zero.x;
+#endif
+
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_func_alloca_works=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_c_const=yes
 else
-  ac_cv_func_alloca_works=no
+  ac_cv_c_const=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
-$as_echo "$ac_cv_func_alloca_works" >&6; }
-
-if test $ac_cv_func_alloca_works = yes; then
-
-$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
-
-else
-  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
-# that cause trouble.  Some versions do not even contain alloca or
-# contain a buggy version.  If you still want to use their alloca,
-# use ar to extract alloca.o from them instead of compiling alloca.c.
-
-ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
+$as_echo "$ac_cv_c_const" >&6; }
+if test $ac_cv_c_const = no; then
 
-$as_echo "#define C_ALLOCA 1" >>confdefs.h
+$as_echo "#define const /**/" >>confdefs.h
 
+fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
-$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
-if ${ac_cv_os_cray+:} false; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
+$as_echo_n "checking for inline... " >&6; }
+if ${ac_cv_c_inline+:} false; then :
   $as_echo_n "(cached) " >&6
 else
+  ac_cv_c_inline=no
+for ac_kw in inline __inline__ __inline; do
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#if defined CRAY && ! defined CRAY2
-webecray
-#else
-wenotbecray
+#ifndef __cplusplus
+typedef int foo_t;
+static $ac_kw foo_t static_foo () {return 0; }
+$ac_kw foo_t foo () {return 0; }
 #endif
 
 _ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "webecray" >/dev/null 2>&1; then :
-  ac_cv_os_cray=yes
-else
-  ac_cv_os_cray=no
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_c_inline=$ac_kw
 fi
-rm -f conftest*
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  test "$ac_cv_c_inline" != no && break
+done
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
-$as_echo "$ac_cv_os_cray" >&6; }
-if test $ac_cv_os_cray = yes; then
-  for ac_func in _getb67 GETB67 getb67; do
-    as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
+$as_echo "$ac_cv_c_inline" >&6; }
 
-cat >>confdefs.h <<_ACEOF
-#define CRAY_STACKSEG_END $ac_func
+case $ac_cv_c_inline in
+  inline | yes) ;;
+  *)
+    case $ac_cv_c_inline in
+      no) ac_val=;;
+      *) ac_val=$ac_cv_c_inline;;
+    esac
+    cat >>confdefs.h <<_ACEOF
+#ifndef __cplusplus
+#define inline $ac_val
+#endif
 _ACEOF
+    ;;
+esac
 
-    break
-fi
-
-  done
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+  CPP=
 fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
-$as_echo_n "checking stack direction for C alloca... " >&6; }
-if ${ac_cv_c_stack_direction+:} false; then :
+if test -z "$CPP"; then
+  if ${ac_cv_prog_CPP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  if test "$cross_compiling" = yes; then :
-  ac_cv_c_stack_direction=0
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$ac_includes_default
-int
-find_stack_direction (int *addr, int depth)
-{
-  int dir, dummy = 0;
-  if (! addr)
-    addr = &dummy;
-  *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
-  dir = depth ? find_stack_direction (addr, depth - 1) : 0;
-  return dir + dummy;
-}
-
-int
-main (int argc, char **argv)
-{
-  return find_stack_direction (0, argc + !argv + 20) < 0;
-}
+      # Double quotes because CPP needs to be expanded
+    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+                    Syntax error
 _ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  ac_cv_c_stack_direction=1
+if ac_fn_c_try_cpp "$LINENO"; then :
+
 else
-  ac_cv_c_stack_direction=-1
+  # Broken: fails on valid input.
+continue
 fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  # Broken: success on invalid input.
+continue
+else
+  # Passes both tests.
+ac_preproc_ok=:
+break
 fi
+rm -f conftest.err conftest.i conftest.$ac_ext
 
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+  break
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
-$as_echo "$ac_cv_c_stack_direction" >&6; }
-cat >>confdefs.h <<_ACEOF
-#define STACK_DIRECTION $ac_cv_c_stack_direction
-_ACEOF
 
+    done
+    ac_cv_prog_CPP=$CPP
 
 fi
-
-for ac_header in malloc.h
-do :
-  ac_fn_c_check_header_mongrel "$LINENO" "malloc.h" "ac_cv_header_malloc_h" "$ac_includes_default"
-if test "x$ac_cv_header_malloc_h" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_MALLOC_H 1
+  CPP=$ac_cv_prog_CPP
+else
+  ac_cv_prog_CPP=$CPP
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+$as_echo "$CPP" >&6; }
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+                    Syntax error
 _ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
 
+else
+  # Broken: fails on valid input.
+continue
 fi
+rm -f conftest.err conftest.i conftest.$ac_ext
 
-done
-
-
-for ac_func in strerror
-do :
-  ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror"
-if test "x$ac_cv_func_strerror" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_STRERROR 1
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
 _ACEOF
-
+if ac_fn_c_try_cpp "$LINENO"; then :
+  # Broken: success on invalid input.
+continue
+else
+  # Passes both tests.
+ac_preproc_ok=:
+break
 fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
 done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
 
+else
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
+fi
 
-# getenv_secure is used for fat overrides,
-# getline is used in the testsuite
-for ac_func in secure_getenv getline
-do :
-  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-fi
-done
 
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
-$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
-if ${ac_cv_c_bigendian+:} false; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
+if ${ac_cv_path_GREP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  ac_cv_c_bigendian=unknown
-    # See if we're dealing with a universal compiler.
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#ifndef __APPLE_CC__
-              not a universal capable compiler
-            #endif
-            typedef int dummy;
+  if test -z "$GREP"; then
+  ac_path_GREP_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in grep ggrep; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+      as_fn_executable_p "$ac_path_GREP" || continue
+# Check for GNU ac_path_GREP and select it if it is found.
+  # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo 'GREP' >> "conftest.nl"
+    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
+    if test $ac_count -gt ${ac_path_GREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_GREP="$ac_path_GREP"
+      ac_path_GREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
 
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+      $ac_path_GREP_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_GREP"; then
+    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+  fi
+else
+  ac_cv_path_GREP=$GREP
+fi
 
-       # Check for potential -arch flags.  It is not universal unless
-       # there are at least two -arch flags with different values.
-       ac_arch=
-       ac_prev=
-       for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
-        if test -n "$ac_prev"; then
-          case $ac_word in
-            i?86 | x86_64 | ppc | ppc64)
-              if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
-                ac_arch=$ac_word
-              else
-                ac_cv_c_bigendian=universal
-                break
-              fi
-              ;;
-          esac
-          ac_prev=
-        elif test "x$ac_word" = "x-arch"; then
-          ac_prev=arch
-        fi
-       done
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-    if test $ac_cv_c_bigendian = unknown; then
-      # See if sys/param.h defines the BYTE_ORDER macro.
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/types.h>
-            #include <sys/param.h>
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+$as_echo "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
 
-int
-main ()
-{
-#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
-                    && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
-                    && LITTLE_ENDIAN)
-             bogus endian macros
-            #endif
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  # It does; now see whether it defined to BIG_ENDIAN or not.
-        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+$as_echo_n "checking for egrep... " >&6; }
+if ${ac_cv_path_EGREP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+   then ac_cv_path_EGREP="$GREP -E"
+   else
+     if test -z "$EGREP"; then
+  ac_path_EGREP_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in egrep; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+      as_fn_executable_p "$ac_path_EGREP" || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
+  # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo 'EGREP' >> "conftest.nl"
+    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
+    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_EGREP="$ac_path_EGREP"
+      ac_path_EGREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+      $ac_path_EGREP_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_EGREP"; then
+    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+  fi
+else
+  ac_cv_path_EGREP=$EGREP
+fi
+
+   fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+$as_echo "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
+$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
+if ${ac_cv_type_uid_t+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <sys/types.h>
-               #include <sys/param.h>
-
-int
-main ()
-{
-#if BYTE_ORDER != BIG_ENDIAN
-                not big endian
-               #endif
 
-  ;
-  return 0;
-}
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_c_bigendian=yes
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "uid_t" >/dev/null 2>&1; then :
+  ac_cv_type_uid_t=yes
 else
-  ac_cv_c_bigendian=no
+  ac_cv_type_uid_t=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f conftest*
+
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-    fi
-    if test $ac_cv_c_bigendian = unknown; then
-      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <limits.h>
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
+$as_echo "$ac_cv_type_uid_t" >&6; }
+if test $ac_cv_type_uid_t = no; then
 
-int
-main ()
-{
-#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
-             bogus endian macros
-            #endif
+$as_echo "#define uid_t int" >>confdefs.h
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  # It does; now see whether it defined to _BIG_ENDIAN or not.
-        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+$as_echo "#define gid_t int" >>confdefs.h
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if ${ac_cv_header_stdc+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <limits.h>
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
 
 int
 main ()
 {
-#ifndef _BIG_ENDIAN
-                not big endian
-               #endif
 
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_c_bigendian=yes
+  ac_cv_header_stdc=yes
 else
-  ac_cv_c_bigendian=no
+  ac_cv_header_stdc=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "memchr" >/dev/null 2>&1; then :
+
+else
+  ac_cv_header_stdc=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-    fi
-    if test $ac_cv_c_bigendian = unknown; then
-      # Compile a test program.
-      if test "$cross_compiling" = yes; then :
-  # Try to guess by grepping values from an object file.
-        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-short int ascii_mm[] =
-                 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
-               short int ascii_ii[] =
-                 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
-               int use_ascii (int i) {
-                 return ascii_mm[i] + ascii_ii[i];
-               }
-               short int ebcdic_ii[] =
-                 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
-               short int ebcdic_mm[] =
-                 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
-               int use_ebcdic (int i) {
-                 return ebcdic_mm[i] + ebcdic_ii[i];
-               }
-               extern int foo;
+#include <stdlib.h>
 
-int
-main ()
-{
-return use_ascii (foo) == use_ebcdic (foo);
-  ;
-  return 0;
-}
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
-             ac_cv_c_bigendian=yes
-           fi
-           if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
-             if test "$ac_cv_c_bigendian" = unknown; then
-               ac_cv_c_bigendian=no
-             else
-               # finding both strings is unlikely to happen, but who knows?
-               ac_cv_c_bigendian=unknown
-             fi
-           fi
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "free" >/dev/null 2>&1; then :
+
+else
+  ac_cv_header_stdc=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+  if test "$cross_compiling" = yes; then :
+  :
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-$ac_includes_default
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+                  (('a' <= (c) && (c) <= 'i') \
+                    || ('j' <= (c) && (c) <= 'r') \
+                    || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
 int
 main ()
 {
-
-            /* Are we little or big endian?  From Harbison&Steele.  */
-            union
-            {
-              long int l;
-              char c[sizeof (long int)];
-            } u;
-            u.l = 1;
-            return u.c[sizeof (long int) - 1] == 1;
-
-  ;
+  int i;
+  for (i = 0; i < 256; i++)
+    if (XOR (islower (i), ISLOWER (i))
+       || toupper (i) != TOUPPER (i))
+      return 2;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_run "$LINENO"; then :
-  ac_cv_c_bigendian=no
+
 else
-  ac_cv_c_bigendian=yes
+  ac_cv_header_stdc=no
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-    fi
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
-$as_echo "$ac_cv_c_bigendian" >&6; }
- case $ac_cv_c_bigendian in #(
-   yes)
-     $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
-;; #(
-   no)
-      ;; #(
-   universal)
-
-$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
 
-     ;; #(
-   *)
-     as_fn_error $? "unknown endianness
- presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
- esac
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
 
+fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__" >&5
-$as_echo_n "checking for __attribute__... " >&6; }
-if ${lsh_cv_c_attribute+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+                 inttypes.h stdint.h unistd.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
 
-#include <stdlib.h>
+fi
 
-static void foo(void) __attribute__ ((noreturn));
+done
 
-static void __attribute__ ((noreturn))
-foo(void)
-{
-  exit(1);
-}
 
-int
-main ()
-{
+ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
+if test "x$ac_cv_type_size_t" = xyes; then :
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  lsh_cv_c_attribute=yes
 else
-  lsh_cv_c_attribute=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lsh_cv_c_attribute" >&5
-$as_echo "$lsh_cv_c_attribute" >&6; }
-
 
-if test "x$lsh_cv_c_attribute" = "xyes"; then
-  $as_echo "#define HAVE_GCC_ATTRIBUTE 1" >>confdefs.h
+cat >>confdefs.h <<_ACEOF
+#define size_t unsigned int
+_ACEOF
 
 fi
 
-
-
-# According to Simon Josefsson, looking for uint32_t and friends in
-# sys/types.h is needed on some systems, in particular cygwin.
-# ------ AX CREATE STDINT H -------------------------------------
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint types" >&5
-$as_echo_n "checking for stdint types... " >&6; }
-ac_stdint_h=`echo nettle-stdint.h`
-# try to shortcircuit - if the default include path of the compiler
-# can find a "stdint.h" header then we assume that all compilers can.
-if ${ac_cv_header_stdint_t+:} false; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
+$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
+if ${ac_cv_header_time+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-
-old_CXXFLAGS="$CXXFLAGS" ; CXXFLAGS=""
-old_CPPFLAGS="$CPPFLAGS" ; CPPFLAGS=""
-old_CFLAGS="$CFLAGS"     ; CFLAGS=""
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <stdint.h>
+#include <sys/types.h>
+#include <sys/time.h>
+#include <time.h>
+
 int
 main ()
 {
-int_least32_t v = 0;
+if ((struct tm *) 0)
+return 0;
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_stdint_result="(assuming C99 compatible system)"
- ac_cv_header_stdint_t="stdint.h";
+  ac_cv_header_time=yes
 else
-  ac_cv_header_stdint_t=""
+  ac_cv_header_time=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-CXXFLAGS="$old_CXXFLAGS"
-CPPFLAGS="$old_CPPFLAGS"
-CFLAGS="$old_CFLAGS"
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
+$as_echo "$ac_cv_header_time" >&6; }
+if test $ac_cv_header_time = yes; then
 
+$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
 
-v="... $ac_cv_header_stdint_h"
-if test "$ac_stdint_h" = "stdint.h" ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: (are you sure you want them in ./stdint.h?)" >&5
-$as_echo "(are you sure you want them in ./stdint.h?)" >&6; }
-elif test "$ac_stdint_h" = "inttypes.h" ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: (are you sure you want them in ./inttypes.h?)" >&5
-$as_echo "(are you sure you want them in ./inttypes.h?)" >&6; }
-elif test "_$ac_cv_header_stdint_t" = "_" ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: (putting them into $ac_stdint_h)$v" >&5
-$as_echo "(putting them into $ac_stdint_h)$v" >&6; }
-else
- ac_cv_header_stdint="$ac_cv_header_stdint_t"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdint (shortcircuit)" >&5
-$as_echo "$ac_cv_header_stdint (shortcircuit)" >&6; }
 fi
 
-if test "_$ac_cv_header_stdint_t" = "_" ; then # can not shortcircuit..
-
-
-inttype_headers=`echo sys/types.h | sed -e 's/,/ /g'`
-
-ac_cv_stdint_result="(no helpful system typedefs seen)"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint uintptr_t" >&5
-$as_echo_n "checking for stdint uintptr_t... " >&6; }
-if ${ac_cv_header_stdint_x+:} false; then :
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
+$as_echo_n "checking size of long... " >&6; }
+if ${ac_cv_sizeof_long+:} false; then :
   $as_echo_n "(cached) " >&6
 else
+  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
 
- ac_cv_header_stdint_x="" # the 1997 typedefs (inttypes.h)
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: (..)" >&5
-$as_echo "(..)" >&6; }
-  for i in stdint.h inttypes.h sys/inttypes.h $inttype_headers ; do
-   unset ac_cv_type_uintptr_t
-   unset ac_cv_type_uint64_t
-   ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#include <$i>
-"
-if test "x$ac_cv_type_uintptr_t" = xyes; then :
-  ac_cv_header_stdint_x=$i
 else
-       continue
+  if test "$ac_cv_type_long" = yes; then
+     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (long)
+See \`config.log' for more details" "$LINENO" 5; }
+   else
+     ac_cv_sizeof_long=0
+   fi
 fi
 
-   ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "#include<$i>
-"
-if test "x$ac_cv_type_uint64_t" = xyes; then :
-  and64="/uint64_t"
-else
-  and64=""
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
+$as_echo "$ac_cv_sizeof_long" >&6; }
 
-   ac_cv_stdint_result="(seen uintptr_t$and64 in $i)"
-   break;
-  done
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint uintptr_t" >&5
-$as_echo_n "checking for stdint uintptr_t... " >&6; }
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdint_x" >&5
-$as_echo "$ac_cv_header_stdint_x" >&6; }
 
-if test "_$ac_cv_header_stdint_x" = "_" ; then
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint uint32_t" >&5
-$as_echo_n "checking for stdint uint32_t... " >&6; }
-if ${ac_cv_header_stdint_o+:} false; then :
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_LONG $ac_cv_sizeof_long
+_ACEOF
+
+
+# The cast to long int works around a bug in the HP C Compiler,
+# see AC_CHECK_SIZEOF for more information.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of uint64_t" >&5
+$as_echo_n "checking alignment of uint64_t... " >&6; }
+if ${ac_cv_alignof_uint64_t+:} false; then :
   $as_echo_n "(cached) " >&6
 else
+  if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_uint64_t"        "$ac_includes_default
+#ifndef offsetof
+# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
+#endif
+typedef struct { char x; uint64_t y; } ac__type_alignof_;"; then :
 
- ac_cv_header_stdint_o="" # the 1995 typedefs (sys/inttypes.h)
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: (..)" >&5
-$as_echo "(..)" >&6; }
-  for i in inttypes.h sys/inttypes.h stdint.h $inttype_headers ; do
-   unset ac_cv_type_uint32_t
-   unset ac_cv_type_uint64_t
-   ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "#include <$i>
-"
-if test "x$ac_cv_type_uint32_t" = xyes; then :
-  ac_cv_header_stdint_o=$i
 else
-       continue
+  if test "$ac_cv_type_uint64_t" = yes; then
+     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute alignment of uint64_t
+See \`config.log' for more details" "$LINENO" 5; }
+   else
+     ac_cv_alignof_uint64_t=0
+   fi
 fi
 
-   ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "#include<$i>
-"
-if test "x$ac_cv_type_uint64_t" = xyes; then :
-  and64="/uint64_t"
-else
-  and64=""
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_uint64_t" >&5
+$as_echo "$ac_cv_alignof_uint64_t" >&6; }
 
-   ac_cv_stdint_result="(seen uint32_t$and64 in $i)"
-   break;
-  done
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint uint32_t" >&5
-$as_echo_n "checking for stdint uint32_t... " >&6; }
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdint_o" >&5
-$as_echo "$ac_cv_header_stdint_o" >&6; }
-fi
 
-if test "_$ac_cv_header_stdint_x" = "_" ; then
-if test "_$ac_cv_header_stdint_o" = "_" ; then
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint u_int32_t" >&5
-$as_echo_n "checking for stdint u_int32_t... " >&6; }
-if ${ac_cv_header_stdint_u+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+cat >>confdefs.h <<_ACEOF
+#define ALIGNOF_UINT64_T $ac_cv_alignof_uint64_t
+_ACEOF
 
- ac_cv_header_stdint_u="" # the BSD typedefs (sys/types.h)
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: (..)" >&5
-$as_echo "(..)" >&6; }
-  for i in sys/types.h inttypes.h sys/inttypes.h $inttype_headers ; do
-   unset ac_cv_type_u_int32_t
-   unset ac_cv_type_u_int64_t
-   ac_fn_c_check_type "$LINENO" "u_int32_t" "ac_cv_type_u_int32_t" "#include <$i>
-"
-if test "x$ac_cv_type_u_int32_t" = xyes; then :
-  ac_cv_header_stdint_u=$i
-else
-       continue
-fi
 
-   ac_fn_c_check_type "$LINENO" "u_int64_t" "ac_cv_type_u_int64_t" "#include<$i>
-"
-if test "x$ac_cv_type_u_int64_t" = xyes; then :
-  and64="/u_int64_t"
-else
-  and64=""
-fi
 
-   ac_cv_stdint_result="(seen u_int32_t$and64 in $i)"
-   break;
-  done
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint u_int32_t" >&5
-$as_echo_n "checking for stdint u_int32_t... " >&6; }
+ALIGNOF_UINT64_T="$ac_cv_alignof_uint64_t"
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdint_u" >&5
-$as_echo "$ac_cv_header_stdint_u" >&6; }
-fi fi
 
-if test "_$ac_cv_header_stdint_x" = "_" ; then
-   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint datatype model" >&5
-$as_echo_n "checking for stdint datatype model... " >&6; }
-   { $as_echo "$as_me:${as_lineno-$LINENO}: result: (..)" >&5
-$as_echo "(..)" >&6; }
-   # The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of char" >&5
-$as_echo_n "checking size of char... " >&6; }
-if ${ac_cv_sizeof_char+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char))" "ac_cv_sizeof_char"        "$ac_includes_default"; then :
+for ac_header in openssl/blowfish.h openssl/des.h openssl/cast.h openssl/aes.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
 
 else
-  if test "$ac_cv_type_char" = yes; then
-     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "cannot compute sizeof (char)
-See \`config.log' for more details" "$LINENO" 5; }
-   else
-     ac_cv_sizeof_char=0
-   fi
-fi
-
+  enable_openssl=no
+ break
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char" >&5
-$as_echo "$ac_cv_sizeof_char" >&6; }
 
+done
 
 
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_CHAR $ac_cv_sizeof_char
+# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
+# for constant arguments.  Useless!
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
+$as_echo_n "checking for working alloca.h... " >&6; }
+if ${ac_cv_working_alloca_h+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <alloca.h>
+int
+main ()
+{
+char *p = (char *) alloca (2 * sizeof (int));
+                         if (p) return 0;
+  ;
+  return 0;
+}
 _ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_working_alloca_h=yes
+else
+  ac_cv_working_alloca_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
+$as_echo "$ac_cv_working_alloca_h" >&6; }
+if test $ac_cv_working_alloca_h = yes; then
 
+$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
 
-   # The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
-$as_echo_n "checking size of short... " >&6; }
-if ${ac_cv_sizeof_short+:} false; then :
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
+$as_echo_n "checking for alloca... " >&6; }
+if ${ac_cv_func_alloca_works+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short"        "$ac_includes_default"; then :
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __GNUC__
+# define alloca __builtin_alloca
+#else
+# ifdef _MSC_VER
+#  include <malloc.h>
+#  define alloca _alloca
+# else
+#  ifdef HAVE_ALLOCA_H
+#   include <alloca.h>
+#  else
+#   ifdef _AIX
+ #pragma alloca
+#   else
+#    ifndef alloca /* predefined by HP cc +Olibcalls */
+void *alloca (size_t);
+#    endif
+#   endif
+#  endif
+# endif
+#endif
 
+int
+main ()
+{
+char *p = (char *) alloca (1);
+                                   if (p) return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_func_alloca_works=yes
 else
-  if test "$ac_cv_type_short" = yes; then
-     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "cannot compute sizeof (short)
-See \`config.log' for more details" "$LINENO" 5; }
-   else
-     ac_cv_sizeof_short=0
-   fi
+  ac_cv_func_alloca_works=no
 fi
-
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
-$as_echo "$ac_cv_sizeof_short" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
+$as_echo "$ac_cv_func_alloca_works" >&6; }
 
+if test $ac_cv_func_alloca_works = yes; then
 
+$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
 
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_SHORT $ac_cv_sizeof_short
-_ACEOF
+else
+  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
+# that cause trouble.  Some versions do not even contain alloca or
+# contain a buggy version.  If you still want to use their alloca,
+# use ar to extract alloca.o from them instead of compiling alloca.c.
 
+ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
 
-   # The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
-$as_echo_n "checking size of int... " >&6; }
-if ${ac_cv_sizeof_int+:} false; then :
+$as_echo "#define C_ALLOCA 1" >>confdefs.h
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
+$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
+if ${ac_cv_os_cray+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int"        "$ac_includes_default"; then :
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#if defined CRAY && ! defined CRAY2
+webecray
+#else
+wenotbecray
+#endif
 
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "webecray" >/dev/null 2>&1; then :
+  ac_cv_os_cray=yes
 else
-  if test "$ac_cv_type_int" = yes; then
-     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "cannot compute sizeof (int)
-See \`config.log' for more details" "$LINENO" 5; }
-   else
-     ac_cv_sizeof_int=0
-   fi
+  ac_cv_os_cray=no
 fi
+rm -f conftest*
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
-$as_echo "$ac_cv_sizeof_int" >&6; }
-
-
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
+$as_echo "$ac_cv_os_cray" >&6; }
+if test $ac_cv_os_cray = yes; then
+  for ac_func in _getb67 GETB67 getb67; do
+    as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
 
 cat >>confdefs.h <<_ACEOF
-#define SIZEOF_INT $ac_cv_sizeof_int
+#define CRAY_STACKSEG_END $ac_func
 _ACEOF
 
+    break
+fi
+
+  done
+fi
 
-   # The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
-$as_echo_n "checking size of long... " >&6; }
-if ${ac_cv_sizeof_long+:} false; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
+$as_echo_n "checking stack direction for C alloca... " >&6; }
+if ${ac_cv_c_stack_direction+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
+  if test "$cross_compiling" = yes; then :
+  ac_cv_c_stack_direction=0
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes_default
+int
+find_stack_direction (int *addr, int depth)
+{
+  int dir, dummy = 0;
+  if (! addr)
+    addr = &dummy;
+  *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
+  dir = depth ? find_stack_direction (addr, depth - 1) : 0;
+  return dir + dummy;
+}
 
+int
+main (int argc, char **argv)
+{
+  return find_stack_direction (0, argc + !argv + 20) < 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  ac_cv_c_stack_direction=1
 else
-  if test "$ac_cv_type_long" = yes; then
-     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "cannot compute sizeof (long)
-See \`config.log' for more details" "$LINENO" 5; }
-   else
-     ac_cv_sizeof_long=0
-   fi
+  ac_cv_c_stack_direction=-1
 fi
-
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
-$as_echo "$ac_cv_sizeof_long" >&6; }
-
-
 
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
+$as_echo "$ac_cv_c_stack_direction" >&6; }
 cat >>confdefs.h <<_ACEOF
-#define SIZEOF_LONG $ac_cv_sizeof_long
+#define STACK_DIRECTION $ac_cv_c_stack_direction
 _ACEOF
 
 
-   # The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void*" >&5
-$as_echo_n "checking size of void*... " >&6; }
-if ${ac_cv_sizeof_voidp+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void*))" "ac_cv_sizeof_voidp"        "$ac_includes_default"; then :
-
-else
-  if test "$ac_cv_type_voidp" = yes; then
-     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "cannot compute sizeof (void*)
-See \`config.log' for more details" "$LINENO" 5; }
-   else
-     ac_cv_sizeof_voidp=0
-   fi
-fi
-
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_voidp" >&5
-$as_echo "$ac_cv_sizeof_voidp" >&6; }
-
 
-
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_VOIDP $ac_cv_sizeof_voidp
+for ac_header in malloc.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "malloc.h" "ac_cv_header_malloc_h" "$ac_includes_default"
+if test "x$ac_cv_header_malloc_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_MALLOC_H 1
 _ACEOF
 
-
-   ac_cv_stdint_char_model=""
-   ac_cv_stdint_char_model="$ac_cv_stdint_char_model$ac_cv_sizeof_char"
-   ac_cv_stdint_char_model="$ac_cv_stdint_char_model$ac_cv_sizeof_short"
-   ac_cv_stdint_char_model="$ac_cv_stdint_char_model$ac_cv_sizeof_int"
-   ac_cv_stdint_long_model=""
-   ac_cv_stdint_long_model="$ac_cv_stdint_long_model$ac_cv_sizeof_int"
-   ac_cv_stdint_long_model="$ac_cv_stdint_long_model$ac_cv_sizeof_long"
-   ac_cv_stdint_long_model="$ac_cv_stdint_long_model$ac_cv_sizeof_voidp"
-   name="$ac_cv_stdint_long_model"
-   case "$ac_cv_stdint_char_model/$ac_cv_stdint_long_model" in
-    122/242)     name="$name,  IP16 (standard 16bit machine)" ;;
-    122/244)     name="$name,  LP32 (standard 32bit mac/win)" ;;
-    122/*)       name="$name        (unusual int16 model)" ;;
-    124/444)     name="$name, ILP32 (standard 32bit unixish)" ;;
-    124/488)     name="$name,  LP64 (standard 64bit unixish)" ;;
-    124/448)     name="$name, LLP64 (unusual  64bit unixish)" ;;
-    124/*)       name="$name        (unusual int32 model)" ;;
-    128/888)     name="$name, ILP64 (unusual  64bit numeric)" ;;
-    128/*)       name="$name        (unusual int64 model)" ;;
-    222/*|444/*) name="$name        (unusual dsptype)" ;;
-     *)          name="$name        (very unusal model)" ;;
-   esac
-   { $as_echo "$as_me:${as_lineno-$LINENO}: result: combined for stdint datatype model...  $name" >&5
-$as_echo "combined for stdint datatype model...  $name" >&6; }
-fi
-
-if test "_$ac_cv_header_stdint_x" != "_" ; then
-   ac_cv_header_stdint="$ac_cv_header_stdint_x"
-elif  test "_$ac_cv_header_stdint_o" != "_" ; then
-   ac_cv_header_stdint="$ac_cv_header_stdint_o"
-elif  test "_$ac_cv_header_stdint_u" != "_" ; then
-   ac_cv_header_stdint="$ac_cv_header_stdint_u"
-else
-   ac_cv_header_stdint="stddef.h"
 fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra inttypes in chosen header" >&5
-$as_echo_n "checking for extra inttypes in chosen header... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ($ac_cv_header_stdint)" >&5
-$as_echo "($ac_cv_header_stdint)" >&6; }
-unset ac_cv_type_int_least32_t
-unset ac_cv_type_int_fast32_t
-ac_fn_c_check_type "$LINENO" "int_least32_t" "ac_cv_type_int_least32_t" "#include <$ac_cv_header_stdint>
-"
-if test "x$ac_cv_type_int_least32_t" = xyes; then :
+done
 
-fi
 
-ac_fn_c_check_type "$LINENO" "int_fast32_t" "ac_cv_type_int_fast32_t" "#include<$ac_cv_header_stdint>
-"
-if test "x$ac_cv_type_int_fast32_t" = xyes; then :
+for ac_func in strerror
+do :
+  ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror"
+if test "x$ac_cv_func_strerror" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_STRERROR 1
+_ACEOF
 
 fi
+done
 
-ac_fn_c_check_type "$LINENO" "intmax_t" "ac_cv_type_intmax_t" "#include <$ac_cv_header_stdint>
-"
-if test "x$ac_cv_type_intmax_t" = xyes; then :
-
-fi
 
 
-fi # shortcircut to system "stdint.h"
-# ------------------ PREPARE VARIABLES ------------------------------
-if test "$GCC" = "yes" ; then
-ac_cv_stdint_message="using gnu compiler "`$CC --version | head -1`
+# Needed by the supplied memcmp.c
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
+$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
+if ${ac_cv_c_bigendian+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-ac_cv_stdint_message="using $CC"
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: make use of $ac_cv_header_stdint in $ac_stdint_h $ac_cv_stdint_result" >&5
-$as_echo "make use of $ac_cv_header_stdint in $ac_stdint_h $ac_cv_stdint_result" >&6; }
+  ac_cv_c_bigendian=unknown
+    # See if we're dealing with a universal compiler.
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifndef __APPLE_CC__
+              not a universal capable compiler
+            #endif
+            typedef int dummy;
 
-# ----------------- DONE inttypes.h checks START header -------------
-ac_config_commands="$ac_config_commands $ac_stdint_h"
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
 
+       # Check for potential -arch flags.  It is not universal unless
+       # there are at least two -arch flags with different values.
+       ac_arch=
+       ac_prev=
+       for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
+        if test -n "$ac_prev"; then
+          case $ac_word in
+            i?86 | x86_64 | ppc | ppc64)
+              if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
+                ac_arch=$ac_word
+              else
+                ac_cv_c_bigendian=universal
+                break
+              fi
+              ;;
+          esac
+          ac_prev=
+        elif test "x$ac_word" = "x-arch"; then
+          ac_prev=arch
+        fi
+       done
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    if test $ac_cv_c_bigendian = unknown; then
+      # See if sys/param.h defines the BYTE_ORDER macro.
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+            #include <sys/param.h>
 
+int
+main ()
+{
+#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
+                    && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
+                    && LITTLE_ENDIAN)
+             bogus endian macros
+            #endif
 
-# Check for file locking. We (AC_PROG_CC?) have already checked for
-# sys/types.h and unistd.h.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fcntl file locking" >&5
-$as_echo_n "checking for fcntl file locking... " >&6; }
-if ${nettle_cv_fcntl_locking+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  # It does; now see whether it defined to BIG_ENDIAN or not.
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-#include <fcntl.h>
+#include <sys/types.h>
+               #include <sys/param.h>
 
 int
 main ()
 {
-
-int op = F_SETLKW;
-struct flock fl;
+#if BYTE_ORDER != BIG_ENDIAN
+                not big endian
+               #endif
 
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  nettle_cv_fcntl_locking=yes
+  ac_cv_c_bigendian=yes
 else
-  nettle_cv_fcntl_locking=no
+  ac_cv_c_bigendian=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $nettle_cv_fcntl_locking" >&5
-$as_echo "$nettle_cv_fcntl_locking" >&6; }
-
-
-if test "x$nettle_cv_fcntl_locking" = "xyes" ; then
-  $as_echo "#define HAVE_FCNTL_LOCKING 1" >>confdefs.h
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    fi
+    if test $ac_cv_c_bigendian = unknown; then
+      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <limits.h>
 
-fi
+int
+main ()
+{
+#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
+             bogus endian macros
+            #endif
 
-# Checks for libraries
-if test "x$enable_public_key" = "xyes" ; then
-  if test "x$enable_mini_gmp" = "xno" ; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __gmpz_getlimbn in -lgmp" >&5
-$as_echo_n "checking for __gmpz_getlimbn in -lgmp... " >&6; }
-if ${ac_cv_lib_gmp___gmpz_getlimbn+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lgmp  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  # It does; now see whether it defined to _BIG_ENDIAN or not.
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
+#include <limits.h>
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char __gmpz_getlimbn ();
 int
 main ()
 {
-return __gmpz_getlimbn ();
+#ifndef _BIG_ENDIAN
+                not big endian
+               #endif
+
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_gmp___gmpz_getlimbn=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_c_bigendian=yes
 else
-  ac_cv_lib_gmp___gmpz_getlimbn=no
+  ac_cv_c_bigendian=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gmp___gmpz_getlimbn" >&5
-$as_echo "$ac_cv_lib_gmp___gmpz_getlimbn" >&6; }
-if test "x$ac_cv_lib_gmp___gmpz_getlimbn" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBGMP 1
-_ACEOF
-
-  LIBS="-lgmp $LIBS"
-
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNU MP not found, or not 3.1 or up, see http://gmplib.org/.
-    Support for public key algorithms will be unavailable." >&5
-$as_echo "$as_me: WARNING: GNU MP not found, or not 3.1 or up, see http://gmplib.org/.
-    Support for public key algorithms will be unavailable." >&2;}
-        enable_public_key=no
-fi
-
-
-    # Add -R flags needed to run programs linked with gmp
-    if test $cross_compiling = no -a "x$RPATHFLAG" != x ; then
-  ac_success=no
-  if test "$cross_compiling" = yes; then :
-  :
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    fi
+    if test $ac_cv_c_bigendian = unknown; then
+      # Compile a test program.
+      if test "$cross_compiling" = yes; then :
+  # Try to guess by grepping values from an object file.
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-int main(int argc, char **argv) { return 0; }
+short int ascii_mm[] =
+                 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+               short int ascii_ii[] =
+                 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+               int use_ascii (int i) {
+                 return ascii_mm[i] + ascii_ii[i];
+               }
+               short int ebcdic_ii[] =
+                 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+               short int ebcdic_mm[] =
+                 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+               int use_ebcdic (int i) {
+                 return ebcdic_mm[i] + ebcdic_ii[i];
+               }
+               extern int foo;
+
+int
+main ()
+{
+return use_ascii (foo) == use_ebcdic (foo);
+  ;
+  return 0;
+}
 _ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  ac_success=yes
-else
-  ac_success=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
+if ac_fn_c_try_compile "$LINENO"; then :
+  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
+             ac_cv_c_bigendian=yes
+           fi
+           if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
+             if test "$ac_cv_c_bigendian" = unknown; then
+               ac_cv_c_bigendian=no
+             else
+               # finding both strings is unlikely to happen, but who knows?
+               ac_cv_c_bigendian=unknown
+             fi
+           fi
 fi
-
-
-  if test $ac_success = no ; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Running simple test program failed. Trying -R flags" >&5
-$as_echo_n "checking Running simple test program failed. Trying -R flags... " >&6; }
-    ac_remaining_dirs=''
-    ac_rpath_save_LDFLAGS="$LDFLAGS"
-    for d in $RPATH_CANDIDATE_DIRS ; do
-      if test $ac_success = yes ; then
-       ac_remaining_dirs="$ac_remaining_dirs $d"
-      else
-       LDFLAGS="$RPATHFLAG$d $LDFLAGS"
-       if test "$cross_compiling" = yes; then :
-  :
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-int main(int argc, char **argv) { return 0; }
+$ac_includes_default
+int
+main ()
+{
+
+            /* Are we little or big endian?  From Harbison&Steele.  */
+            union
+            {
+              long int l;
+              char c[sizeof (long int)];
+            } u;
+            u.l = 1;
+            return u.c[sizeof (long int) - 1] == 1;
+
+  ;
+  return 0;
+}
 _ACEOF
 if ac_fn_c_try_run "$LINENO"; then :
-  ac_success=yes
-         ac_rpath_save_LDFLAGS="$LDFLAGS"
-         { $as_echo "$as_me:${as_lineno-$LINENO}: result: adding $RPATHFLAG$d" >&5
-$as_echo "adding $RPATHFLAG$d" >&6; }
-
+  ac_cv_c_bigendian=no
 else
-  ac_remaining_dirs="$ac_remaining_dirs $d"
+  ac_cv_c_bigendian=yes
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-       LDFLAGS="$ac_rpath_save_LDFLAGS"
-      fi
-    done
-    RPATH_CANDIDATE_DIRS=$ac_remaining_dirs
-  fi
-  if test $ac_success = no ; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
-$as_echo "failed" >&6; }
-  fi
-fi
-
-  fi
+    fi
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
+$as_echo "$ac_cv_c_bigendian" >&6; }
+ case $ac_cv_c_bigendian in #(
+   yes)
+     $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
+;; #(
+   no)
+      ;; #(
+   universal)
 
-nettle_cv_gmp_numb_bits=0
-if test "x$enable_public_key" = "xyes" ; then
-  # Check for gmp limb size
-  if test "x$enable_mini_gmp" = "xyes" ; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mini-gmp limb size" >&5
-$as_echo_n "checking for mini-gmp limb size... " >&6; }
-    # With mini-gmp, mp_limb_t is always unsigned long.
-    if ac_fn_c_compute_int "$LINENO" "(sizeof(unsigned long) * CHAR_BIT)" "nettle_cv_gmp_numb_bits"        "#include <limits.h>"; then :
-
-else
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot find value of GMP_NUMB_BITS
-See \`config.log' for more details" "$LINENO" 5; }
-fi
+$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
 
+     ;; #(
+   *)
+     as_fn_error $? "unknown endianness
+ presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
+ esac
 
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $nettle_cv_gmp_numb_bits bits" >&5
-$as_echo "$nettle_cv_gmp_numb_bits bits" >&6; }
-  else
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GMP limb size" >&5
-$as_echo_n "checking for GMP limb size... " >&6; }
-    if ac_fn_c_compute_int "$LINENO" "GMP_NUMB_BITS" "nettle_cv_gmp_numb_bits"        "#include <gmp.h>"; then :
+ac_fn_c_check_func "$LINENO" "memxor" "ac_cv_func_memxor"
+if test "x$ac_cv_func_memxor" = xyes; then :
+  $as_echo "#define HAVE_MEMXOR 1" >>confdefs.h
 
 else
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot find value of GMP_NUMB_BITS
-See \`config.log' for more details" "$LINENO" 5; }
-fi
-
+  case " $LIBOBJS " in
+  *" memxor.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS memxor.$ac_objext"
+ ;;
+esac
 
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $nettle_cv_gmp_numb_bits bits" >&5
-$as_echo "$nettle_cv_gmp_numb_bits bits" >&6; }
-  fi
 fi
 
-GMP_NUMB_BITS="$nettle_cv_gmp_numb_bits"
-
 
-# Figure out ABI. Currently, configurable only by setting CFLAGS.
-ABI=standard
 
-case "$host_cpu" in
-  x86_64 | amd64)
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__" >&5
+$as_echo_n "checking for __attribute__... " >&6; }
+if ${lsh_cv_c_attribute+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-#if defined(__x86_64__) || defined(__arch64__)
-#error 64-bit x86
-#endif
+#include <stdlib.h>
+
+static void foo(void) __attribute__ ((noreturn));
+
+static void __attribute__ ((noreturn))
+foo(void)
+{
+  exit(1);
+}
 
 int
 main ()
@@ -6710,809 +6483,638 @@ main ()
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-
-      ABI=32
-
+  lsh_cv_c_attribute=yes
 else
-
-      ABI=64
-
+  lsh_cv_c_attribute=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-    ;;
-  *sparc*)
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lsh_cv_c_attribute" >&5
+$as_echo "$lsh_cv_c_attribute" >&6; }
 
-#if defined(__sparcv9) || defined(__arch64__)
-#error 64-bit sparc
-#endif
 
-int
-main ()
-{
+if test "x$lsh_cv_c_attribute" = "xyes"; then
+  $as_echo "#define HAVE_GCC_ATTRIBUTE 1" >>confdefs.h
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+fi
 
-      ABI=32
 
-else
 
-      ABI=64
+# According to Simon Josefsson, looking for uint32_t and friends in
+# sys/types.h is needed on some systems, in particular cygwin.
+# ------ AX CREATE STDINT H -------------------------------------
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint types" >&5
+$as_echo_n "checking for stdint types... " >&6; }
+ac_stdint_h=`echo nettle-stdint.h`
+# try to shortcircuit - if the default include path of the compiler
+# can find a "stdint.h" header then we assume that all compilers can.
+if ${ac_cv_header_stdint_t+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
 
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-    ;;
-  *mips*)
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+old_CXXFLAGS="$CXXFLAGS" ; CXXFLAGS=""
+old_CPPFLAGS="$CPPFLAGS" ; CPPFLAGS=""
+old_CFLAGS="$CFLAGS"     ; CFLAGS=""
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
-#if defined(__sgi) && defined(__LP64__)
-#error 64-bit mips
-#endif
-
+#include <stdint.h>
 int
 main ()
 {
-
+int_least32_t v = 0;
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-
-      ABI=32
-
+  ac_cv_stdint_result="(assuming C99 compatible system)"
+ ac_cv_header_stdint_t="stdint.h";
 else
-
-      ABI=64
-
+  ac_cv_header_stdint_t=""
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-    ;;
-esac
+CXXFLAGS="$old_CXXFLAGS"
+CPPFLAGS="$old_CPPFLAGS"
+CFLAGS="$old_CFLAGS"
+fi
 
-if test "x$ABI" != xstandard ; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: Compiler uses $ABI-bit ABI. To change, set CC." >&5
-$as_echo "$as_me: Compiler uses $ABI-bit ABI. To change, set CC." >&6;}
-  if test "$libdir" = '${exec_prefix}/lib' ; then
-    # Try setting a better default
-    case "$host_cpu:$host_os:$ABI" in
-      *:solaris*:32|*:sunos*:32)
-       libdir='${exec_prefix}/lib'
-       ;;
-      *:solaris*:64|*:sunos*:64)
-       libdir='${exec_prefix}/lib/64'
-       ;;
-      # Linux conventions are a mess... According to the Linux File
-      # Hierarchy Standard, all architectures except IA64 puts 32-bit
-      # libraries in lib, and 64-bit in lib64. Some distributions,
-      # e.g., Fedora and Gentoo, adhere to this standard, while at
-      # least Debian has decided to put 64-bit libraries in lib and
-      # 32-bit libraries in lib32.
 
-      # We try to figure out the convention, except if we're cross
-      # compiling. We use lib${ABI} if /usr/lib${ABI} exists and
-      # appears to not be a symlink to a different name.
-      *:linux*:32|*:linux*:64)
-       if test "$cross_compiling" = yes ; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cross compiling for linux. Can't guess if libraries go in lib${ABI} or lib." >&5
-$as_echo "$as_me: WARNING: Cross compiling for linux. Can't guess if libraries go in lib${ABI} or lib." >&2;};         else
-         # The dash builtin pwd tries to be "helpful" and remember
-         # symlink names. Use -P option, and hope it's portable enough.
-         test -d /usr/lib${ABI} \
-           && (cd /usr/lib${ABI} && pwd -P | grep >/dev/null "/lib${ABI}"'$') \
-           && libdir='${exec_prefix}/'"lib${ABI}"
-       fi
-       ;;
-      # On freebsd, it seems 32-bit libraries are in lib32,
-      # and 64-bit in lib. Don't know about "kfreebsd", does
-      # it follow the Linux fhs conventions?
-      *:freebsd*:32)
-       libdir='${exec_prefix}/lib32'
-       ;;
-      *:freebsd*:64)
-       libdir='${exec_prefix}/lib'
-       ;;
-      *:irix*:32)
-       libdir='${exec_prefix}/lib32'
-       ;;
-      *:irix*:64)
-       libdir='${exec_prefix}/lib64'
-       ;;
-      *)
-        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Don't know where to install $ABI-bit libraries on this system." >&5
-$as_echo "$as_me: WARNING: Don't know where to install $ABI-bit libraries on this system." >&2;};
-    esac
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Libraries to be installed in $libdir." >&5
-$as_echo "$as_me: Libraries to be installed in $libdir." >&6;}
-  fi
+v="... $ac_cv_header_stdint_h"
+if test "$ac_stdint_h" = "stdint.h" ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: (are you sure you want them in ./stdint.h?)" >&5
+$as_echo "(are you sure you want them in ./stdint.h?)" >&6; }
+elif test "$ac_stdint_h" = "inttypes.h" ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: (are you sure you want them in ./inttypes.h?)" >&5
+$as_echo "(are you sure you want them in ./inttypes.h?)" >&6; }
+elif test "_$ac_cv_header_stdint_t" = "_" ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: (putting them into $ac_stdint_h)$v" >&5
+$as_echo "(putting them into $ac_stdint_h)$v" >&6; }
+else
+ ac_cv_header_stdint="$ac_cv_header_stdint_t"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdint (shortcircuit)" >&5
+$as_echo "$ac_cv_header_stdint (shortcircuit)" >&6; }
 fi
 
-OPT_NETTLE_SOURCES=""
+if test "_$ac_cv_header_stdint_t" = "_" ; then # can not shortcircuit..
 
-# Select assembler code
-asm_path=
-if test "x$enable_assembler" = xyes ; then
-  case "$host_cpu" in
-    i?86* | k[5-8]* | pentium* | athlon)
-      asm_path=x86
-      ;;
-    x86_64 | amd64)
-      if test "$ABI" = 64 ; then
-       asm_path=x86_64
-       if test "x$enable_fat" = xyes ; then
-         asm_path="x86_64/fat $asm_path"
-         OPT_NETTLE_SOURCES="fat-x86_64.c $OPT_NETTLE_SOURCES"
-       elif test "x$enable_x86_aesni" = xyes ; then
-         asm_path="x86_64/aesni $asm_path"
-       fi
-      else
-       asm_path=x86
-      fi
-      ;;
-    *sparc*)
-      if test "$ABI" = 64 ; then
-       asm_path=sparc64
-      else
-       asm_path=sparc32
-      fi
-      ;;
-    arm*)
-      asm_path=arm
-      if test "x$enable_fat" = xyes ; then
-       asm_path="arm/fat $asm_path"
-       OPT_NETTLE_SOURCES="fat-arm.c $OPT_NETTLE_SOURCES"
-      else
-       case "$host_cpu" in
-         armv6* | armv7*)
-           if test "$enable_arm_neon" = auto ; then
-  if test "$cross_compiling" = yes ; then
-            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if assembler accepts Neon instructions" >&5
-$as_echo_n "checking if assembler accepts Neon instructions... " >&6; }
-if ${nettle_cv_asm_arm_neon+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.s <<EOF
 
-.text
-foo:
-       vmlal.u32       q1, d0, d1
+inttype_headers=`echo sys/types.h | sed -e 's/,/ /g'`
 
-EOF
-gmp_assemble="$CC $CFLAGS $CPPFLAGS -c conftest.s >conftest.out 2>&1"
-if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5
-  (eval $gmp_assemble) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  cat conftest.out >&5
-  nettle_cv_asm_arm_neon=yes
+ac_cv_stdint_result="(no helpful system typedefs seen)"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint uintptr_t" >&5
+$as_echo_n "checking for stdint uintptr_t... " >&6; }
+if ${ac_cv_header_stdint_x+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  cat conftest.out >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.s >&5
-  nettle_cv_asm_arm_neon=no
-fi
-rm -f conftest*
 
+ ac_cv_header_stdint_x="" # the 1997 typedefs (inttypes.h)
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: (..)" >&5
+$as_echo "(..)" >&6; }
+  for i in stdint.h inttypes.h sys/inttypes.h $inttype_headers ; do
+   unset ac_cv_type_uintptr_t
+   unset ac_cv_type_uint64_t
+   ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#include <$i>
+"
+if test "x$ac_cv_type_uintptr_t" = xyes; then :
+  ac_cv_header_stdint_x=$i
+else
+       continue
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $nettle_cv_asm_arm_neon" >&5
-$as_echo "$nettle_cv_asm_arm_neon" >&6; }
-    enable_arm_neon="$nettle_cv_asm_arm_neon"
-  else
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if /proc/cpuinfo claims neon support" >&5
-$as_echo_n "checking if /proc/cpuinfo claims neon support... " >&6; }
-    if grep '^Features.*:.* neon' /proc/cpuinfo >/dev/null ; then
-      enable_arm_neon=yes
-    else
-      enable_arm_neon=no
-    fi
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_arm_neon" >&5
-$as_echo "$enable_arm_neon" >&6; }
-  fi
-fi
-
-
-           asm_path="arm/v6 arm"
 
-           if test "x$enable_arm_neon" = xyes ; then
-             asm_path="arm/neon $asm_path"
-           fi
-           ;;
-       esac
-      fi
-      ;;
-    *)
-      enable_assembler=no
-      ;;
-  esac
+   ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "#include<$i>
+"
+if test "x$ac_cv_type_uint64_t" = xyes; then :
+  and64="/uint64_t"
+else
+  and64=""
 fi
 
-# Files which replace a C source file (or otherwise don't correspond
-# to a new object file).
-asm_replace_list="aes-encrypt-internal.asm aes-decrypt-internal.asm \
-               arcfour-crypt.asm camellia-crypt-internal.asm \
-               md5-compress.asm memxor.asm memxor3.asm \
-               poly1305-internal.asm \
-               chacha-core-internal.asm \
-               salsa20-crypt.asm salsa20-core-internal.asm \
-               serpent-encrypt.asm serpent-decrypt.asm \
-               sha1-compress.asm sha256-compress.asm sha512-compress.asm \
-               sha3-permute.asm umac-nh.asm umac-nh-n.asm machine.m4"
-
-# Assembler files which generate additional object files if they are used.
-asm_nettle_optional_list="gcm-hash8.asm cpuid.asm \
-  aes-encrypt-internal-2.asm aes-decrypt-internal-2.asm memxor-2.asm \
-  salsa20-core-internal-2.asm sha1-compress-2.asm sha256-compress-2.asm \
-  sha3-permute-2.asm sha512-compress-2.asm \
-  umac-nh-n-2.asm umac-nh-2.asm"
+   ac_cv_stdint_result="(seen uintptr_t$and64 in $i)"
+   break;
+  done
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint uintptr_t" >&5
+$as_echo_n "checking for stdint uintptr_t... " >&6; }
 
-asm_hogweed_optional_list=""
-if test "x$enable_public_key" = "xyes" ; then
-  asm_hogweed_optional_list="ecc-192-modp.asm ecc-224-modp.asm \
-    ecc-25519-modp.asm ecc-256-redc.asm ecc-384-modp.asm ecc-521-modp.asm"
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdint_x" >&5
+$as_echo "$ac_cv_header_stdint_x" >&6; }
 
-OPT_NETTLE_OBJS=""
-OPT_HOGWEED_OBJS=""
-
-asm_file_list=""
-
-if test "x$enable_assembler" = xyes ; then
-  if test -n "$asm_path"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: Looking for assembler files in $asm_path." >&5
-$as_echo "$as_me: Looking for assembler files in $asm_path." >&6;}
-    for tmp_f in $asm_replace_list ; do
-      for asm_dir in $asm_path ; do
-        if test -f "$srcdir/$asm_dir/$tmp_f"; then
-         asm_file_list="$asm_file_list $tmp_f"
-          ac_config_links="$ac_config_links $tmp_f:$asm_dir/$tmp_f"
-
-         break
-        fi
-      done
-    done
-            for tmp_n in $asm_nettle_optional_list ; do
-            tmp_b=`echo "$tmp_n" | sed 's/\.[^.]*$//'`
-      for asm_dir in $asm_path ; do
-       if test -f "$srcdir/$asm_dir/$tmp_n"; then
-         asm_file_list="$asm_file_list $tmp_n"
-         ac_config_links="$ac_config_links $tmp_n:$asm_dir/$tmp_n"
-
-         while read tmp_func ; do
-           cat >>confdefs.h <<_ACEOF
-#define HAVE_NATIVE_$tmp_func 1
-_ACEOF
-
-           eval HAVE_NATIVE_$tmp_func=yes
-         done <<EOF
-`sed -n 's/^.*[^       ]*PROLOGUE(_*\(nettle_\)*\([^)]*\)).*$/\2/p' < "$srcdir/$asm_dir/$tmp_n"`
-EOF
-         OPT_NETTLE_OBJS="$OPT_NETTLE_OBJS $tmp_b"'.$(OBJEXT)'
-         break
-       fi
-      done
-    done
-    for tmp_h in $asm_hogweed_optional_list ; do
-            tmp_b=`echo "$tmp_h" | sed 's/\.[^.]*$//'`
-      for asm_dir in $asm_path ; do
-       if test -f "$srcdir/$asm_dir/$tmp_h"; then
-                 tmp_bits=`grep GMP_NUMB_BITS "$srcdir/$asm_dir/$tmp_h" \
-            | sed 's/^.*GMP_NUMB_BITS(\([0-9]*\)).*$/\1/'`
-         if test "$tmp_bits" && test "$tmp_bits" != "${GMP_NUMB_BITS}" ; then
-            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: skipping $tmp_h, because GMP_NUMB_BITS != $tmp_bits" >&5
-$as_echo "$as_me: WARNING: skipping $tmp_h, because GMP_NUMB_BITS != $tmp_bits" >&2;}
-            continue
-         fi
-         asm_file_list="$asm_file_list $tmp_h"
-         ac_config_links="$ac_config_links $tmp_h:$asm_dir/$tmp_h"
-
-         while read tmp_func ; do
-           cat >>confdefs.h <<_ACEOF
-#define HAVE_NATIVE_$tmp_func 1
-_ACEOF
+if test "_$ac_cv_header_stdint_x" = "_" ; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint uint32_t" >&5
+$as_echo_n "checking for stdint uint32_t... " >&6; }
+if ${ac_cv_header_stdint_o+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
 
-           eval HAVE_NATIVE_$tmp_func=yes
-         done <<EOF
-`sed -n 's/[^  ]*PROLOGUE(_*\(nettle_\)*\([^)]*\)).*$/\2/p' < "$srcdir/$asm_dir/$tmp_h"`
-EOF
-         OPT_HOGWEED_OBJS="$OPT_HOGWEED_OBJS $tmp_b"'.$(OBJEXT)'
-         break
-       fi
-      done
-    done
-    if test -z "$asm_file_list"; then
-      enable_assembler=no
-      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No assembler files found." >&5
-$as_echo "$as_me: WARNING: No assembler files found." >&2;}
-    fi
-  fi
-  case "$host_os" in
-    darwin*)
-      ASM_RODATA='.section __TEXT,__const'
-      ;;
-    *)
-      ASM_RODATA='.section .rodata'
-      ;;
-  esac
+ ac_cv_header_stdint_o="" # the 1995 typedefs (sys/inttypes.h)
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: (..)" >&5
+$as_echo "(..)" >&6; }
+  for i in inttypes.h sys/inttypes.h stdint.h $inttype_headers ; do
+   unset ac_cv_type_uint32_t
+   unset ac_cv_type_uint64_t
+   ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "#include <$i>
+"
+if test "x$ac_cv_type_uint32_t" = xyes; then :
+  ac_cv_header_stdint_o=$i
+else
+       continue
 fi
 
-
-
-
-
-if test "x$enable_assembler" = xyes ; then
-  IF_ASM=''
+   ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "#include<$i>
+"
+if test "x$ac_cv_type_uint64_t" = xyes; then :
+  and64="/uint64_t"
 else
-  IF_ASM='#'
+  and64=""
 fi
 
+   ac_cv_stdint_result="(seen uint32_t$and64 in $i)"
+   break;
+  done
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint uint32_t" >&5
+$as_echo_n "checking for stdint uint32_t... " >&6; }
 
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdint_o" >&5
+$as_echo "$ac_cv_header_stdint_o" >&6; }
+fi
 
-
-if test "x$enable_pic" = xyes; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking CCPIC" >&5
-$as_echo_n "checking CCPIC... " >&6; }
-if ${lsh_cv_sys_ccpic+:} false; then :
+if test "_$ac_cv_header_stdint_x" = "_" ; then
+if test "_$ac_cv_header_stdint_o" = "_" ; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint u_int32_t" >&5
+$as_echo_n "checking for stdint u_int32_t... " >&6; }
+if ${ac_cv_header_stdint_u+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
-  if test -z "$CCPIC" ; then
-    if test "$GCC" = yes ; then
-      case "$host_os" in
-       bsdi4.*)        CCPIC="-fPIC" ;;
-       bsdi*)          CCPIC="" ;;
-       darwin*)        CCPIC="-fPIC" ;;
-       # Could also use -fpic, depending on the number of symbol references
-       solaris*)       CCPIC="-fPIC" ;;
-       cygwin*)        CCPIC="" ;;
-       mingw32*)       CCPIC="" ;;
-       *)              CCPIC="-fpic" ;;
-      esac
-    else
-      case "$host_os" in
-       darwin*)        CCPIC="-fPIC" ;;
-        irix*)         CCPIC="-share" ;;
-       hpux*)          CCPIC="+z"; ;;
-       *freebsd*)      CCPIC="-fpic" ;;
-       sco*|sysv4.*)   CCPIC="-KPIC -dy -Bdynamic" ;;
-       solaris*)       CCPIC="-KPIC -Bdynamic" ;;
-       winnt*)         CCPIC="-shared" ;;
-       *)              CCPIC="" ;;
-      esac
-    fi
-  fi
-  OLD_CFLAGS="$CFLAGS"
-  CFLAGS="$CFLAGS $CCPIC"
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-exit(0);
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  lsh_cv_sys_ccpic="$CCPIC"
+ ac_cv_header_stdint_u="" # the BSD typedefs (sys/types.h)
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: (..)" >&5
+$as_echo "(..)" >&6; }
+  for i in sys/types.h inttypes.h sys/inttypes.h $inttype_headers ; do
+   unset ac_cv_type_u_int32_t
+   unset ac_cv_type_u_int64_t
+   ac_fn_c_check_type "$LINENO" "u_int32_t" "ac_cv_type_u_int32_t" "#include <$i>
+"
+if test "x$ac_cv_type_u_int32_t" = xyes; then :
+  ac_cv_header_stdint_u=$i
 else
-  lsh_cv_sys_ccpic=''
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  CFLAGS="$OLD_CFLAGS"
-
+       continue
 fi
 
-CCPIC="$lsh_cv_sys_ccpic"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCPIC" >&5
-$as_echo "$CCPIC" >&6; }
+   ac_fn_c_check_type "$LINENO" "u_int64_t" "ac_cv_type_u_int64_t" "#include<$i>
+"
+if test "x$ac_cv_type_u_int64_t" = xyes; then :
+  and64="/u_int64_t"
 else
-    CCPIC=''
+  and64=""
 fi
 
+   ac_cv_stdint_result="(seen u_int32_t$and64 in $i)"
+   break;
+  done
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint u_int32_t" >&5
+$as_echo_n "checking for stdint u_int32_t... " >&6; }
 
-IF_DLL='#'
-LIBNETTLE_FILE_SRC='$(LIBNETTLE_FORLINK)'
-LIBHOGWEED_FILE_SRC='$(LIBHOGWEED_FORLINK)'
-EMULATOR=''
-W64_ABI=no
-
-case "$host_os" in
-  mingw32*|cygwin*)
-    # The actual DLLs, e.g. libnettle-$major-$minor.dll, are normally
-    # installed into the bin dir (or more exactly $libdir/../bin, for
-    # automake), while libnettle.dll.a, which is a stub file for
-    # linking to the DLL, is installed into the lib dir.
-    case "$host_os" in
-      mingw32*)
-        LIBNETTLE_FORLINK='libnettle-$(LIBNETTLE_MAJOR)-$(LIBNETTLE_MINOR).dll'
-        LIBHOGWEED_FORLINK='libhogweed-$(LIBHOGWEED_MAJOR)-$(LIBHOGWEED_MINOR).dll'
-        ;;
-      cygwin*)
-        LIBNETTLE_FORLINK='cygnettle-$(LIBNETTLE_MAJOR)-$(LIBNETTLE_MINOR).dll'
-        LIBHOGWEED_FORLINK='cyghogweed-$(LIBHOGWEED_MAJOR)-$(LIBHOGWEED_MINOR).dll'
-        ;;
-    esac
-    if test "x$cross_compiling" = xyes ; then
-       case "$ABI" in
-           64)
-               EMULATOR=wine64
-               ;;
-           *)
-               EMULATOR=wine
-               ;;
-       esac
-    fi
-    if test "x$ABI" = x64 ; then
-        W64_ABI=yes
-    fi
-    LIBNETTLE_SONAME=''
-    LIBNETTLE_FILE='libnettle.dll.a'
-    LIBNETTLE_FILE_SRC='$(LIBNETTLE_FILE)'
-    LIBNETTLE_LINK='$(CC) $(CFLAGS) $(LDFLAGS) -shared -Wl,--out-implib=$(LIBNETTLE_FILE) -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--whole-archive'
-    LIBNETTLE_LIBS='-Wl,--no-whole-archive $(LIBS)'
-
-    LIBHOGWEED_SONAME=''
-    LIBHOGWEED_FILE='libhogweed.dll.a'
-    LIBHOGWEED_FILE_SRC='$(LIBHOGWEED_FILE)'
-    LIBHOGWEED_LINK='$(CC) $(CFLAGS) $(LDFLAGS) -shared -Wl,--out-implib=$(LIBHOGWEED_FILE) -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--whole-archive'
-    LIBHOGWEED_LIBS='-Wl,--no-whole-archive $(LIBS) libnettle.dll.a'
-    IF_DLL=''
-    ;;
-  darwin*)
-    LIBNETTLE_FORLINK=libnettle.dylib
-    LIBNETTLE_SONAME='libnettle.$(LIBNETTLE_MAJOR).dylib'
-    LIBNETTLE_FILE='libnettle.$(LIBNETTLE_MAJOR).$(LIBNETTLE_MINOR).dylib'
-    LIBNETTLE_LINK='$(CC) $(CFLAGS) -dynamiclib $(LDFLAGS) -install_name ${libdir}/$(LIBNETTLE_SONAME) -compatibility_version $(LIBNETTLE_MAJOR) -current_version $(LIBNETTLE_MAJOR).$(LIBNETTLE_MINOR)'
-    LIBNETTLE_LIBS=''
-
-    LIBHOGWEED_FORLINK=libhogweed.dylib
-    LIBHOGWEED_SONAME='libhogweed.$(LIBHOGWEED_MAJOR).dylib'
-    LIBHOGWEED_FILE='libhogweed.$(LIBHOGWEED_MAJOR).$(LIBHOGWEED_MINOR).dylib'
-    LIBHOGWEED_LINK='$(CC) $(CFLAGS) -dynamiclib -L. $(LDFLAGS) -install_name ${libdir}/$(LIBHOGWEED_SONAME) -compatibility_version $(LIBHOGWEED_MAJOR) -current_version $(LIBHOGWEED_MAJOR).$(LIBHOGWEED_MINOR)'
-    LIBHOGWEED_LIBS='-lnettle $(LIBS)'
-    ;;
-  solaris*)
-    # Sun's ld uses -h to set the soname, and this option is passed
-    # through by both Sun's compiler and gcc. Might not work with GNU
-    # ld, but it's unusual to use GNU ld on Solaris.
-    LIBNETTLE_FORLINK=libnettle.so
-    LIBNETTLE_SONAME='$(LIBNETTLE_FORLINK).$(LIBNETTLE_MAJOR)'
-    LIBNETTLE_FILE='$(LIBNETTLE_SONAME).$(LIBNETTLE_MINOR)'
-    LIBNETTLE_LINK='$(CC) $(CFLAGS) $(LDFLAGS) -G -h $(LIBNETTLE_SONAME)'
-    LIBNETTLE_LIBS=''
-
-    LIBHOGWEED_FORLINK=libhogweed.so
-    LIBHOGWEED_SONAME='$(LIBHOGWEED_FORLINK).$(LIBHOGWEED_MAJOR)'
-    LIBHOGWEED_FILE='$(LIBHOGWEED_SONAME).$(LIBHOGWEED_MINOR)'
-    LIBHOGWEED_LINK='$(CC) $(CFLAGS) $(LDFLAGS) -G -h $(LIBHOGWEED_SONAME)'
-    LIBHOGWEED_LIBS='libnettle.so $(LIBS)'
-    ;;
-  *)
-    LIBNETTLE_FORLINK=libnettle.so
-    LIBNETTLE_SONAME='$(LIBNETTLE_FORLINK).$(LIBNETTLE_MAJOR)'
-    LIBNETTLE_FILE='$(LIBNETTLE_SONAME).$(LIBNETTLE_MINOR)'
-    LIBNETTLE_LINK='$(CC) $(CFLAGS) $(LDFLAGS) -shared -Wl,-soname=$(LIBNETTLE_SONAME)'
-    LIBNETTLE_LIBS=''
-
-    LIBHOGWEED_FORLINK=libhogweed.so
-    LIBHOGWEED_SONAME='$(LIBHOGWEED_FORLINK).$(LIBHOGWEED_MAJOR)'
-    LIBHOGWEED_FILE='$(LIBHOGWEED_SONAME).$(LIBHOGWEED_MINOR)'
-    LIBHOGWEED_LINK='$(CC) $(CFLAGS) $(LDFLAGS) -shared -Wl,-soname=$(LIBHOGWEED_SONAME)'
-    # Requested by debian, to make linking with only -lhogweed work
-    # (does not work in general, e.g., with static linking all of
-    # -lhogweed -lgmp -lnettle are still required). Also makes dlopen
-    # of libhogweed.so work, without having to use RTLD_GLOBAL.
-    LIBHOGWEED_LIBS='libnettle.so $(LIBS)'
-    ;;
-esac
-
-ASM_SYMBOL_PREFIX=''
-ASM_ELF_STYLE='no'
-ASM_COFF_STYLE='no'
-# GNU as default is to use @
-ASM_TYPE_FUNCTION='@function'
-ASM_TYPE_PROGBITS='@progbits'
-ASM_MARK_NOEXEC_STACK=''
-ASM_ALIGN_LOG=''
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdint_u" >&5
+$as_echo "$ac_cv_header_stdint_u" >&6; }
+fi fi
 
-if test x$enable_assembler = xyes ; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if globals are prefixed by underscore" >&5
-$as_echo_n "checking if globals are prefixed by underscore... " >&6; }
-if ${nettle_cv_asm_underscore+:} false; then :
+if test "_$ac_cv_header_stdint_x" = "_" ; then
+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint datatype model" >&5
+$as_echo_n "checking for stdint datatype model... " >&6; }
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: (..)" >&5
+$as_echo "(..)" >&6; }
+   # The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of char" >&5
+$as_echo_n "checking size of char... " >&6; }
+if ${ac_cv_sizeof_char+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-   # Default is no underscore
-    nettle_cv_asm_underscore=no
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-int a_global_symbol;
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-   $NM conftest.$OBJEXT >conftest.out
-        if grep _a_global_symbol conftest.out >/dev/null ; then
-          nettle_cv_asm_underscore=yes
-        elif grep a_global_symbol conftest.out >/dev/null ; then
-          nettle_cv_asm_underscore=no
-        else
-          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: nm does not list a_global_symbol at all" >&5
-$as_echo "$as_me: WARNING: nm does not list a_global_symbol at all" >&2;}
-       fi
+  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char))" "ac_cv_sizeof_char"        "$ac_includes_default"; then :
+
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: test program with a single global could not be compiled!?" >&5
-$as_echo "$as_me: WARNING: test program with a single global could not be compiled!?" >&2;}
+  if test "$ac_cv_type_char" = yes; then
+     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (char)
+See \`config.log' for more details" "$LINENO" 5; }
+   else
+     ac_cv_sizeof_char=0
+   fi
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $nettle_cv_asm_underscore" >&5
-$as_echo "$nettle_cv_asm_underscore" >&6; }
-  if test x$nettle_cv_asm_underscore = xyes ; then
-    ASM_SYMBOL_PREFIX='_'
-  fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char" >&5
+$as_echo "$ac_cv_sizeof_char" >&6; }
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF-style .type,%function pseudo-ops" >&5
-$as_echo_n "checking for ELF-style .type,%function pseudo-ops... " >&6; }
-if ${nettle_cv_asm_type_percent_function+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.s <<EOF
 
-.text
-.globl foo
-.type foo,%function
-foo:
-.Lend:
 
-.size foo, .Lend - foo
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_CHAR $ac_cv_sizeof_char
+_ACEOF
 
-EOF
-gmp_assemble="$CC $CFLAGS $CPPFLAGS -c conftest.s >conftest.out 2>&1"
-if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5
-  (eval $gmp_assemble) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  cat conftest.out >&5
-  nettle_cv_asm_type_percent_function=yes
+
+   # The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
+$as_echo_n "checking size of short... " >&6; }
+if ${ac_cv_sizeof_short+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  cat conftest.out >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.s >&5
-  nettle_cv_asm_type_percent_function=no
+  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short"        "$ac_includes_default"; then :
+
+else
+  if test "$ac_cv_type_short" = yes; then
+     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (short)
+See \`config.log' for more details" "$LINENO" 5; }
+   else
+     ac_cv_sizeof_short=0
+   fi
 fi
-rm -f conftest*
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $nettle_cv_asm_type_percent_function" >&5
-$as_echo "$nettle_cv_asm_type_percent_function" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
+$as_echo "$ac_cv_sizeof_short" >&6; }
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF-style .type,#function pseudo-ops" >&5
-$as_echo_n "checking for ELF-style .type,#function pseudo-ops... " >&6; }
-if ${nettle_cv_asm_type_hash_function+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.s <<EOF
 
-.text
-.globl foo
-.type foo,#function
-foo:
-.Lend:
 
-.size foo, .Lend - foo
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_SHORT $ac_cv_sizeof_short
+_ACEOF
 
-EOF
-gmp_assemble="$CC $CFLAGS $CPPFLAGS -c conftest.s >conftest.out 2>&1"
-if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5
-  (eval $gmp_assemble) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  cat conftest.out >&5
-  nettle_cv_asm_type_hash_function=yes
+
+   # The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
+$as_echo_n "checking size of int... " >&6; }
+if ${ac_cv_sizeof_int+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  cat conftest.out >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.s >&5
-  nettle_cv_asm_type_hash_function=no
+  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int"        "$ac_includes_default"; then :
+
+else
+  if test "$ac_cv_type_int" = yes; then
+     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (int)
+See \`config.log' for more details" "$LINENO" 5; }
+   else
+     ac_cv_sizeof_int=0
+   fi
 fi
-rm -f conftest*
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $nettle_cv_asm_type_hash_function" >&5
-$as_echo "$nettle_cv_asm_type_hash_function" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
+$as_echo "$ac_cv_sizeof_int" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_INT $ac_cv_sizeof_int
+_ACEOF
 
-  if test x$nettle_cv_asm_type_percent_function = xyes ; then
-    ASM_ELF_STYLE='yes'
-    ASM_TYPE_FUNCTION='%function'
-    ASM_TYPE_PROGBITS='%progbits'
-  else
-    if test x$nettle_cv_asm_type_hash_function = xyes ; then
-      ASM_ELF_STYLE='yes'
-      ASM_TYPE_FUNCTION='#function'
-      ASM_TYPE_PROGBITS='#progbits'
-    fi
-  fi
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COFF-style .type directive" >&5
-$as_echo_n "checking for COFF-style .type directive... " >&6; }
-if ${nettle_cv_asm_coff_type+:} false; then :
+   # The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
+$as_echo_n "checking size of long... " >&6; }
+if ${ac_cv_sizeof_long+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  cat >conftest.s <<EOF
-
-.text
-.globl _foo
-.def _foo
-.scl 2
-.type 32
-.endef
-_foo:
+  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
 
-EOF
-gmp_assemble="$CC $CFLAGS $CPPFLAGS -c conftest.s >conftest.out 2>&1"
-if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5
-  (eval $gmp_assemble) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  cat conftest.out >&5
-  nettle_cv_asm_coff_type=yes
 else
-  cat conftest.out >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.s >&5
-  nettle_cv_asm_coff_type=no
+  if test "$ac_cv_type_long" = yes; then
+     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (long)
+See \`config.log' for more details" "$LINENO" 5; }
+   else
+     ac_cv_sizeof_long=0
+   fi
 fi
-rm -f conftest*
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $nettle_cv_asm_coff_type" >&5
-$as_echo "$nettle_cv_asm_coff_type" >&6; }
-  if test "x$nettle_cv_asm_coff_type" = "xyes" ; then
-    ASM_COFF_STYLE=yes
-  fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
+$as_echo "$ac_cv_sizeof_long" >&6; }
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should use a .note.GNU-stack section" >&5
-$as_echo_n "checking if we should use a .note.GNU-stack section... " >&6; }
-if ${nettle_cv_asm_gnu_stack+:} false; then :
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_LONG $ac_cv_sizeof_long
+_ACEOF
+
+
+   # The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void*" >&5
+$as_echo_n "checking size of void*... " >&6; }
+if ${ac_cv_sizeof_voidp+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-   # Default
-    nettle_cv_asm_gnu_stack=no
+  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void*))" "ac_cv_sizeof_voidp"        "$ac_includes_default"; then :
 
-    cat >conftest.c <<EOF
-int foo() { return 0; }
-EOF
-    nettle_compile="$CC $CFLAGS $CPPFLAGS -c conftest.c >conftest.out 2>&1"
-    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$nettle_compile\""; } >&5
-  (eval $nettle_compile) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-      cat conftest.out >&5
-      $OBJDUMP -x conftest.o | grep '\.note\.GNU-stack' > /dev/null \
-      && nettle_cv_asm_gnu_stack=yes
-    else
-      cat conftest.out >&5
-      echo "configure: failed program was:" >&5
-      cat conftest.s >&5
-    fi
-    rm -f conftest.*
+else
+  if test "$ac_cv_type_voidp" = yes; then
+     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (void*)
+See \`config.log' for more details" "$LINENO" 5; }
+   else
+     ac_cv_sizeof_voidp=0
+   fi
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $nettle_cv_asm_gnu_stack" >&5
-$as_echo "$nettle_cv_asm_gnu_stack" >&6; }
-  if test x$nettle_cv_asm_gnu_stack = xyes ; then
-    ASM_MARK_NOEXEC_STACK='.section .note.GNU-stack,"",TYPE_PROGBITS'
-  fi
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if .align assembly directive is logarithmic" >&5
-$as_echo_n "checking if .align assembly directive is logarithmic... " >&6; }
-if ${nettle_cv_asm_align_log+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.s <<EOF
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_voidp" >&5
+$as_echo "$ac_cv_sizeof_voidp" >&6; }
 
-.align 3
 
-EOF
-gmp_assemble="$CC $CFLAGS $CPPFLAGS -c conftest.s >conftest.out 2>&1"
-if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5
-  (eval $gmp_assemble) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  cat conftest.out >&5
-  nettle_cv_asm_align_log=yes
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_VOIDP $ac_cv_sizeof_voidp
+_ACEOF
+
+
+   ac_cv_stdint_char_model=""
+   ac_cv_stdint_char_model="$ac_cv_stdint_char_model$ac_cv_sizeof_char"
+   ac_cv_stdint_char_model="$ac_cv_stdint_char_model$ac_cv_sizeof_short"
+   ac_cv_stdint_char_model="$ac_cv_stdint_char_model$ac_cv_sizeof_int"
+   ac_cv_stdint_long_model=""
+   ac_cv_stdint_long_model="$ac_cv_stdint_long_model$ac_cv_sizeof_int"
+   ac_cv_stdint_long_model="$ac_cv_stdint_long_model$ac_cv_sizeof_long"
+   ac_cv_stdint_long_model="$ac_cv_stdint_long_model$ac_cv_sizeof_voidp"
+   name="$ac_cv_stdint_long_model"
+   case "$ac_cv_stdint_char_model/$ac_cv_stdint_long_model" in
+    122/242)     name="$name,  IP16 (standard 16bit machine)" ;;
+    122/244)     name="$name,  LP32 (standard 32bit mac/win)" ;;
+    122/*)       name="$name        (unusual int16 model)" ;;
+    124/444)     name="$name, ILP32 (standard 32bit unixish)" ;;
+    124/488)     name="$name,  LP64 (standard 64bit unixish)" ;;
+    124/448)     name="$name, LLP64 (unusual  64bit unixish)" ;;
+    124/*)       name="$name        (unusual int32 model)" ;;
+    128/888)     name="$name, ILP64 (unusual  64bit numeric)" ;;
+    128/*)       name="$name        (unusual int64 model)" ;;
+    222/*|444/*) name="$name        (unusual dsptype)" ;;
+     *)          name="$name        (very unusal model)" ;;
+   esac
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: combined for stdint datatype model...  $name" >&5
+$as_echo "combined for stdint datatype model...  $name" >&6; }
+fi
+
+if test "_$ac_cv_header_stdint_x" != "_" ; then
+   ac_cv_header_stdint="$ac_cv_header_stdint_x"
+elif  test "_$ac_cv_header_stdint_o" != "_" ; then
+   ac_cv_header_stdint="$ac_cv_header_stdint_o"
+elif  test "_$ac_cv_header_stdint_u" != "_" ; then
+   ac_cv_header_stdint="$ac_cv_header_stdint_u"
 else
-  cat conftest.out >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.s >&5
-  nettle_cv_asm_align_log=no
+   ac_cv_header_stdint="stddef.h"
 fi
-rm -f conftest*
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra inttypes in chosen header" >&5
+$as_echo_n "checking for extra inttypes in chosen header... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ($ac_cv_header_stdint)" >&5
+$as_echo "($ac_cv_header_stdint)" >&6; }
+unset ac_cv_type_int_least32_t
+unset ac_cv_type_int_fast32_t
+ac_fn_c_check_type "$LINENO" "int_least32_t" "ac_cv_type_int_least32_t" "#include <$ac_cv_header_stdint>
+"
+if test "x$ac_cv_type_int_least32_t" = xyes; then :
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $nettle_cv_asm_align_log" >&5
-$as_echo "$nettle_cv_asm_align_log" >&6; }
-  ASM_ALIGN_LOG="$nettle_cv_asm_align_log"
+
+ac_fn_c_check_type "$LINENO" "int_fast32_t" "ac_cv_type_int_fast32_t" "#include<$ac_cv_header_stdint>
+"
+if test "x$ac_cv_type_int_fast32_t" = xyes; then :
+
 fi
 
+ac_fn_c_check_type "$LINENO" "intmax_t" "ac_cv_type_intmax_t" "#include <$ac_cv_header_stdint>
+"
+if test "x$ac_cv_type_intmax_t" = xyes; then :
 
+fi
 
 
+fi # shortcircut to system "stdint.h"
+# ------------------ PREPARE VARIABLES ------------------------------
+if test "$GCC" = "yes" ; then
+ac_cv_stdint_message="using gnu compiler "`$CC --version | head -1`
+else
+ac_cv_stdint_message="using $CC"
+fi
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: make use of $ac_cv_header_stdint in $ac_stdint_h $ac_cv_stdint_result" >&5
+$as_echo "make use of $ac_cv_header_stdint in $ac_stdint_h $ac_cv_stdint_result" >&6; }
 
+# ----------------- DONE inttypes.h checks START header -------------
+ac_config_commands="$ac_config_commands $ac_stdint_h"
 
 
 
+# Check for file locking. We (AC_PROG_CC?) have already checked for
+# sys/types.h and unistd.h.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fcntl file locking" >&5
+$as_echo_n "checking for fcntl file locking... " >&6; }
+if ${nettle_cv_fcntl_locking+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+#include <fcntl.h>
 
+int
+main ()
+{
 
+int op = F_SETLKW;
+struct flock fl;
 
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  nettle_cv_fcntl_locking=yes
+else
+  nettle_cv_fcntl_locking=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $nettle_cv_fcntl_locking" >&5
+$as_echo "$nettle_cv_fcntl_locking" >&6; }
 
 
+if test "x$nettle_cv_fcntl_locking" = "xyes" ; then
+  $as_echo "#define HAVE_FCNTL_LOCKING 1" >>confdefs.h
 
+fi
 
+# Checks for libraries
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __gmpz_getlimbn in -lgmp" >&5
+$as_echo_n "checking for __gmpz_getlimbn in -lgmp... " >&6; }
+if ${ac_cv_lib_gmp___gmpz_getlimbn+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lgmp  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char __gmpz_getlimbn ();
+int
+main ()
+{
+return __gmpz_getlimbn ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_gmp___gmpz_getlimbn=yes
+else
+  ac_cv_lib_gmp___gmpz_getlimbn=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gmp___gmpz_getlimbn" >&5
+$as_echo "$ac_cv_lib_gmp___gmpz_getlimbn" >&6; }
+if test "x$ac_cv_lib_gmp___gmpz_getlimbn" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBGMP 1
+_ACEOF
 
+  LIBS="-lgmp $LIBS"
 
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNU MP not found, or not 3.1 or up, see http://gmplib.org/.
+Support for public key algorithms will be unavailable." >&5
+$as_echo "$as_me: WARNING: GNU MP not found, or not 3.1 or up, see http://gmplib.org/.
+Support for public key algorithms will be unavailable." >&2;}
+    enable_public_key=no
+fi
 
 
+# Add -R flags needed to run programs linked with gmp
+if test $cross_compiling = no -a "x$RPATHFLAG" != x ; then
+  ac_success=no
+  if test "$cross_compiling" = yes; then :
+  :
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+int main(int argc, char **argv) { return 0; }
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  ac_success=yes
+else
+  ac_success=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
 
 
+  if test $ac_success = no ; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Running simple test program failed. Trying -R flags" >&5
+$as_echo_n "checking Running simple test program failed. Trying -R flags... " >&6; }
+    ac_remaining_dirs=''
+    ac_rpath_save_LDFLAGS="$LDFLAGS"
+    for d in $RPATH_CANDIDATE_DIRS ; do
+      if test $ac_success = yes ; then
+       ac_remaining_dirs="$ac_remaining_dirs $d"
+      else
+       LDFLAGS="$RPATHFLAG$d $LDFLAGS"
+       if test "$cross_compiling" = yes; then :
+  :
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+int main(int argc, char **argv) { return 0; }
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  ac_success=yes
+         ac_rpath_save_LDFLAGS="$LDFLAGS"
+         { $as_echo "$as_me:${as_lineno-$LINENO}: result: adding $RPATHFLAG$d" >&5
+$as_echo "adding $RPATHFLAG$d" >&6; }
 
+else
+  ac_remaining_dirs="$ac_remaining_dirs $d"
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
 
+       LDFLAGS="$ac_rpath_save_LDFLAGS"
+      fi
+    done
+    RPATH_CANDIDATE_DIRS=$ac_remaining_dirs
+  fi
+  if test $ac_success = no ; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
+$as_echo "failed" >&6; }
+  fi
+fi
 
 
+# Check for gmp limb size
+nettle_cv_gmp_numb_bits=0
+if test "$enable_public_key" = yes; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GMP limb size" >&5
+$as_echo_n "checking for GMP limb size... " >&6; }
+  if ac_fn_c_compute_int "$LINENO" "GMP_NUMB_BITS" "nettle_cv_gmp_numb_bits"        "#include <gmp.h>"; then :
 
-# Extract the first word of "m4", so it can be a program name with args.
-set dummy m4; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_M4+:} false; then :
-  $as_echo_n "(cached) " >&6
 else
-  case $M4 in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_M4="$M4" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_M4="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  test -z "$ac_cv_path_M4" && ac_cv_path_M4="m4"
-  ;;
-esac
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot find value of GMP_NUMB_BITS
+See \`config.log' for more details" "$LINENO" 5; }
 fi
-M4=$ac_cv_path_M4
-if test -n "$M4"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $M4" >&5
-$as_echo "$M4" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $nettle_cv_gmp_numb_bits bits" >&5
+$as_echo "$nettle_cv_gmp_numb_bits bits" >&6; }
 fi
 
+GMP_NUMB_BITS="$nettle_cv_gmp_numb_bits"
+
+
+
+ac_fn_c_check_func "$LINENO" "__gmpz_powm_sec" "ac_cv_func___gmpz_powm_sec"
+if test "x$ac_cv_func___gmpz_powm_sec" = xyes; then :
+  $as_echo "#define HAVE_MPZ_POWM_SEC 1" >>confdefs.h
+
+fi
 
 
 
@@ -7531,16 +7133,10 @@ else
   IF_STATIC='#'
 fi
 
-IF_DLOPEN_TEST='#'
 if test "x$enable_shared" = xyes ; then
   IF_SHARED=''
-  IF_NOT_SHARED='#'
-  if test "x$ac_cv_lib_dl_dlopen" = xyes ; then
-    IF_DLOPEN_TEST=''
-  fi
 else
   IF_SHARED='#'
-  IF_NOT_SHARED=''
 fi
 
 # Documentation tools
@@ -7605,15 +7201,6 @@ else
   IF_DOCUMENTATION='#'
 fi
 
-if test "x$enable_mini_gmp" = "xyes" ; then
-  IF_MINI_GMP=''
-else
-  IF_MINI_GMP='#'
-fi
-
-
-
-
 
 
 
@@ -7771,11 +7358,11 @@ if test x$GCC = xyes ; then
 # inttypes.h.
 fi
 
-ac_config_files="$ac_config_files config.make config.m4 Makefile version.h"
+ac_config_files="$ac_config_files config.make config.m4 Makefile"
 
 ac_config_files="$ac_config_files tools/Makefile testsuite/Makefile examples/Makefile"
 
-ac_config_files="$ac_config_files nettle.pc hogweed.pc libnettle.map libhogweed.map"
+ac_config_files="$ac_config_files nettle.pc hogweed.pc"
 
 
 cat >confcache <<\_ACEOF
@@ -8285,7 +7872,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by nettle $as_me 3.2, which was
+This file was extended by nettle $as_me 2.7.1, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -8355,7 +7942,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-nettle config.status 3.2
+nettle config.status 2.7.1
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
@@ -8473,6 +8060,8 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 #
 # INIT-COMMANDS
 #
+ asm_file_list="$asm_file_list"
+
 # variables for create stdint.h replacement
 PACKAGE="$PACKAGE"
 VERSION="$VERSION"
@@ -8502,21 +8091,18 @@ do
   case $ac_config_target in
     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
     "dummy-dep-files") CONFIG_COMMANDS="$CONFIG_COMMANDS dummy-dep-files" ;;
-    "$ac_stdint_h") CONFIG_COMMANDS="$CONFIG_COMMANDS $ac_stdint_h" ;;
     "$tmp_f") CONFIG_LINKS="$CONFIG_LINKS $tmp_f:$asm_dir/$tmp_f" ;;
-    "$tmp_n") CONFIG_LINKS="$CONFIG_LINKS $tmp_n:$asm_dir/$tmp_n" ;;
-    "$tmp_h") CONFIG_LINKS="$CONFIG_LINKS $tmp_h:$asm_dir/$tmp_h" ;;
+    "$tmp_o") CONFIG_LINKS="$CONFIG_LINKS $tmp_o:$asm_dir/$tmp_o" ;;
+    "asm.d") CONFIG_COMMANDS="$CONFIG_COMMANDS asm.d" ;;
+    "$ac_stdint_h") CONFIG_COMMANDS="$CONFIG_COMMANDS $ac_stdint_h" ;;
     "config.make") CONFIG_FILES="$CONFIG_FILES config.make" ;;
     "config.m4") CONFIG_FILES="$CONFIG_FILES config.m4" ;;
     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
-    "version.h") CONFIG_FILES="$CONFIG_FILES version.h" ;;
     "tools/Makefile") CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;;
     "testsuite/Makefile") CONFIG_FILES="$CONFIG_FILES testsuite/Makefile" ;;
     "examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;;
     "nettle.pc") CONFIG_FILES="$CONFIG_FILES nettle.pc" ;;
     "hogweed.pc") CONFIG_FILES="$CONFIG_FILES hogweed.pc" ;;
-    "libnettle.map") CONFIG_FILES="$CONFIG_FILES libnettle.map" ;;
-    "libhogweed.map") CONFIG_FILES="$CONFIG_FILES libhogweed.map" ;;
 
   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
   esac
@@ -9111,10 +8697,17 @@ $as_echo "$as_me: executing $ac_file commands" >&6;}
 
   case $ac_file$ac_mode in
     "dummy-dep-files":C) (cd "$srcdir" && find . '(' -name '*.c' -o -name '*.cxx' ')' -print) \
- | sed 's/\.cx*$//' | (while read f; do \
-      test -f "$f.o.d" || echo > "$f.o.d"; \
-   done)
+ | sed 's/\.c\(xx\)\{0,1\}$//' | (while read f; do echo > "$f.o.d"; echo > "$f.po.d"; done)
  ;;
+    "asm.d":C)  for f in $asm_file_list
+      do
+        case $f in
+         *.asm)
+           echo "`basename $f .asm`.s : $f "'$(srcdir)/asm.m4 machine.m4 config.m4'
+           ;;
+       esac
+      done > asm.d
+     ;;
     "$ac_stdint_h":C)
 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_stdint_h : $_ac_stdint_h" >&5
 $as_echo "$as_me: creating $ac_stdint_h : $_ac_stdint_h" >&6;}
@@ -9445,7 +9038,7 @@ typedef unsigned long uintmax_t;
 #define __intptr_t_defined
 /* we encourage using "long" to store pointer values, never use "int" ! */
 #if   _STDINT_LONG_MODEL+0 == 242 || _STDINT_LONG_MODEL+0 == 484
-typedef  unsigned int   uintptr_t;
+typedef  unsinged int   uintptr_t;
 typedef           int    intptr_t;
 #elif _STDINT_LONG_MODEL+0 == 244 || _STDINT_LONG_MODEL+0 == 444
 typedef  unsigned long  uintptr_t;
@@ -9549,7 +9142,6 @@ fi
   Static libraries:  ${enable_static}
   Shared libraries:  ${enable_shared}
   Public key crypto: ${enable_public_key}
-  Using mini-gmp:    ${enable_mini_gmp}
   Documentation:     ${enable_documentation}
 " >&5
 $as_echo "$as_me: summary of build options:
@@ -9564,6 +9156,5 @@ $as_echo "$as_me: summary of build options:
   Static libraries:  ${enable_static}
   Shared libraries:  ${enable_shared}
   Public key crypto: ${enable_public_key}
-  Using mini-gmp:    ${enable_mini_gmp}
   Documentation:     ${enable_documentation}
 " >&6;}