1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|
From: Sergei Golovan
Subject: Patch implements --with-tcl option which allows one to
configure tcLex using any installed Tcl distribution (version 8 or 9).
Also, TCL_MAJOR_VERSION is added to the list of substitution to
generate different filename for the library depending on whether
it's built against Tcl 8 or Tcl 9.
Date: Thu, 27 Mar 2025 13:41:50 +0300
--- a/src/configure.in
+++ b/src/configure.in
@@ -1,4 +1,5 @@
-AC_INIT(tcLex.c)
+AC_INIT
+AC_CONFIG_SRCDIR([tcLex.c])
if test "${prefix}" = "NONE"; then
prefix=`echo 'puts [[cd [info library]/../..; pwd]];exit' | tclsh`
@@ -14,7 +15,14 @@
fi
AC_PROG_INSTALL
-file=${exec_prefix}/lib/tclConfig.sh
+AC_ARG_WITH(tcl,
+ AS_HELP_STRING([--with-tcl],[directory containing tcl configuration (tclConfig.sh)]),
+ with_tclconfig="${withval}")
+if test "x${with_tclconfig}" != "x" ; then
+ file=${with_tclconfig}/tclConfig.sh
+else
+ file=${exec_prefix}/lib/tclConfig.sh
+fi
. $file
CC=$TCL_CC
@@ -31,5 +39,7 @@
AC_SUBST(TCL_CFLAGS)
AC_SUBST(TCL_DEFS)
AC_SUBST(TCL_SRC_DIR)
+AC_SUBST(TCL_MAJOR_VERSION)
-AC_OUTPUT(Makefile)
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
|