diff options
author | Steve Bennett <steveb@workware.net.au> | 2016-08-29 09:58:11 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2016-08-29 09:58:32 +1000 |
commit | 5dd45e7baf34854b588dd77553f000fd111d0ed0 (patch) | |
tree | b8a501f5b58593170c6aa53d2c8c1bc3ac7232a8 /auto.def | |
parent | d24ed2e51f0476bd4bacc18076a495f28474c29a (diff) | |
download | jimtcl-5dd45e7baf34854b588dd77553f000fd111d0ed0.zip jimtcl-5dd45e7baf34854b588dd77553f000fd111d0ed0.tar.gz jimtcl-5dd45e7baf34854b588dd77553f000fd111d0ed0.tar.bz2 |
configure: Use pkg-config to find openssl/libssl
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'auto.def')
-rw-r--r-- | auto.def | 26 |
1 files changed, 20 insertions, 6 deletions
@@ -191,12 +191,26 @@ if {[opt-bool ipv6 full]} { define JIM_IPV6 } if {[opt-bool ssl full]} { - if {[cc-check-includes openssl/ssl.h] && [cc-check-function-in-lib ERR_error_string crypto] && [cc-check-function-in-lib TLSv1_2_method ssl]} { - msg-result "Enabling SSL" - define JIM_SSL - define-append LDLIBS [get-define lib_ERR_error_string] [get-define lib_TLSv1_2_method] - } elseif {[opt-bool ssl]} { - user-error "SSL support requires OpenSSL" + if {[pkg-config-init 0]} { + foreach pkg {openssl libssl} { + if {[pkg-config $pkg]} { + define JIM_SSL + define-append LDLIBS [pkg-config-get $pkg LIBS] + define-append LDFLAGS [pkg-config-get $pkg LDFLAGS] + define-append CCOPTS [pkg-config-get $pkg CFLAGS] + msg-result "Enabling SSL ($pkg)" + break + } + } + } + if {![is-defined JIM_SSL]} { + if {[cc-check-includes openssl/ssl.h] && [cc-check-function-in-lib ERR_error_string crypto] && [cc-check-function-in-lib TLSv1_2_method ssl]} { + msg-result "Enabling SSL" + define JIM_SSL + define-append LDLIBS [get-define lib_ERR_error_string] [get-define lib_TLSv1_2_method] + } elseif {[opt-bool ssl]} { + user-error "SSL support requires OpenSSL" + } } } if {[opt-bool lineedit full]} { |