From b83aac7742a8ef28c7520c3d6cd33faa7f98c708 Mon Sep 17 00:00:00 2001 From: Tom Yu Date: Tue, 8 Feb 2000 01:18:04 +0000 Subject: [PATCH] * 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. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12024 dc483132-0cff-0310-8789-dd5450dbe970 --- src/ChangeLog | 6 +++++ src/aclocal.m4 | 69 +++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 74 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index d73ba4454..3f1a15b27 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2000-02-07 Tom Yu + + * 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 * aclocal.m4 (AC_KRB5_TCL_FIND_CONFIG): Change test syntax a diff --git a/src/aclocal.m4 b/src/aclocal.m4 index d2e612274..2b7c4fd8b 100644 --- a/src/aclocal.m4 +++ b/src/aclocal.m4 @@ -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 -- 2.26.2