Commit ae0d08c8 authored by Kalle Olavi Niemitalo's avatar Kalle Olavi Niemitalo Committed by Niels Möller
Browse files

* bignum.h: Fix tests for gmp2/gmp.h (patches from Kalle Olavi

Niemitalo <tosi@ees2.oulu.fi>).

Rev: src/bignum.h:1.12
Rev: src/configure.in:1.23
parent 182cc1f2
...@@ -32,8 +32,8 @@ ...@@ -32,8 +32,8 @@
/* Needed for the declaration of mpz_out_str */ /* Needed for the declaration of mpz_out_str */
#include <stdio.h> #include <stdio.h>
#ifdef HAVE_GMP2_H #ifdef HAVE_GMP2_GMP_H
#include <gmp2.h> #include <gmp2/gmp.h>
#else #else
#ifdef HAVE_GMP_H #ifdef HAVE_GMP_H
#include <gmp.h> #include <gmp.h>
...@@ -42,8 +42,6 @@ ...@@ -42,8 +42,6 @@
#endif #endif
#endif #endif
#include <gmp.h>
void bignum_parse_s(mpz_t n, UINT32 length, UINT8 *data); void bignum_parse_s(mpz_t n, UINT32 length, UINT8 *data);
void bignum_parse_u(mpz_t n, UINT32 length, UINT8 *data); void bignum_parse_u(mpz_t n, UINT32 length, UINT8 *data);
......
...@@ -88,10 +88,13 @@ dnl Checks for header files. ...@@ -88,10 +88,13 @@ dnl Checks for header files.
AC_HEADER_STDC AC_HEADER_STDC
dnl Some debian systems have both gmp and gmp2. dnl Some debian systems have both gmp and gmp2.
dnl This will probably not not work right if both gmp.h and gmp2.h exists, dnl This will probably not work right if both gmp.h and gmp2/gmp.h exists,
dnl and gmp.h is too old (i.e GMP-1.x). dnl and gmp.h is too old (i.e GMP-1.x).
AC_CHECK_HEADERS(gmp.h gmp2.h, [break], gmp_header_found=no
[AC_ERROR([Neither gmp.h nor gmp2.h found])]) AC_CHECK_HEADERS(gmp.h gmp2/gmp.h, [gmp_header_found=yes; break])
if test "$gmp_header_found" = no; then
AC_ERROR([Neither gmp.h nor gmp2/gmp.h found])
fi
AC_CHECK_HEADERS(fcntl.h strings.h sys/time.h unistd.h) AC_CHECK_HEADERS(fcntl.h strings.h sys/time.h unistd.h)
AC_CHECK_HEADERS(shadow.h) AC_CHECK_HEADERS(shadow.h)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment