aboutsummaryrefslogtreecommitdiff
path: root/auto.def
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2023-11-02 10:01:34 +1000
committerSteve Bennett <steveb@workware.net.au>2024-02-04 10:08:06 +1000
commitdd22498a18f17f8b9f2c080f21f0310bf8c1880a (patch)
tree4cb1958335624469396433a851129fa4df695811 /auto.def
parent50e3667abf9fe4c9ecafb96553deaee15de37a03 (diff)
downloadjimtcl-dd22498a18f17f8b9f2c080f21f0310bf8c1880a.zip
jimtcl-dd22498a18f17f8b9f2c080f21f0310bf8c1880a.tar.gz
jimtcl-dd22498a18f17f8b9f2c080f21f0310bf8c1880a.tar.bz2
aio: implement openpty.c locally
To avoid linking with -lutil if possible Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'auto.def')
-rw-r--r--auto.def9
1 files changed, 6 insertions, 3 deletions
diff --git a/auto.def b/auto.def
index 93cbdbf..c3ff6e6 100644
--- a/auto.def
+++ b/auto.def
@@ -281,9 +281,6 @@ if {[have-feature fork]} {
if {[cc-check-function-in-lib backtrace execinfo]} {
define-append LDLIBS [get-define lib_backtrace]
}
-if {[cc-check-function-in-lib openpty util]} {
- define-append LDLIBS [get-define lib_openpty]
-}
if {[cc-check-functions sysinfo]} {
cc-with {-includes sys/sysinfo.h} {
@@ -573,6 +570,12 @@ if {[have-feature windows]} {
if {[have-feature termios.h]} {
lappend extra_objs jim-tty.o
}
+if {[have-feature termios.h] && [cc-check-functions posix_openpt]} {
+ define-append AS_CFLAGS -DHAVE_OPENPTY
+ lappend extra_objs openpty.o
+} elseif {[have-feature util.h]} {
+ cc-check-function-in-lib openpty util
+}
if {[ext-get-status regexp] in {y m}} {
if {![have-feature regcomp]} {