Ignore:
Timestamp:
Mar 25, 2019 1:33:12 AM (5 years ago)
Author:
ming
Message:

Fixed #2185: Darwin (Mac OS & iOS) native SSL backend

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/aconfigure.ac

    r5924 r5957  
    15421542dnl # SSL alt prefix 
    15431543AC_ARG_WITH(ssl, 
    1544     AS_HELP_STRING([--with-ssl=DIR], 
    1545                    [Specify alternate SSL library prefix. This option will try 
    1546                     to find OpenSSL first, then if not found, GnuTLS. To skip 
    1547                     OpenSSL finding, use --with-gnutls option instead.]), 
     1544    AS_HELP_STRING([--with-ssl=SSL_BACKEND/DIR], 
     1545                   [Specify alternate SSL library prefix or SSL native-backend. 
     1546                    You can specify "darwin" as the native iOS/MacOS backend 
     1547                    using Security framework, or you can specify an alternate 
     1548                    SSL library prefix directory. If a directory 
     1549                    is specified, this option will try to find OpenSSL first, 
     1550                    then if not found, GnuTLS. To skip OpenSSL finding, use 
     1551                    --with-gnutls option instead.]), 
    15481552    [], 
    15491553    [with_ssl=no] 
     
    15781582              ], 
    15791583              [ 
    1580                 if test "x$with_ssl" != "xno" -a "x$with_ssl" != "x"; then 
     1584                if test "x$with_ssl" = "xdarwin"; then 
     1585                    SAVED_LIBS="$LIBS" 
     1586                    LIBS="-framework Security" 
     1587                    AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [])], 
     1588                                   [ac_ssl_backend=darwin],) 
     1589                    LIBS="$SAVED_LIBS" 
     1590                    if test "x$ac_ssl_backend" = "xdarwin"; then 
     1591                        AC_DEFINE(PJ_HAS_SSL_SOCK, 1) 
     1592                        AC_DEFINE(PJ_SSL_SOCK_IMP, PJ_SSL_SOCK_IMP_DARWIN) 
     1593                        LIBS="$LIBS -framework Security" 
     1594                        ac_ssl_backend="darwin" 
     1595                        AC_MSG_RESULT([Checking if Security framework for Darwin SSL is available... yes]) 
     1596                    else 
     1597                        AC_MSG_RESULT([Checking if Security framework for Darwin SSL is available... no]) 
     1598                    fi 
     1599                fi 
     1600                 
     1601                if test "x$ac_ssl_backend" = "x" -a "x$with_ssl" != "xno" -a "x$with_ssl" != "x"; then 
    15811602                    CFLAGS="$CFLAGS -I$with_ssl/include" 
    15821603                    CPPFLAGS="$CPPFLAGS -I$with_ssl/include" 
     
    15851606                fi 
    15861607 
    1587                 if test "x$with_gnutls" = "xno"; then 
     1608                if test "x$ac_ssl_backend" = "x" -a "x$with_gnutls" = "xno"; then 
    15881609 
    15891610                    AC_MSG_RESULT([checking for OpenSSL installations..]) 
Note: See TracChangeset for help on using the changeset viewer.