Changeset 5725 for pjproject/trunk/aconfigure.ac
- Timestamp:
- Jan 15, 2018 8:52:29 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/aconfigure.ac
r5679 r5725 1542 1542 AC_ARG_WITH(ssl, 1543 1543 AS_HELP_STRING([--with-ssl=DIR], 1544 [Specify alternate libssl prefix]), 1544 [Specify alternate SSL library prefix. This option will try 1545 to find OpenSSL first, then if not found, GnuTLS. To skip 1546 OpenSSL finding, use --with-gnutls option instead.]), 1545 1547 [], 1546 1548 [with_ssl=no] 1547 1549 ) 1548 1550 1551 dnl # GnuTLS alt prefix 1552 AC_ARG_WITH(gnutls, 1553 AS_HELP_STRING([--with-gnutls=DIR], 1554 [Specify alternate GnuTLS prefix]), 1555 [], 1556 [with_gnutls=no] 1557 ) 1558 1549 1559 dnl # Do not use default SSL installation if we are cross-compiling 1550 if test "x$ac_cross_compile" != "x" -a "x$with_ssl" = "xno" ; then1560 if test "x$ac_cross_compile" != "x" -a "x$with_ssl" = "xno" -a "x$with_gnutls" = "xno"; then 1551 1561 enable_ssl=no 1552 1562 fi … … 1555 1565 AC_SUBST(ac_no_ssl) 1556 1566 AC_SUBST(ac_ssl_has_aes_gcm,0) 1567 AC_SUBST(ac_ssl_backend) 1557 1568 AC_ARG_ENABLE(ssl, 1558 1569 AS_HELP_STRING([--disable-ssl], … … 1566 1577 ], 1567 1578 [ 1568 AC_MSG_RESULT([checking for OpenSSL installations..])1569 1579 if test "x$with_ssl" != "xno" -a "x$with_ssl" != "x"; then 1570 1580 CFLAGS="$CFLAGS -I$with_ssl/include" … … 1572 1582 AC_MSG_RESULT([Using SSL prefix... $with_ssl]) 1573 1583 fi 1574 AC_SUBST(openssl_h_present) 1575 AC_SUBST(libssl_present) 1576 AC_SUBST(libcrypto_present) 1577 AC_CHECK_HEADER(openssl/ssl.h,[openssl_h_present=1]) 1578 AC_CHECK_LIB(crypto,ERR_load_BIO_strings,[libcrypto_present=1 && LIBS="-lcrypto $LIBS"]) 1579 AC_CHECK_LIB(ssl,SSL_CTX_new,[libssl_present=1 && LIBS="-lssl $LIBS"]) 1580 if test "x$openssl_h_present" = "x1" -a "x$libssl_present" = "x1" -a "x$libcrypto_present" = "x1"; then 1584 1585 if test "x$with_gnutls" = "xno"; then 1586 1587 AC_MSG_RESULT([checking for OpenSSL installations..]) 1588 AC_SUBST(openssl_h_present) 1589 AC_SUBST(libssl_present) 1590 AC_SUBST(libcrypto_present) 1591 AC_CHECK_HEADER(openssl/ssl.h,[openssl_h_present=1]) 1592 AC_CHECK_LIB(crypto,ERR_load_BIO_strings,[libcrypto_present=1 && LIBS="-lcrypto $LIBS"]) 1593 AC_CHECK_LIB(ssl,SSL_CTX_new,[libssl_present=1 && LIBS="-lssl $LIBS"]) 1594 if test "x$openssl_h_present" = "x1" -a "x$libssl_present" = "x1" -a "x$libcrypto_present" = "x1"; then 1581 1595 AC_MSG_RESULT([OpenSSL library found, SSL support enabled]) 1582 1596 … … 1599 1613 #AC_DEFINE(PJSIP_HAS_TLS_TRANSPORT, 1) 1600 1614 AC_DEFINE(PJ_HAS_SSL_SOCK, 1) 1601 else 1602 AC_MSG_RESULT([** OpenSSL libraries not found, disabling SSL support **]) 1615 AC_DEFINE(PJ_SSL_SOCK_IMP, PJ_SSL_SOCK_IMP_OPENSSL) 1616 ac_ssl_backend="openssl" 1617 else 1618 AC_MSG_RESULT([** OpenSSL libraries not found **]) 1619 fi 1620 1603 1621 fi 1622 1623 if test "x$ac_ssl_backend" = "x"; then 1624 1625 if test "x$with_gnutls" != "xno" -a "x$with_gnutls" != "x"; then 1626 CFLAGS="$CFLAGS -I$with_gnutls/include" 1627 LDFLAGS="$LDFLAGS -L$with_gnutls/lib" 1628 AC_MSG_RESULT([Using GnuTLS prefix... $with_gnutls]) 1629 fi 1630 1631 AC_CHECK_PROGS(PKG_CONFIG, 1632 $host-pkg-config pkg-config "python pkgconfig.py", 1633 none) 1634 AC_MSG_RESULT([checking for GnuTLS installations..]) 1635 AC_SUBST(gnutls_h_present) 1636 AC_SUBST(libgnutls_present) 1637 AC_CHECK_HEADER(gnutls/gnutls.h, [gnutls_h_present=1]) 1638 1639 if test "$PKG_CONFIG" != "none"; then 1640 if $PKG_CONFIG --exists gnutls; then 1641 LIBS="$LIBS `$PKG_CONFIG --libs gnutls`" 1642 libgnutls_present=1 1643 else 1644 AC_CHECK_LIB(gnutls, 1645 gnutls_certificate_set_x509_system_trust, 1646 [libgnutls_present=1 && 1647 LIBS="$LIBS -lgnutls"]) 1648 fi 1649 else 1650 AC_MSG_RESULT([*** Warning: neither pkg-config nor python is available, disabling gnutls. ***]) 1651 fi 1652 1653 if test "x$gnutls_h_present" = "x1" -a "x$libgnutls_present" = "x1"; then 1654 AC_MSG_RESULT([GnuTLS library found, SSL support enabled]) 1655 AC_DEFINE(PJ_HAS_SSL_SOCK, 1) 1656 AC_DEFINE(PJ_SSL_SOCK_IMP, PJ_SSL_SOCK_IMP_GNUTLS) 1657 ac_ssl_backend="gnutls" 1658 else 1659 AC_MSG_RESULT([** No GnuTLS libraries found, disabling SSL support **]) 1660 fi 1661 1662 fi 1604 1663 ]) 1605 1664
Note: See TracChangeset
for help on using the changeset viewer.