* aclocal.m4 (AC_KRB5_TCL_FIND_CONFIG): Look for tclConfig.sh in
authorKen Raeburn <raeburn@mit.edu>
Mon, 8 Mar 2004 04:06:32 +0000 (04:06 +0000)
committerKen Raeburn <raeburn@mit.edu>
Mon, 8 Mar 2004 04:06:32 +0000 (04:06 +0000)
the specified directory if it's not in a "lib" subdirectory.
(AC_KRB5_TCL): If no pathname is supplied and tclConfig.sh isn't
found in /usr/lib, try running a script under tclsh to see if it
can supply the pathname for tclConfig.sh.

This allows the configure script to find /System/Library/Tcl/8.3/tclConfig.sh
on Jaguar.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16156 dc483132-0cff-0310-8789-dd5450dbe970

src/ChangeLog
src/aclocal.m4

index 2ab311c7eedc7f64102b76e318972a4da504bf1c..add07d89fb897ba01ac9161a67ffa6210d679ebc 100644 (file)
@@ -1,3 +1,11 @@
+2004-03-07  Ken Raeburn  <raeburn@mit.edu>
+
+       * aclocal.m4 (AC_KRB5_TCL_FIND_CONFIG): Look for tclConfig.sh in
+       the specified directory if it's not in a "lib" subdirectory.
+       (AC_KRB5_TCL): If no pathname is supplied and tclConfig.sh isn't
+       found in /usr/lib, try running a script under tclsh to see if it
+       can supply the pathname for tclConfig.sh.
+
 2004-03-05  Ken Raeburn  <raeburn@mit.edu>
 
        * configure.in: Integrate config commands from kdc, krb524, and
index 030925f950ec20fa6590d4344b3c3ff4186e7c87..128457ab73a0e1e7219beecaf554b9195025eef3 100644 (file)
@@ -757,6 +757,8 @@ AC_REQUIRE([KRB5_LIB_AUX])dnl
 AC_MSG_CHECKING(for tclConfig.sh)
 if test -r "$tcl_dir/lib/tclConfig.sh" ; then
   tcl_conf="$tcl_dir/lib/tclConfig.sh"
+elif test -r "$tcl_dir/tclConfig.sh" ; then
+  tcl_conf="$tcl_dir/tclConfig.sh"
 else
   tcl_conf=
   lib="$tcl_dir/lib"
@@ -930,6 +932,18 @@ if test "$with_tcl" = no ; then
   true
 elif test "$with_tcl" = yes -o "$with_tcl" = try ; then
   tcl_dir=/usr
+  if test ! -r /usr/lib/tclConfig.sh; then
+    cat >> conftest <<\EOF
+puts "tcl_dir=$tcl_library"
+EOF
+    if tclsh conftest >conftest.out 2>/dev/null; then
+      if grep tcl_dir= conftest.out >/dev/null 2>&1; then
+        t=`sed s/tcl_dir=// conftest.out`
+        tcl_dir=$t
+      fi
+    fi # tclsh ran script okay
+  rm -f conftest conftest.out
+  fi # no /usr/lib/tclConfig.sh
 else
   tcl_dir=$with_tcl
 fi