* aclocal.m4 (AC_KRB5_TCL): Rewritten for clearer
authorEzra Peisach <epeisach@mit.edu>
Wed, 22 Oct 1997 19:43:34 +0000 (19:43 +0000)
committerEzra Peisach <epeisach@mit.edu>
Wed, 22 Oct 1997 19:43:34 +0000 (19:43 +0000)
                understanding. Check for libtcl7.6 and tcl/tcl.h.

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

src/ChangeLog
src/aclocal.m4

index f4bd8cac51fb67a612fe60fa5079a682ef428e56..9bad30bfa8441ddf68e7f1a8b55c0f02e0d4ba51 100644 (file)
@@ -1,3 +1,8 @@
+Wed Oct 22 15:03:26 1997  Ezra Peisach  <epeisach@mit.edu>
+
+       * aclocal.m4 (AC_KRB5_TCL): Rewritten for clearer
+               understanding. Check for libtcl7.6 and tcl/tcl.h.
+
 Mon Oct 13 10:14:06 1997  Ezra Peisach  <epeisach@mit.edu>
 
        * configure.in: Add KRB5_LIB_AUX so configure --help gives info on
index 6783d876a5312aab96acdfb64bde07f41254bcad..d0aa71ad87458597ab99a58958d2712d944f62d1 100644 (file)
@@ -915,16 +915,36 @@ if test "$TCL_WITH" != no ; then
        krb5_save_LDFLAGS="$LDFLAGS"
        CPPFLAGS="$TCL_INCLUDES $CPPFLAGS"
        LDFLAGS="$TCL_LIBPATH $LDFLAGS"
-       AC_CHECK_HEADER(tcl.h,dnl
-               AC_CHECK_LIB(tcl7.5, Tcl_CreateCommand, 
-                       TCL_LIBS="$TCL_LIBS -ltcl7.5 -lm $DL_LIB",
+       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
+               AC_CHECK_LIB(tcl7.6, Tcl_CreateCommand, 
+                       TCL_LIBS="$TCL_LIBS -ltcl7.6 -lm $DL_LIB" 
+                       tcl_lib=yes,,-lm $DL_LIB)
+               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",
-                               AC_MSG_WARN("tcl.h found but not library"),
-                               -lm $DL_LIB),
-                       -lm $DL_LIB),dnl tcl.h not found
-       AC_MSG_WARN(Could not find Tcl which is needed for the kadm5 tests)
-       TCL_LIBS=)
+                               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)