Fossil

Diff
Login

Diff

Differences From Artifact [dbaa45c89e]:

To Artifact [7f80caf455]:


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
125
126
127
128
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
125
126

127
128
129
130
131
132
133







-
+



-
-
+
+

-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-







}
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
    # 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 {
        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)
        set msg "at $tclpath"
    }
    if {![info exists tclconfig(TCL_INCLUDE_SPEC)]} {
        user-error "Cannot find Tcl $msg"
    }
    set tclstubs [opt-val with-tcl-stubs]
    if {$tclstubs eq "1" && $tclconfig(TCL_SUPPORTS_STUBS)} {
        set libs "$tclconfig(TCL_STUB_LIB_SPEC)"
        define FOSSIL_ENABLE_TCL_STUBS
    } else {
        set libs "$tclconfig(TCL_LIB_SPEC) $tclconfig(TCL_LIBS)"
    }
    set cflags $tclconfig(TCL_INCLUDE_SPEC)
    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