aboutsummaryrefslogtreecommitdiffstats
path: root/graphics/gdtclft/files/Makefile.bsd
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/gdtclft/files/Makefile.bsd')
-rw-r--r--graphics/gdtclft/files/Makefile.bsd8
1 files changed, 8 insertions, 0 deletions
diff --git a/graphics/gdtclft/files/Makefile.bsd b/graphics/gdtclft/files/Makefile.bsd
index f9a16cd9919f..da8d1a98b4e6 100644
--- a/graphics/gdtclft/files/Makefile.bsd
+++ b/graphics/gdtclft/files/Makefile.bsd
@@ -9,8 +9,16 @@ SRCS = gdhandle.c gdCmd.c
PREFIX ?=/usr/local
TCL_VER ?=8.2
+.if exists(${PREFIX}/lib/tcl${TCL_VER}/tclConfig.sh)
+# If for some reason the file does not exist -- make the best guess. In
+# reality, it will exist by the time we are actually doing the build, so
+# the quality of the guess does not matter. But we still try well. -mi
TCL_STUB_LIB_SPEC!= . ${PREFIX}/lib/tcl${TCL_VER}/tclConfig.sh; \
echo $$TCL_STUB_LIB_SPEC
+.else
+TCL_STUB_LIB_SPEC= -L${PREFIX}/lib -ltclstub${TCL_VER:S/.//}
+.endif
+
LDADD = -L${PREFIX}/lib -lgd -lttf -lpng -lz -lm ${TCL_STUB_LIB_SPEC}
CFLAGS +=-I${PREFIX}/include/tcl${TCL_VER} -I${PREFIX}/include/gd