aboutsummaryrefslogtreecommitdiff
path: root/auto.def
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2022-08-20 08:52:33 +1000
committerSteve Bennett <steveb@workware.net.au>2022-08-20 15:35:49 +1000
commit8b1a9e78d4322b637f72fef83b026f1e2c2d56fa (patch)
treedd6f541136c1c4939b86f04a66b44b1cfb2d40fa /auto.def
parent36ba3f6cb611469b2de469d4f934a057962a64df (diff)
downloadjimtcl-8b1a9e78d4322b637f72fef83b026f1e2c2d56fa.zip
jimtcl-8b1a9e78d4322b637f72fef83b026f1e2c2d56fa.tar.gz
jimtcl-8b1a9e78d4322b637f72fef83b026f1e2c2d56fa.tar.bz2
build: macos has deprecated vfork()
On platforms where using vfork emits a warning, use fork instead Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'auto.def')
-rw-r--r--auto.def11
1 files changed, 9 insertions, 2 deletions
diff --git a/auto.def b/auto.def
index 7d565e5..fabf2ce 100644
--- a/auto.def
+++ b/auto.def
@@ -157,7 +157,7 @@ if {[opt-bool extinfo]} {
# The optional args are pkg-config specifications (e.g. name1 >= 1.3.4)
dict set extdb info {
binary { dep pack }
- exec { check {([have-feature vfork] && [have-feature waitpid]) || [have-feature system]} }
+ exec { check {(([have-feature vfork] || [have-feature fork]) && [have-feature waitpid]) || [have-feature system]} }
glob { dep readdir }
load { check {[have-feature dlopen-compat] || [cc-check-function-in-lib dlopen dl]} libdep lib_dlopen }
mk { check {[check-metakit]} libdep lib_mk }
@@ -242,13 +242,20 @@ if {[cc-check-function-in-lib socket socket]} {
define-append LDLIBS [get-define lib_socket]
}
-cc-check-functions ualarm lstat fork vfork system select execvpe
+cc-check-functions ualarm lstat fork system select execvpe
cc-check-functions geteuid mkstemp realpath isatty
cc-check-functions regcomp waitpid sigaction sys_signame sys_siglist isascii
cc-check-functions syslog opendir readlink sleep usleep pipe getaddrinfo utimes
cc-check-functions shutdown socketpair isinf isnan link symlink fsync dup umask
cc-check-functions localtime gmtime strptime clock_gettime
+if {[have-feature fork]} {
+ # Only use vfork if not deprecated
+ cc-with {-nooutput 1} {
+ cc-check-functions vfork
+ }
+}
+
if {[cc-check-function-in-lib backtrace execinfo]} {
define-append LDLIBS [get-define lib_backtrace]
}