1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
|
])
;;
esac
AC_ARG_WITH(tls,
AS_HELP_STRING([--with-tls], [
enable TLS support using the specified library
(yes, gnutls, securetransport or no)]))
AS_IF([test x"$with_tls" = x""], [with_tls="yes"])
tls_support="no"
AS_IF([test x"$with_tls" = x"securetransport" \
-o x"$with_tls" = x"yes"], [
AC_CHECK_HEADERS(Security/SecureTransport.h, [
old_LIBS="$LIBS"
|
|
|
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
|
])
;;
esac
AC_ARG_WITH(tls,
AS_HELP_STRING([--with-tls], [
enable TLS support using the specified library
(yes, openssl, gnutls, securetransport or no)]))
AS_IF([test x"$with_tls" = x""], [with_tls="yes"])
tls_support="no"
AS_IF([test x"$with_tls" = x"securetransport" \
-o x"$with_tls" = x"yes"], [
AC_CHECK_HEADERS(Security/SecureTransport.h, [
old_LIBS="$LIBS"
|
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
|
AC_CHECK_FUNCS(SSLCreateContext)
], [])
LIBS="$old_LIBS"
])
])
AS_IF([test x"$with_tls" = x"gnutls" \
-o \( x"$with_tls" = x"yes" -a x"$tls_support" = x"no" \)], [
PKG_CHECK_MODULES(gnutls, [gnutls >= 3.5.0], [
AC_DEFINE(HAVE_GNUTLS, 1, [Whether we have GnuTLS])
tls_support="GnuTLS"
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
|
AC_CHECK_FUNCS(SSLCreateContext)
], [])
LIBS="$old_LIBS"
])
])
AS_IF([test x"$with_tls" = x"openssl" \
-o \( x"$with_tls" = x"yes" -a x"$tls_support" = x"no" \)], [
AC_CHECK_LIB(ssl, SSL_set1_host, [
AC_CHECK_HEADER(openssl/ssl.h, [
AC_DEFINE(HAVE_OPENSSL, 1,
[Whether we have OpenSSL])
tls_support="OpenSSL"
TLS_LIBS="-lssl -lcrypto $TLS_LIBS"
AC_SUBST(OF_OPENSSL_TLS_STREAM_M,
"OFOpenSSLTLSStream.m")
])
], [], [-lcrypto])
])
AS_IF([test x"$with_tls" = x"gnutls" \
-o \( x"$with_tls" = x"yes" -a x"$tls_support" = x"no" \)], [
PKG_CHECK_MODULES(gnutls, [gnutls >= 3.5.0], [
AC_DEFINE(HAVE_GNUTLS, 1, [Whether we have GnuTLS])
tls_support="GnuTLS"
|
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
|
AS_IF([test x"$build_framework" = x"yes"], [
AC_SUBST(OBJFWTLS_FRAMEWORK, "ObjFWTLS.framework")
])
])
AS_IF([test x"$with_tls" != x"no" -a x"$tls_support" = x"no"], [
AC_MSG_ERROR(m4_normalize([
No TLS implementation was found. Please install GnuTLS
or use --without-tls.
]))
])
AS_IF([test x"$enable_threads" != x"no"], [
AC_SUBST(OF_HTTP_CLIENT_TESTS_M, "OFHTTPClientTests.m")
])
|
|
|
|
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
|
AS_IF([test x"$build_framework" = x"yes"], [
AC_SUBST(OBJFWTLS_FRAMEWORK, "ObjFWTLS.framework")
])
])
AS_IF([test x"$with_tls" != x"no" -a x"$tls_support" = x"no"], [
AC_MSG_ERROR(m4_normalize([
No TLS implementation was found. Please install OpenSSL,
GnuTLS or use --without-tls.
]))
])
AS_IF([test x"$enable_threads" != x"no"], [
AC_SUBST(OF_HTTP_CLIENT_TESTS_M, "OFHTTPClientTests.m")
])
|