Fossil

Check-in [08918fab]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Further refinements to permit OpenSSL in tree to work consistently.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | mingwConfigure
Files: files | file ages | folders
SHA1: 08918fabc735c81d963941dab653fe9d5520eaa6
User & Date: mistachkin 2016-01-16 22:51:04
Context
2016-01-18
03:11
Update change log. Closed-Leaf check-in: 853a2285 user: mistachkin tags: mingwConfigure
2016-01-16
22:51
Further refinements to permit OpenSSL in tree to work consistently. check-in: 08918fab user: mistachkin tags: mingwConfigure
22:25
Fix use of linenoise. Fine-tune check for in-tree OpenSSL. check-in: 54307c4d user: mistachkin tags: mingwConfigure
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to auto.def.

228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
...
307
308
309
310
311
312
313

314
315
316
317
318
319
320
321
...
341
342
343
344
345
346
347



348

349
350
351
352
353
354
355
    }
    define-append EXTRA_CFLAGS $cflags
    define-append EXTRA_LDFLAGS $tclconfig(TCL_LD_FLAGS)
    define FOSSIL_ENABLE_TCL
}

# Helper for OpenSSL checking
proc check-for-openssl {msg {cflags {}}} {
    msg-checking "Checking for $msg..."
    set rc 0
    set libs {-lssl -lcrypto}
    if {[is_mingw]} {
        lappend libs -lgdi32 -lwsock32
    }
    if {[info exists ::zlib_for_ssl]} {
        lappend libs $::zlib_for_ssl
    }
    msg-quiet cc-with [list -cflags $cflags -libs $libs] {
................................................................................
        set ssldir [file dirname $autosetup(dir)]/compat/openssl
        if {![file isdirectory $ssldir]} {
            user-error "The OpenSSL in source tree directory does not exist"
        }
        set msg "ssl in $ssldir"
        set cflags "-I$ssldir/include"
        set ldflags "-L$ssldir"

        set found [check-for-openssl "ssl in source tree" "$cflags $ldflags"]
    } else {
        if {$ssldirs in {auto ""}} {
            catch {
                set cflags [exec pkg-config openssl --cflags-only-I]
                set ldflags [exec pkg-config openssl --libs-only-L]
                set found [check-for-openssl "ssl via pkg-config" "$cflags $ldflags"]
            } msg
................................................................................
            }
        }
    }
    if {$found} {
        define FOSSIL_ENABLE_SSL
        define-append EXTRA_CFLAGS $cflags
        define-append EXTRA_LDFLAGS $ldflags



        define-append LIBS -lssl -lcrypto

        if {[is_mingw]} {
            define-append LIBS -lgdi32 -lwsock32
        }
        msg-result "HTTPS support enabled"

        # Silence OpenSSL deprecation warnings on Mac OS X 10.7.
        if {[string match *-darwin* [get-define host]]} {







|


<







 







>
|







 







>
>
>
|
>







228
229
230
231
232
233
234
235
236
237

238
239
240
241
242
243
244
...
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
...
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
    }
    define-append EXTRA_CFLAGS $cflags
    define-append EXTRA_LDFLAGS $tclconfig(TCL_LD_FLAGS)
    define FOSSIL_ENABLE_TCL
}

# Helper for OpenSSL checking
proc check-for-openssl {msg {cflags {}} {libs {-lssl -lcrypto}}} {
    msg-checking "Checking for $msg..."
    set rc 0

    if {[is_mingw]} {
        lappend libs -lgdi32 -lwsock32
    }
    if {[info exists ::zlib_for_ssl]} {
        lappend libs $::zlib_for_ssl
    }
    msg-quiet cc-with [list -cflags $cflags -libs $libs] {
................................................................................
        set ssldir [file dirname $autosetup(dir)]/compat/openssl
        if {![file isdirectory $ssldir]} {
            user-error "The OpenSSL in source tree directory does not exist"
        }
        set msg "ssl in $ssldir"
        set cflags "-I$ssldir/include"
        set ldflags "-L$ssldir"
        set ssllibs "$ssldir/libssl.a $ssldir/libcrypto.a"
        set found [check-for-openssl "ssl in source tree" "$cflags $ldflags" $ssllibs]
    } else {
        if {$ssldirs in {auto ""}} {
            catch {
                set cflags [exec pkg-config openssl --cflags-only-I]
                set ldflags [exec pkg-config openssl --libs-only-L]
                set found [check-for-openssl "ssl via pkg-config" "$cflags $ldflags"]
            } msg
................................................................................
            }
        }
    }
    if {$found} {
        define FOSSIL_ENABLE_SSL
        define-append EXTRA_CFLAGS $cflags
        define-append EXTRA_LDFLAGS $ldflags
        if {[info exists ssllibs]} {
            define-append LIBS $ssllibs
        } else {
            define-append LIBS -lssl -lcrypto
        }
        if {[is_mingw]} {
            define-append LIBS -lgdi32 -lwsock32
        }
        msg-result "HTTPS support enabled"

        # Silence OpenSSL deprecation warnings on Mac OS X 10.7.
        if {[string match *-darwin* [get-define host]]} {