Changeset 6018


Ignore:
Timestamp:
May 31, 2019 5:03:21 AM (5 years ago)
Author:
ming
Message:

Re #2185: Modified the autodetection in configure script to try to compile a sample code instead.

Location:
pjproject/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/aconfigure

    r5959 r6018  
    79567956                    SAVED_LIBS="$LIBS" 
    79577957                    LIBS="-framework Security" 
    7958                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext 
     7958                    cat confdefs.h - <<_ACEOF >conftest.$ac_ext 
    79597959/* end confdefs.h.  */ 
    7960  
     7960#include <Security/SecureTransport.h> 
    79617961int 
    79627962main () 
    79637963{ 
    7964  
     7964if (__builtin_available(macOS 10.3, iOS 11.3, *)) { 
     7965                             SSLContextRef ssl_ctx; 
     7966                             SSLReHandshake(ssl_ctx); 
     7967                         } 
    79657968  ; 
    79667969  return 0; 
    79677970} 
    79687971_ACEOF 
    7969 if ac_fn_c_try_link "$LINENO"; then : 
     7972if ac_fn_c_try_compile "$LINENO"; then : 
    79707973  ac_ssl_backend=darwin 
    79717974fi 
    7972 rm -f core conftest.err conftest.$ac_objext \ 
    7973     conftest$ac_exeext conftest.$ac_ext 
     7975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 
    79747976                    LIBS="$SAVED_LIBS" 
    79757977                    if test "x$ac_ssl_backend" = "xdarwin"; then 
  • pjproject/trunk/aconfigure.ac

    r5959 r6018  
    15791579                    SAVED_LIBS="$LIBS" 
    15801580                    LIBS="-framework Security" 
    1581                     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [])], 
    1582                                    [ac_ssl_backend=darwin],) 
     1581                    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <Security/SecureTransport.h>]], 
     1582                        [if (__builtin_available(macOS 10.12, iOS 10.0, *)) { 
     1583                             SSLContextRef ssl_ctx; 
     1584                             SSLReHandshake(ssl_ctx); 
     1585                         }])], 
     1586                        [ac_ssl_backend=darwin],) 
    15831587                    LIBS="$SAVED_LIBS" 
    15841588                    if test "x$ac_ssl_backend" = "xdarwin"; then 
     
    15861590                        AC_DEFINE(PJ_SSL_SOCK_IMP, PJ_SSL_SOCK_IMP_DARWIN) 
    15871591                        LIBS="$LIBS -framework Security" 
    1588                         AC_MSG_RESULT([Checking if Security framework for Darwin SSL is available... yes]) 
     1592                        AC_MSG_RESULT([Checking if Darwin SSL is available... yes]) 
    15891593                    else 
    1590                         AC_MSG_RESULT([Checking if Security framework for Darwin SSL is available... no]) 
     1594                        AC_MSG_RESULT([Checking if Darwin SSL is available... no]) 
    15911595                    fi 
    15921596                    ;; 
Note: See TracChangeset for help on using the changeset viewer.