Sophie

Sophie

distrib > Mageia > 3 > i586 > media > core-release-src > by-pkgid > 28baaa8cb00547e245dc1a3ee1d7e4be > files > 4

tclreadline-2.1.0-22.mga3.src.rpm

diff -Naur tclreadline-2.1.0/configure.in tclreadline-2.1.0-tk/configure.in
--- tclreadline-2.1.0/configure.in	2000-12-08 01:45:45.000000000 +0100
+++ tclreadline-2.1.0-tk/configure.in	2009-02-26 16:45:46.000000000 +0100
@@ -55,6 +55,14 @@
     tcl_search=""
 )
 
+# -- WHICH TK TO USE
+AC_ARG_WITH(
+    tk,
+    [  --with-tk=DIR          where to look for tclConfig.sh],
+    tk_search=$withval,
+    tk_search=""
+)
+
 AC_MSG_CHECKING([which tclConfig.sh to use])
 TCL_LIB_DIR=""
 for dir in $tcl_search /usr/lib /usr/local/lib $exec_prefix/lib /usr/local/lib/unix /opt/tcl/lib; do
@@ -256,9 +264,21 @@
     [dnl action if given
 	case "${enableval}" in
 	    yes)
+		AC_MSG_CHECKING([which tkConfig.sh to use])
+		TK_LIB_DIR=""
+		for dir in $tk_search /usr/lib /usr/local/lib $exec_prefix/lib /usr/local/lib/unix /opt/tcl/lib; do
+		    if test -r $dir/tkConfig.sh; then
+		        TK_LIB_DIR=$dir
+		        break
+		    fi
+		done
+
+		if test -z "$TK_LIB_DIR"; then
+		    AC_MSG_ERROR(Can't find Tk libraries.  Use --with-tk to specify the directory containing tkConfig.sh on your system.)
+		fi
 		enable_static=true
 		dnl source the tkConfig.sh which defines TK_LIB_SPEC
-		. $TCL_LIB_DIR/tkConfig.sh
+		. $TK_LIB_DIR/tkConfig.sh
 		AC_SUBST(TK_LIB_SPEC)
 	    ;;
 	    no)  enable_static=false ;;