|
@@ -429,7 +429,7 @@ AC_CHECK_FUNCS(
|
|
# checks. So we should only probe for those functions if we are sure that we
|
|
# checks. So we should only probe for those functions if we are sure that we
|
|
# are not targetting OSX 10.11 or earlier.
|
|
# are not targetting OSX 10.11 or earlier.
|
|
AC_MSG_CHECKING([for a pre-Sierra OSX build target])
|
|
AC_MSG_CHECKING([for a pre-Sierra OSX build target])
|
|
-AC_TRY_COMPILE([
|
|
|
|
|
|
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
#ifdef __APPLE__
|
|
#ifdef __APPLE__
|
|
# include <AvailabilityMacros.h>
|
|
# include <AvailabilityMacros.h>
|
|
# ifndef MAC_OS_X_VERSION_10_12
|
|
# ifndef MAC_OS_X_VERSION_10_12
|
|
@@ -441,7 +441,7 @@ AC_TRY_COMPILE([
|
|
# endif
|
|
# endif
|
|
# endif
|
|
# endif
|
|
#endif
|
|
#endif
|
|
-], [],
|
|
|
|
|
|
+]], [[]])],
|
|
[on_macos_pre_10_12=no ; AC_MSG_RESULT([no])],
|
|
[on_macos_pre_10_12=no ; AC_MSG_RESULT([no])],
|
|
[on_macos_pre_10_12=yes; AC_MSG_RESULT([yes])])
|
|
[on_macos_pre_10_12=yes; AC_MSG_RESULT([yes])])
|
|
|
|
|
|
@@ -640,16 +640,16 @@ LIBS="$TOR_OPENSSL_LIBS $LIBS"
|
|
LDFLAGS="$TOR_LDFLAGS_openssl $LDFLAGS"
|
|
LDFLAGS="$TOR_LDFLAGS_openssl $LDFLAGS"
|
|
CPPFLAGS="$TOR_CPPFLAGS_openssl $CPPFLAGS"
|
|
CPPFLAGS="$TOR_CPPFLAGS_openssl $CPPFLAGS"
|
|
|
|
|
|
-AC_TRY_COMPILE([
|
|
|
|
|
|
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
#include <openssl/opensslv.h>
|
|
#include <openssl/opensslv.h>
|
|
#if !defined(LIBRESSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER < 0x1000100fL
|
|
#if !defined(LIBRESSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER < 0x1000100fL
|
|
#error "too old"
|
|
#error "too old"
|
|
#endif
|
|
#endif
|
|
- ], [],
|
|
|
|
|
|
+ ]], [[]])],
|
|
[ : ],
|
|
[ : ],
|
|
- [ AC_ERROR([OpenSSL is too old. We require 1.0.1 or later. You can specify a path to a newer one with --with-openssl-dir.]) ])
|
|
|
|
|
|
+ [ AC_MSG_ERROR([OpenSSL is too old. We require 1.0.1 or later. You can specify a path to a newer one with --with-openssl-dir.]) ])
|
|
|
|
|
|
-AC_TRY_COMPILE([
|
|
|
|
|
|
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
#include <openssl/opensslv.h>
|
|
#include <openssl/opensslv.h>
|
|
#include <openssl/evp.h>
|
|
#include <openssl/evp.h>
|
|
#if defined(OPENSSL_NO_EC) || defined(OPENSSL_NO_ECDH) || defined(OPENSSL_NO_ECDSA)
|
|
#if defined(OPENSSL_NO_EC) || defined(OPENSSL_NO_ECDH) || defined(OPENSSL_NO_ECDSA)
|
|
@@ -658,9 +658,9 @@ AC_TRY_COMPILE([
|
|
#if !defined(NID_X9_62_prime256v1) || !defined(NID_secp224r1)
|
|
#if !defined(NID_X9_62_prime256v1) || !defined(NID_secp224r1)
|
|
#error "curves unavailable"
|
|
#error "curves unavailable"
|
|
#endif
|
|
#endif
|
|
- ], [],
|
|
|
|
|
|
+ ]], [[]])],
|
|
[ : ],
|
|
[ : ],
|
|
- [ AC_ERROR([OpenSSL is built without full ECC support, including curves P256 and P224. You can specify a path to one with ECC support with --with-openssl-dir.]) ])
|
|
|
|
|
|
+ [ AC_MSG_ERROR([OpenSSL is built without full ECC support, including curves P256 and P224. You can specify a path to one with ECC support with --with-openssl-dir.]) ])
|
|
|
|
|
|
AC_CHECK_MEMBERS([struct ssl_method_st.get_cipher_by_char], , ,
|
|
AC_CHECK_MEMBERS([struct ssl_method_st.get_cipher_by_char], , ,
|
|
[#include <openssl/ssl.h>
|
|
[#include <openssl/ssl.h>
|
|
@@ -1465,9 +1465,9 @@ AC_CHECK_FUNC(gethostbyname_r, [
|
|
AC_MSG_CHECKING([how many arguments gethostbyname_r() wants])
|
|
AC_MSG_CHECKING([how many arguments gethostbyname_r() wants])
|
|
OLD_CFLAGS=$CFLAGS
|
|
OLD_CFLAGS=$CFLAGS
|
|
CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
|
|
CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
|
|
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
|
|
|
|
|
|
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
#include <netdb.h>
|
|
#include <netdb.h>
|
|
- ], [[
|
|
|
|
|
|
+ ]], [[
|
|
char *cp1, *cp2;
|
|
char *cp1, *cp2;
|
|
struct hostent *h1, *h2;
|
|
struct hostent *h1, *h2;
|
|
int i1, i2;
|
|
int i1, i2;
|
|
@@ -1478,27 +1478,27 @@ AC_CHECK_FUNC(gethostbyname_r, [
|
|
[Define this if gethostbyname_r takes 6 arguments])
|
|
[Define this if gethostbyname_r takes 6 arguments])
|
|
AC_MSG_RESULT(6)
|
|
AC_MSG_RESULT(6)
|
|
], [
|
|
], [
|
|
- AC_TRY_COMPILE([
|
|
|
|
|
|
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
#include <netdb.h>
|
|
#include <netdb.h>
|
|
- ], [
|
|
|
|
|
|
+ ]], [[
|
|
char *cp1, *cp2;
|
|
char *cp1, *cp2;
|
|
struct hostent *h1;
|
|
struct hostent *h1;
|
|
int i1, i2;
|
|
int i1, i2;
|
|
(void)gethostbyname_r(cp1,h1,cp2,i1,&i2);
|
|
(void)gethostbyname_r(cp1,h1,cp2,i1,&i2);
|
|
- ], [
|
|
|
|
|
|
+ ]])], [
|
|
AC_DEFINE(HAVE_GETHOSTBYNAME_R)
|
|
AC_DEFINE(HAVE_GETHOSTBYNAME_R)
|
|
AC_DEFINE(HAVE_GETHOSTBYNAME_R_5_ARG, 1,
|
|
AC_DEFINE(HAVE_GETHOSTBYNAME_R_5_ARG, 1,
|
|
[Define this if gethostbyname_r takes 5 arguments])
|
|
[Define this if gethostbyname_r takes 5 arguments])
|
|
AC_MSG_RESULT(5)
|
|
AC_MSG_RESULT(5)
|
|
], [
|
|
], [
|
|
- AC_TRY_COMPILE([
|
|
|
|
|
|
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
#include <netdb.h>
|
|
#include <netdb.h>
|
|
- ], [
|
|
|
|
|
|
+ ]], [[
|
|
char *cp1;
|
|
char *cp1;
|
|
struct hostent *h1;
|
|
struct hostent *h1;
|
|
struct hostent_data hd;
|
|
struct hostent_data hd;
|
|
(void) gethostbyname_r(cp1,h1,&hd);
|
|
(void) gethostbyname_r(cp1,h1,&hd);
|
|
- ], [
|
|
|
|
|
|
+ ]])], [
|
|
AC_DEFINE(HAVE_GETHOSTBYNAME_R)
|
|
AC_DEFINE(HAVE_GETHOSTBYNAME_R)
|
|
AC_DEFINE(HAVE_GETHOSTBYNAME_R_3_ARG, 1,
|
|
AC_DEFINE(HAVE_GETHOSTBYNAME_R_3_ARG, 1,
|
|
[Define this if gethostbyname_r takes 3 arguments])
|
|
[Define this if gethostbyname_r takes 3 arguments])
|