1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
+
|
# System autoconfiguration. Try: ./configure --help
use cc cc-lib
options {
with-openssl:path|auto|tree|none
=> {Look for OpenSSL in the given path, automatically, in the source tree, or none}
with-miniz=0 => {Use miniz from the source tree}
with-zlib:path|auto|tree
=> {Look for zlib in the given path, automatically, or in the source tree}
with-exec-rel-paths=0
=> {Enable relative paths for external diff/gdiff}
with-legacy-mv-rm=1 => {Enable legacy behavior for mv/rm (skip checkout files)}
with-sanitizer: => {Build with C compiler's -fsanitize=LIST; e.g. address,enum,null,undefined}
with-th1-docs=0 => {Enable TH1 for embedded documentation pages}
with-th1-hooks=0 => {Enable TH1 hooks for commands and web pages}
with-tcl:path => {Enable Tcl integration, with Tcl in the specified path}
with-tcl-stubs=0 => {Enable Tcl integration via stubs library mechanism}
with-tcl-private-stubs=0
=> {Enable Tcl integration via private stubs mechanism}
with-mman=0 => {Enable use of POSIX memory APIs from "sys/mman.h"}
|
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
|
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
if {[cc-check-function-in-lib fuse_mount fuse]} {
define-append EXTRA_CFLAGS -DFOSSIL_HAVE_FUSEFS
define FOSSIL_HAVE_FUSEFS 1
define-append LIBS -lfuse
msg-result "FuseFS support enabled"
}
}
# Add -fsanitize compile and link options late: we don't want the C
# checks above to run with those sanitizers enabled. It can not only
# be pointless, it can actually break correct tests.
set fsan [opt-val with-sanitizer]
if {[string length fsan]} {
define-append EXTRA_CFLAGS -fsanitize=$fsan
define-append EXTRA_LDFLAGS -fsanitize=$fsan
if {[string first "undefined" $fsan]} {
# We need to link with libubsan if we're compiling under
# GCC with -fsanitize=undefined.
cc-check-function-in-lib __ubsan_handle_add_overflow ubsan
}
}
# Finally, append -ldl to make sure it's the last in the list.
# The library order matters in case of static linking.
if {[check-function-in-lib dlopen dl]} {
# Some platforms (*BSD) have the dl functions already in libc and no libdl.
# In such case we can link directly without -ldl.
define-append LIBS [get-define lib_dlopen]
}
make-template Makefile.in
make-config-header autoconfig.h -auto {USE_* FOSSIL_*}
|