Ignore:
Timestamp:
Jan 10, 2017 9:17:07 AM (7 years ago)
Author:
riza
Message:

Re #1975:

  • Change autoconf detection in r5483 to compile time check.
  • Don't use tls1_ec_nid2curve_id()/tls1_ec_curve_id2nid() since they are not public API.

Thanks to Alexander Traud for the suggestions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/aconfigure

    r5509 r5517  
    642642ac_no_opencore_amrwb 
    643643ac_no_opencore_amrnb 
    644 ec_curve_present 
    645 set_curve_present 
    646644libcrypto_present 
    647645libssl_present 
    648646openssl_h_present 
    649 ac_ssl_has_sigalg 
    650 ac_ssl_has_ec 
    651647ac_ssl_has_aes_gcm 
    652648ac_no_ssl 
     
    760756oldincludedir 
    761757includedir 
     758runstatedir 
    762759localstatedir 
    763760sharedstatedir 
     
    882879sharedstatedir='${prefix}/com' 
    883880localstatedir='${prefix}/var' 
     881runstatedir='${localstatedir}/run' 
    884882includedir='${prefix}/include' 
    885883oldincludedir='/usr/include' 
     
    11341132    silent=yes ;; 
    11351133 
     1134  -runstatedir | --runstatedir | --runstatedi | --runstated \ 
     1135  | --runstate | --runstat | --runsta | --runst | --runs \ 
     1136  | --run | --ru | --r) 
     1137    ac_prev=runstatedir ;; 
     1138  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ 
     1139  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ 
     1140  | --run=* | --ru=* | --r=*) 
     1141    runstatedir=$ac_optarg ;; 
     1142 
    11361143  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) 
    11371144    ac_prev=sbindir ;; 
     
    12711278                datadir sysconfdir sharedstatedir localstatedir includedir \ 
    12721279                oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ 
    1273                 libdir localedir mandir 
     1280                libdir localedir mandir runstatedir 
    12741281do 
    12751282  eval ac_val=\$$ac_var 
     
    14241431  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com] 
    14251432  --localstatedir=DIR     modifiable single-machine data [PREFIX/var] 
     1433  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run] 
    14261434  --libdir=DIR            object code libraries [EPREFIX/lib] 
    14271435  --includedir=DIR        C header files [PREFIX/include] 
     
    23452353$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 
    23462354as_fn_error $? "failed to load site script $ac_site_file 
    2347 See \`config.log' for more details" "$LINENO" 5 ; } 
     2355See \`config.log' for more details" "$LINENO" 5; } 
    23482356  fi 
    23492357done 
     
    24882496case $ac_cv_build in 
    24892497*-*-*) ;; 
    2490 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;; 
     2498*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; 
    24912499esac 
    24922500build=$ac_cv_build 
     
    25212529case $ac_cv_host in 
    25222530*-*-*) ;; 
    2523 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;; 
     2531*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; 
    25242532esac 
    25252533host=$ac_cv_host 
     
    25542562case $ac_cv_target in 
    25552563*-*-*) ;; 
    2556 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5 ;; 
     2564*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; 
    25572565esac 
    25582566target=$ac_cv_target 
     
    28912899$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 
    28922900as_fn_error $? "no acceptable C compiler found in \$PATH 
    2893 See \`config.log' for more details" "$LINENO" 5 ; } 
     2901See \`config.log' for more details" "$LINENO" 5; } 
    28942902 
    28952903# Provide some information about the compiler. 
     
    30063014$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 
    30073015as_fn_error 77 "C compiler cannot create executables 
    3008 See \`config.log' for more details" "$LINENO" 5 ; } 
     3016See \`config.log' for more details" "$LINENO" 5; } 
    30093017else 
    30103018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 
     
    30493057$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 
    30503058as_fn_error $? "cannot compute suffix of executables: cannot compile and link 
    3051 See \`config.log' for more details" "$LINENO" 5 ; } 
     3059See \`config.log' for more details" "$LINENO" 5; } 
    30523060fi 
    30533061rm -f conftest conftest$ac_cv_exeext 
     
    31083116as_fn_error $? "cannot run C compiled programs. 
    31093117If you meant to cross compile, use \`--host'. 
    3110 See \`config.log' for more details" "$LINENO" 5 ; } 
     3118See \`config.log' for more details" "$LINENO" 5; } 
    31113119    fi 
    31123120  fi 
     
    31603168$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 
    31613169as_fn_error $? "cannot compute suffix of object files: cannot compile 
    3162 See \`config.log' for more details" "$LINENO" 5 ; } 
     3170See \`config.log' for more details" "$LINENO" 5; } 
    31633171fi 
    31643172rm -f conftest.$ac_cv_objext conftest.$ac_ext 
     
    45544562$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 
    45554563as_fn_error $? "C preprocessor \"$CPP\" fails sanity check 
    4556 See \`config.log' for more details" "$LINENO" 5 ; } 
     4564See \`config.log' for more details" "$LINENO" 5; } 
    45574565fi 
    45584566 
     
    50445052   *) 
    50455053     as_fn_error $? "unknown endianness 
    5046  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5  ;; 
     5054 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; 
    50475055 esac 
    50485056 
     
    76177625$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 
    76187626as_fn_error $? "Error: unable to recognize your IPP installation. Make sure the paths and ARCH suffix are set correctly, run with --help for more info 
    7619 See \`config.log' for more details" "$LINENO" 5 ; } 
     7627See \`config.log' for more details" "$LINENO" 5; } 
    76207628fi 
    76217629rm -f core conftest.err conftest.$ac_objext \ 
     
    76737681$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 
    76747682as_fn_error $? "Unable to find to find built binaries under $IPPSAMPLES/speech-codecs/{bin,_bin}. Have you built the IPP samples? 
    7675 See \`config.log' for more details" "$LINENO" 5 ; } 
     7683See \`config.log' for more details" "$LINENO" 5; } 
    76767684            fi 
    76777685        else 
     
    76797687$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 
    76807688as_fn_error $? "unable to find $IPPSAMPLES/speech-codecs/bin/*gcc*/lib or $IPPSAMPLES/speech-codecs/_bin/*gcc*/lib directory. Have you built the samples? 
    7681 See \`config.log' for more details" "$LINENO" 5 ; } 
     7689See \`config.log' for more details" "$LINENO" 5; } 
    76827690        fi 
    76837691 
     
    76877695$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 
    76887696as_fn_error $? "There's something wrong with this script, directory $IPPSAMP_DIR does not exist 
    7689 See \`config.log' for more details" "$LINENO" 5 ; } 
     7697See \`config.log' for more details" "$LINENO" 5; } 
    76907698            exit 1; 
    76917699        fi 
     
    77017709$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 
    77027710as_fn_error $? "bug in this script: unsupported IPP version 
    7703 See \`config.log' for more details" "$LINENO" 5 ; } 
     7711See \`config.log' for more details" "$LINENO" 5; } 
    77047712        fi 
    77057713 
     
    77087716$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 
    77097717as_fn_error $? "$IPPSAMP_LIBS doesn't exist in $IPPSAMP_DIR 
    7710 See \`config.log' for more details" "$LINENO" 5 ; } 
     7718See \`config.log' for more details" "$LINENO" 5; } 
    77117719        fi 
    77127720 
     
    77447752$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 
    77457753as_fn_error $? "no 
    7746 See \`config.log' for more details" "$LINENO" 5 ; } 
     7754See \`config.log' for more details" "$LINENO" 5; } 
    77477755fi 
    77487756rm -f core conftest.err conftest.$ac_objext \ 
     
    77897797 
    77907798ac_ssl_has_aes_gcm=0 
    7791  
    7792 ac_ssl_has_ec=0 
    7793  
    7794 ac_ssl_has_sigalg=0 
    77957799 
    77967800# Check whether --enable-ssl was given. 
     
    79557959$as_echo "OpenSSL AES GCM support not found, SRTP will only support AES CM cryptos" >&6; } 
    79567960                        fi 
    7957  
    7958                         # Check if OpenSSL supports setting curve algorithm 
    7959                         # and has elliptic curve 
    7960  
    7961                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking OpenSSL setting curve functions" >&5 
    7962 $as_echo_n "checking OpenSSL setting curve functions... " >&6; } 
    7963                         set_curve_present=0 
    7964  
    7965                         ec_curve_present=0 
    7966  
    7967                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext 
    7968 /* end confdefs.h.  */ 
    7969 #include <openssl/ssl.h> 
    7970  
    7971 int 
    7972 main () 
    7973 { 
    7974  SSL_set1_curves(NULL, NULL, 0); 
    7975  
    7976   ; 
    7977   return 0; 
    7978 } 
    7979 _ACEOF 
    7980 if ac_fn_c_try_link "$LINENO"; then : 
    7981    set_curve_present=1 
    7982                                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 
    7983 $as_echo "ok" >&6; } 
    7984  
    7985 else 
    7986  
    7987                                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 
    7988 $as_echo "no" >&6; } 
    7989  
    7990 fi 
    7991 rm -f core conftest.err conftest.$ac_objext \ 
    7992     conftest$ac_exeext conftest.$ac_ext 
    7993  
    7994                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EC_curve_nid2nist in -lssl" >&5 
    7995 $as_echo_n "checking for EC_curve_nid2nist in -lssl... " >&6; } 
    7996 if ${ac_cv_lib_ssl_EC_curve_nid2nist+:} false; then : 
    7997   $as_echo_n "(cached) " >&6 
    7998 else 
    7999   ac_check_lib_save_LIBS=$LIBS 
    8000 LIBS="-lssl  $LIBS" 
    8001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 
    8002 /* end confdefs.h.  */ 
    8003  
    8004 /* Override any GCC internal prototype to avoid an error. 
    8005    Use char because int might match the return type of a GCC 
    8006    builtin and then its argument prototype would still apply.  */ 
    8007 #ifdef __cplusplus 
    8008 extern "C" 
    8009 #endif 
    8010 char EC_curve_nid2nist (); 
    8011 int 
    8012 main () 
    8013 { 
    8014 return EC_curve_nid2nist (); 
    8015   ; 
    8016   return 0; 
    8017 } 
    8018 _ACEOF 
    8019 if ac_fn_c_try_link "$LINENO"; then : 
    8020   ac_cv_lib_ssl_EC_curve_nid2nist=yes 
    8021 else 
    8022   ac_cv_lib_ssl_EC_curve_nid2nist=no 
    8023 fi 
    8024 rm -f core conftest.err conftest.$ac_objext \ 
    8025     conftest$ac_exeext conftest.$ac_ext 
    8026 LIBS=$ac_check_lib_save_LIBS 
    8027 fi 
    8028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_EC_curve_nid2nist" >&5 
    8029 $as_echo "$ac_cv_lib_ssl_EC_curve_nid2nist" >&6; } 
    8030 if test "x$ac_cv_lib_ssl_EC_curve_nid2nist" = xyes; then : 
    8031   ec_curve_present=1 
    8032 fi 
    8033  
    8034                         if test "x$set_curve_present" = "x1" -a "x$ec_curve_present" = "x1"; then 
    8035                                 ac_ssl_has_ec=1 
    8036                                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenSSL has elliptic curve support" >&5 
    8037 $as_echo "OpenSSL has elliptic curve support" >&6; } 
    8038                         else 
    8039                                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenSSL elliptic curve algorithm unsupported" >&5 
    8040 $as_echo "OpenSSL elliptic curve algorithm unsupported" >&6; } 
    8041                         fi 
    8042  
    8043                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking OpenSSL setting sigalg" >&5 
    8044 $as_echo_n "checking OpenSSL setting sigalg... " >&6; } 
    8045                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext 
    8046 /* end confdefs.h.  */ 
    8047 #include <openssl/ssl.h> 
    8048  
    8049 int 
    8050 main () 
    8051 { 
    8052 SSL_set1_sigalgs_list(NULL, NULL); 
    8053  
    8054   ; 
    8055   return 0; 
    8056 } 
    8057 _ACEOF 
    8058 if ac_fn_c_try_link "$LINENO"; then : 
    8059    ac_ssl_has_sigalg=1 
    8060                                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 
    8061 $as_echo "ok" >&6; } 
    8062  
    8063 else 
    8064  
    8065                                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 
    8066 $as_echo "no" >&6; } 
    8067  
    8068 fi 
    8069 rm -f core conftest.err conftest.$ac_objext \ 
    8070     conftest$ac_exeext conftest.$ac_ext 
    80717961 
    80727962                        # PJSIP_HAS_TLS_TRANSPORT setting follows PJ_HAS_SSL_SOCK 
     
    94009290    "third_party/build/os-auto.mak") CONFIG_FILES="$CONFIG_FILES third_party/build/os-auto.mak" ;; 
    94019291 
    9402   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;; 
     9292  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; 
    94039293  esac 
    94049294done 
     
    97179607  case $ac_mode$ac_tag in 
    97189608  :[FHL]*:*);; 
    9719   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;; 
     9609  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; 
    97209610  :[FH]-) ac_tag=-:-;; 
    97219611  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; 
     
    97459635           *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; 
    97469636           esac || 
    9747            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;; 
     9637           as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; 
    97489638      esac 
    97499639      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac 
     
    97729662    case $ac_tag in 
    97739663    *:-:* | *:-) cat >"$ac_tmp/stdin" \ 
    9774       || as_fn_error $? "could not create $ac_file" "$LINENO" 5  ;; 
     9664      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; 
    97759665    esac 
    97769666    ;; 
Note: See TracChangeset for help on using the changeset viewer.