@@ -134,7 +134,7 @@ if test "$INCLUDE_DIRS"; then
134
134
fi
135
135
136
136
AC_ARG_WITH(libs,
137
- [ --with-libs=DIR site library directories for tk/tcl, etc in DIR],
137
+ [ --with-libs=DIR also search for libraries in DIR],
138
138
[
139
139
case "$withval" in
140
140
"" | y | ye | yes | n | no)
@@ -145,7 +145,7 @@ AC_ARG_WITH(libs,
145
145
])
146
146
147
147
AC_ARG_WITH(libraries,
148
- [ --with-libraries=DIR site library directories for tk/tcl, etc in DIR],
148
+ [ --with-libraries=DIR also search for libraries in DIR],
149
149
[
150
150
case "$withval" in
151
151
"" | y | ye | yes | n | no)
@@ -232,6 +232,21 @@ AC_ARG_WITH(
232
232
export USE_TCL
233
233
export USE_TK
234
234
235
+ dnl We see if the path to the TCL/TK configuration scripts is specified.
236
+ dnl This will overide the use of tclsh to find the paths to search.
237
+
238
+ AC_ARG_WITH(tclconfig,
239
+ [ --with-tclconfig=DIR tclConfig.sh and tkConfig.sh are in DIR],
240
+ [
241
+ case "$withval" in
242
+ "" | y | ye | yes | n | no)
243
+ AC_MSG_ERROR([*** You must supply an argument to the --with-tclconfig option.])
244
+ ;;
245
+ esac
246
+ TCL_DIRS="$withval"
247
+ ]
248
+ )
249
+
235
250
dnl We exclude perl support unless we override it with --with-perl
236
251
AC_MSG_CHECKING(setting USE_PERL)
237
252
AC_ARG_WITH(
@@ -250,7 +265,7 @@ dnl We include odbc support unless we disable it with --with-odbc=false
250
265
AC_MSG_CHECKING(setting USE_ODBC)
251
266
AC_ARG_WITH(
252
267
odbc,
253
- [ --with-odbc build ODBC driver package ],
268
+ [ --with-odbc build ODBC driver package ],
254
269
[
255
270
case "$withval" in
256
271
y | ye | yes) USE_ODBC=true; AC_MSG_RESULT(enabled) ;;
276
291
AC_MSG_CHECKING(setting ODBCINST)
277
292
AC_ARG_WITH(
278
293
odbcinst,
279
- [ --with-odbcinst=dir change default directory for odbcinst.ini],
294
+ [ --with-odbcinst=dir change default directory for odbcinst.ini],
280
295
AC_DEFINE_UNQUOTED(ODBCINST, ${with_odbcinst}) AC_MSG_RESULT($with_odbcinst),
281
296
AC_DEFINE_UNQUOTED(ODBCINST, ${ODBCINSTDIR}) AC_MSG_RESULT(${ODBCINSTDIR})
282
297
)
754
769
755
770
dnl Check for Tcl configuration script tclConfig.sh
756
771
757
- AC_PATH_PROG(TCLSH, tclsh)
758
-
759
- if test -z "$TCLSH"
772
+ dnl If --with-tclconfig was given, don't check for tclsh, tcl
773
+ if test -z "$TCL_DIRS"
760
774
then
761
- AC_MSG_WARN(TCL/TK support disabled; tclsh is not in your path)
762
- USE_TCL=
775
+ AC_PATH_PROG(TCLSH, tclsh)
776
+ if test -z "$TCLSH"
777
+ then
778
+ AC_PATH_PROG(TCLSH, tcl)
779
+ if test -z "$TCLSH"
780
+ then
781
+ AC_MSG_WARN(TCL/TK support disabled; tcl shell is not in your path)
782
+ USE_TCL=
783
+ fi
784
+ fi
763
785
fi
764
786
765
787
if test "$USE_TCL" = true
766
788
then
767
789
AC_MSG_CHECKING(for tclConfig.sh)
768
790
TCL_CONFIG_SH=
769
- library_dirs=`echo 'puts $auto_path' | $TCLSH`
770
- library_dirs="$LIBRARY_DIRS $library_dirs"
791
+ library_dirs=
792
+ if test -z "$TCL_DIRS"
793
+ then
794
+ library_dirs=`echo 'puts $auto_path' | $TCLSH`
795
+ fi
796
+ library_dirs="$TCL_DIRS $library_dirs"
771
797
for dir in $library_dirs; do
772
798
if test -d "$dir" -a -r "$dir/tclConfig.sh"; then
773
799
TCL_CONFIG_SH=$dir/tclConfig.sh
0 commit comments