All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eygene Ryabinkin <rea-git@codelabs.ru>
To: git@vger.kernel.org
Subject: [PATCH] Add --with-tclsh argument to configure script.
Date: Wed, 13 Jun 2007 09:44:06 +0400	[thread overview]
Message-ID: <20070613054406.GO86872@void.codelabs.ru> (raw)

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

                 reply	other threads:[~2007-06-13  6:01 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070613054406.GO86872@void.codelabs.ru \
    --to=rea-git@codelabs.ru \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.