85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
|
}
if {![cc-check-includes zlib.h] || ![cc-check-function-in-lib inflateEnd z]} {
user-error "zlib not found please install it or specify the location with --with-zlib"
}
set tclpath [opt-val with-tcl]
if {$tclpath ne ""} {
if {$tclpath ne "1"} {
cc-with [list -cflags [list -I$tclpath/include -L$tclpath/lib]]
}
if {![cc-check-includes tcl.h]} {
user-error "Cannot find tcl.h"
}
if {[cc-check-function-in-lib Tcl_CreateInterp {tcl8.6 tcl8.5 tcl}]} {
define-append LIBS [get-define lib_Tcl_CreateInterp]
} else {
user-error "Cannot find a usable libtcl"
}
define FOSSIL_ENABLE_TCL
if {$tclpath ne "1"} {
define-append EXTRA_CFLAGS -I$tclpath/include
define-append EXTRA_LDFLAGS -L$tclpath/lib
}
}
# Helper for openssl checking
proc check-for-openssl {msg {cflags {}}} {
msg-checking "Checking for $msg..."
set rc 0
msg-quiet cc-with [list -cflags $cflags -libs {-lssl -lcrypto}] {
|
>
|
>
>
>
>
>
|
|
|
<
>
>
>
|
<
|
|
>
>
>
|
<
|
|
|
>
|
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
|
}
if {![cc-check-includes zlib.h] || ![cc-check-function-in-lib inflateEnd z]} {
user-error "zlib not found please install it or specify the location with --with-zlib"
}
set tclpath [opt-val with-tcl]
if {$tclpath ne ""} {
# Note parse-tclconfig-sh is in autosetup/local.tcl
if {$tclpath eq "1"} {
# Use the system Tcl. Look in some likely places.
array set tclconfig [parse-tclconfig-sh /usr /usr/local /usr/share /opt/local]
set msg "on your system"
} else {
array set tclconfig [parse-tclconfig-sh $tclpath]
set msg "at $tclpath"
}
if {![info exists tclconfig(TCL_INCLUDE_SPEC)]} {
user-error "Cannot find Tcl $msg"
}
set cflags $tclconfig(TCL_INCLUDE_SPEC)
set libs "$tclconfig(TCL_LIB_SPEC) $tclconfig(TCL_LIBS)"
cc-with [list -cflags $cflags -libs $libs] {
if {![cc-check-functions Tcl_CreateInterp]} {
user-error "Cannot find a usable Tcl $msg"
}
}
set version $tclconfig(TCL_VERSION)$tclconfig(TCL_PATCH_LEVEL)
msg-result "Found Tcl $version at $tclconfig(TCL_PREFIX)"
define-append LIBS $libs
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
msg-quiet cc-with [list -cflags $cflags -libs {-lssl -lcrypto}] {
|