--- configure.in.orig Sat May 1 11:43:29 2004 +++ configure.in Mon Jan 23 14:32:54 2006 @@ -1,4 +1,4 @@ -# $Id: configure.in,v 1.17 2004/05/01 16:43:29 andrewbaker Exp $ +# $Id: configure.in,v 1.2 2005/03/08 20:37:40 bamm Exp $ AC_INIT(src/barnyard.c) AM_CONFIG_HEADER(config.h) AM_INIT_AUTOMAKE(barnyard,0.2.0) @@ -281,13 +281,53 @@ dnl check for the header LDFLAGS="${LDFLAGS} -L${MYSQL_LIB_DIR}" - LIBS="${LIBS} -lz -lssl -lmysqlclient" + LIBS="${LIBS} -lmysqlclient -lcrypto" AC_CHECK_LIB(mysqlclient, mysql_real_connect, FOUND=yes, FOUND=no) if test "$FOUND" = "no"; then FAIL_MESSAGE("mysqlclient library", "$MYSQL_LIB_DIR") fi +fi + +AC_ARG_ENABLE(tcl, + [ --enable-tcl Enable Tcl language support.],, + [enable_tcl="no"]) +dnl AC_MSG_RESULT($enable_tcl) + +if test "yes" = "$enable_tcl"; then + + dnl let tclsh tell us where it was + dnl installed (prefer new tcl versions). + AC_CHECK_PROGS(TCLSH, tclsh8.4 tclsh8.3 tclsh8.2 tclsh8.1 tclsh8.0 tclsh) + if test "$TCLSH" != ""; then + tclpath=`echo 'puts [[lindex $tcl_pkgPath 0]]' | $TCLSH` + fi + + dnl let the user overwrite the installation + dnl directory which was just found. + AC_ARG_WITH(tcl, + [ --with-tcl=PATH Location of tclConfig.sh], + tclpath="$withval") + + dnl check, if tclConfig.sh can be found in + dnl tclsh's installation directory. + if test ! -r $tclpath/tclConfig.sh; then + AC_MSG_RESULT( + [ + Can't find Tcl libraries. Use --with-tcl to specify + the directory containing tclConfig.sh on your system. + Continuing build without Tcl support.]) + else + dnl source tclsh's configuration file + dnl and tell the user about the version. + . $tclpath/tclConfig.sh + AC_MSG_CHECKING([for the tcl version number]) + AC_MSG_RESULT([$TCL_VERSION, patchlevel $TCL_PATCH_LEVEL]) + LIBS="$LIBS $TCL_LIBS $TCL_LIB_SPEC" + TCL_INCLUDE="$TCL_PREFIX/include/tcl$TCL_VERSION" + CPPFLAGS="$CPPFLAGS -I$TCL_INCLUDE -DENABLE_TCL"; + fi fi