All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Add --with-tclsh argument to configure script.
@ 2007-06-13  5:44 Eygene Ryabinkin
  0 siblings, 0 replies; only message in thread
From: Eygene Ryabinkin @ 2007-06-13  5:44 UTC (permalink / raw)
  To: git

We have Tcl/Tk interpreter detection, so we should have Tcl interpreter
detection.  It is used just at the build time now, but it produces
the index that speeds up the git-gui loading.

Signed-off-by: Eygene Ryabinkin <rea-git@codelabs.ru>
---
 config.mak.in |    1 +
 configure.ac  |   34 ++++++++++++++++++++++++++++++++++
 2 files changed, 35 insertions(+), 0 deletions(-)

diff --git a/config.mak.in b/config.mak.in
index a3032e3..7601881 100644
--- a/config.mak.in
+++ b/config.mak.in
@@ -7,6 +7,7 @@ AR = @AR@
 TAR = @TAR@
 #INSTALL = @INSTALL@		# needs install-sh or install.sh in sources
 TCLTK_PATH = @TCLTK_PATH@
+TCL_PATH = @TCLSH_PATH@
 
 prefix = @prefix@
 exec_prefix = @exec_prefix@
diff --git a/configure.ac b/configure.ac
index fd1d241..184a466 100644
--- a/configure.ac
+++ b/configure.ac
@@ -85,6 +85,16 @@ AS_HELP_STRING([],[Bare --with-tcltk will make the GUI part only if])
 AS_HELP_STRING([],[Tcl/Tk interpreter will be found in a system.]),\
 GIT_PARSE_WITH(tcltk))
 #
+# Declare the with-tclsh/without-tclsh options.
+AC_ARG_WITH(tclsh,
+AS_HELP_STRING([--with-tclsh],[Tcl interpreter path])
+AS_HELP_STRING([],[ARG is the full path to the Tcl interpreter that])
+AS_HELP_STRING([],[is needed only during the compilation time.])
+AS_HELP_STRING([],[Bare --with-tclsh will search for the Tcl])
+AS_HELP_STRING([],[interpreter and use it.  If no interpreter])
+AS_HELP_STRING([],[will be found, then the default one will be used]),\
+GIT_PARSE_WITH(tclsh))
+#
 
 
 ## Checks for programs.
@@ -110,6 +120,30 @@ if test -z "$NO_TCLTK"; then
     AC_SUBST(TCLTK_PATH)
   fi
 fi
+# TCLSH_PATH will be set to the name of the Tcl interpreter.
+# Possibly the name will be the fully qualified path, but
+# it can be just the interpreter name.  TCLSH_PATH will be
+# empty only in one case: when NO_TCLTK is defined.
+if test -z "$NO_TCLTK"; then
+  if test "$with_tclsh" = ""; then
+  # No Tcl interpreter switches given.
+  # Do not check for Tcl interpreter, use bare 'tclsh'.
+    TCLSH_PATH=${__GIT_DEFAULT_TCLSH_NAME}
+    AC_SUBST(TCLSH_PATH)
+  elif test "$with_tclsh" = "yes"; then
+  # Tcl interpreter check requested.
+    AC_CHECK_PROGS(TCLSH_PATH, [tclsh], )
+    if test -z "$TCLSH_PATH"; then
+      AC_MSG_RESULT([Tcl interpreter was not found in the PATH.  Using bare '${__GIT_DEFAULT_TCLSH_NAME}'])
+      TCLSH_PATH=${__GIT_DEFAULT_TCLSH_NAME}
+      AC_SUBST(TCLSH_PATH)
+    fi
+  else
+    AC_MSG_RESULT([Using Tcl interpreter $with_tclsh])
+    TCLSH_PATH="$with_tclsh"
+    AC_SUBST(TCLSH_PATH)
+  fi
+fi
 
 ## Checks for libraries.
 AC_MSG_NOTICE([CHECKS for libraries])
-- 
1.5.2.1

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2007-06-13  6:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-13  5:44 [PATCH] Add --with-tclsh argument to configure script Eygene Ryabinkin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.