Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

TS-3 fix for finding TCL library

This patch adds 'm4/tcl.m4' file taken from tcl 8.5.7:
http://prdownloads.sourceforge.net/tcl/tcl8.5.7-src.tar.gz

And includes the macros per automake convention:
http://www.gnu.org/software/automake/manual/automake.html#Local-Macros

I've removed AC_PATH_PROG for tclsh since it is not used anywhere in
the build.

I'm also assuming if a valid tclConfig.sh is found and can load properly,                                                       
then the libraries are built properly and working. This is because
tclConfig.sh is a generated file from a successful build of the tcl
libraries.

Also taking the time to svn:ignore aclocal.m4 since it is generated
by configure.


git-svn-id: https://svn.apache.org/repos/asf/incubator/trafficserver/traffic/trunk@833453 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
commit e4dba13094ba6decfce1a470c42e27f41cd01004 1 parent a9adec3
@andrewhsu andrewhsu authored
Showing with 3,301 additions and 9 deletions.
  1. +3 −0  Makefile.am
  2. +1 −1  NOTICE
  3. +13 −8 configure.ac
  4. +3,284 −0 m4/tcl.m4
View
3  Makefile.am
@@ -4,6 +4,9 @@
#
#
+# Local Macros
+# http://www.gnu.org/software/automake/manual/automake.html#Local-Macros
+ACLOCAL_AMFLAGS = -I m4
if STANDALONE_IOCORE
SUBDIRS = libinktomi++ iocore librecords proxy doc
View
2  NOTICE
@@ -28,5 +28,5 @@ See libinktomi++/ink_res_init.cc, libinktomi++/ink_res_mkquery.cc
Copyright (c) 1997-1998 Sun Microsystems, Inc.
-See proxy/mgmt2/cli2/hashtable.cc
+See proxy/mgmt2/cli2/hashtable.cc, m4/tcl.m4
View
21 configure.ac
@@ -255,8 +255,6 @@ AS_IF([test "x$PERL" = "xnot found"],
AC_ARG_VAR([DOXYGEN], [full path of Doxygen executable])
AC_ARG_VAR([PERL], [full path of Perl executable])
-AC_PATH_PROG([TCLSH],[tclsh],[],[/usr/releng/bin /bin /usr/bin])
-
AC_CHECK_PROG([CCACHE],[ccache],[ccache],[])
#
@@ -339,12 +337,19 @@ AC_CHECK_LIB([ssl],[SSL_CTX_new],
[-ldl -lcrypto -lgcc]
)
-# for linux need LIBM and LIBDL
-AC_CHECK_LIB([tcl],[Tcl_InitHashTable],
- [AC_SUBST([LIBTCL],["-ltcl"])],
- [AC_MSG_FAILURE([check for libtcl failed. Have you installed tcl-devel?])],
- [$LIBM $LIBDL]
-)
+#
+# Tcl macros provided by m4/tcl.m4
+#
+
+# this will error out if tclConfig.sh is not found
+SC_PATH_TCLCONFIG
+
+# if tclConfig.sh loads properly, assume libraries are there and working
+SC_LOAD_TCLCONFIG
+
+# expect tclConfig.sh to populate TCL_LIB_FLAG and TCL_INCLUDE_SPEC
+AC_SUBST([LIBTCL],[$TCL_LIB_FLAG])
+CPPFLAGS="$CPPFLAGS $TCL_INCLUDE_SPEC"
AC_CHECK_LIB([expat],[XML_SetUserData],
[AC_SUBST([LIBEXPAT],["-lexpat"])],
View
3,284 m4/tcl.m4
3,284 additions, 0 deletions not shown
Please sign in to comment.
Something went wrong with that request. Please try again.