* aclocal.m4: Kludge in the old test for tcl so that we have some
authorTom Yu <tlyu@mit.edu>
Tue, 8 Feb 2000 01:18:04 +0000 (01:18 +0000)
committerTom Yu <tlyu@mit.edu>
Tue, 8 Feb 2000 01:18:04 +0000 (01:18 +0000)
prayer of pulling in tcl from the funky installation that goes
along with dejagnu.

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

src/ChangeLog
src/aclocal.m4

index d73ba44547eaf8050801ee373d8e31c886d6f481..3f1a15b27b87f8db92719d25b1c687a0676420aa 100644 (file)
@@ -1,3 +1,9 @@
+2000-02-07  Tom Yu  <tlyu@mit.edu>
+
+       * aclocal.m4: Kludge in the old test for tcl so that we have some
+       prayer of pulling in tcl from the funky installation that goes
+       along with dejagnu.
+
 2000-02-07  Ken Raeburn  <raeburn@mit.edu>
 
        * aclocal.m4 (AC_KRB5_TCL_FIND_CONFIG): Change test syntax a
index d2e612274e7574d6be92b26f9fe4cbe42081d4f6..2b7c4fd8b744f8516cd61673f879fda5b8a48945 100644 (file)
@@ -769,6 +769,72 @@ AC_SUBST(TCL_LIBPATH)
 AC_SUBST(TCL_RPATH)
 ])dnl
 dnl
+dnl AC_KRB5_TCL_TRYOLD
+dnl attempt to use old search algorithm for locating tcl
+dnl
+AC_DEFUN(AC_KRB5_TCL_TRYOLD, [
+AC_MSG_WARN([trying old tcl search code])
+if test "$with_tcl" != yes -a "$with_tcl" != no; then
+       TCL_INCLUDES=-I$with_tcl/include
+       TCL_LIBPATH=-L$with_tcl/lib
+       TCL_RPATH=:$with_tcl/lib
+fi
+if test "$with_tcl" != no ; then
+       AC_CHECK_LIB(dl, dlopen, DL_LIB=-ldl)
+       AC_CHECK_LIB(ld, main, DL_LIB=-lld)
+       krb5_save_CPPFLAGS="$CPPFLAGS"
+       krb5_save_LDFLAGS="$LDFLAGS"
+       CPPFLAGS="$TCL_INCLUDES $CPPFLAGS"
+       LDFLAGS="$TCL_LIBPATH $LDFLAGS"
+       tcl_header=no
+       AC_CHECK_HEADER(tcl.h,AC_DEFINE(HAVE_TCL_H) tcl_header=yes)
+       if test $tcl_header=no; then
+          AC_CHECK_HEADER(tcl/tcl.h,AC_DEFINE(HAVE_TCL_TCL_H) tcl_header=yes)
+       fi
+
+       if test $tcl_header = yes ; then
+               tcl_lib=no
+
+               if test $tcl_lib = no; then
+                       AC_CHECK_LIB(tcl8.0, Tcl_CreateCommand, 
+                               TCL_LIBS="$TCL_LIBS -ltcl8.0 -lm $DL_LIB" 
+                               tcl_lib=yes,,-lm $DL_LIB)
+               fi
+               if test $tcl_lib = no; then
+                       AC_CHECK_LIB(tcl7.6, Tcl_CreateCommand, 
+                               TCL_LIBS="$TCL_LIBS -ltcl7.6 -lm $DL_LIB" 
+                               tcl_lib=yes,,-lm $DL_LIB)
+               fi
+               if test $tcl_lib = no; then
+                       AC_CHECK_LIB(tcl7.5, Tcl_CreateCommand, 
+                               TCL_LIBS="$TCL_LIBS -ltcl7.5 -lm $DL_LIB"
+                               tcl_lib=yes,,-lm $DL_LIB)
+
+               fi
+               if test $tcl_lib = no ; then
+                       AC_CHECK_LIB(tcl, Tcl_CreateCommand, 
+                               TCL_LIBS="$TCL_LIBS -ltcl -lm $DL_LIB"
+                               tcl_lib=yes,,-lm $DL_LIB)
+
+               fi
+               if test $tcl_lib = no ; then            
+                       AC_MSG_WARN("tcl.h found but not library")
+               fi
+       else
+               AC_MSG_WARN(Could not find Tcl which is needed for the kadm5 tests)
+               TCL_LIBS=
+       fi
+       CPPFLAGS="$krb5_save_CPPFLAGS"
+       LDFLAGS="$krb5_save_LDFLAGS"
+       AC_SUBST(TCL_INCLUDES)
+       AC_SUBST(TCL_LIBS)
+       AC_SUBST(TCL_LIBPATH)
+       AC_SUBST(TCL_RPATH)
+else
+       AC_MSG_RESULT("Not looking for Tcl library")
+fi
+])dnl
+dnl
 dnl AC_KRB5_TCL - determine if the TCL library is present on system
 dnl
 AC_DEFUN(AC_KRB5_TCL,[
@@ -791,7 +857,8 @@ if test "$with_tcl" != no ; then
   AC_KRB5_TCL_FIND_CONFIG
   if test $tcl_lib = no ; then
     if test "$with_tcl" != try ; then
-      AC_MSG_ERROR(Could not find Tcl)
+      AC_KRB5_TCL_TRYOLD
+dnl      AC_MSG_ERROR(Could not find Tcl)
     else
       AC_MSG_WARN(Could not find Tcl which is needed for some tests)
     fi