{"thread":{"id":"8579","subject":"[PATCH] Add --with-tclsh argument to configure script.","startedAt":"2007-06-13T05:44:06Z","lastAt":"2007-06-13T05:44:06Z","messageCount":1,"participants":["Eygene Ryabinkin"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"44889","messageId":"20070613054406.GO86872@void.codelabs.ru","threadId":"8579","inReplyTo":null,"subject":"[PATCH] Add --with-tclsh argument to configure script.","fromName":"Eygene Ryabinkin","fromEmail":"rea-git@codelabs.ru","sentAt":"2007-06-13T05:44:06Z","receivedAt":"2007-06-13T05:44:06Z","isPatch":true,"sender":{"key":"rea-git@codelabs.ru","avatar":null},"body":"We have Tcl/Tk interpreter detection, so we should have Tcl interpreter\ndetection.  It is used just at the build time now, but it produces\nthe index that speeds up the git-gui loading.\n\nSigned-off-by: Eygene Ryabinkin <rea-git@codelabs.ru>\n---\n config.mak.in |    1 +\n configure.ac  |   34 ++++++++++++++++++++++++++++++++++\n 2 files changed, 35 insertions(+), 0 deletions(-)\n\ndiff --git a/config.mak.in b/config.mak.in\nindex a3032e3..7601881 100644\n--- a/config.mak.in\n+++ b/config.mak.in\n@@ -7,6 +7,7 @@ AR = @AR@\n TAR = @TAR@\n #INSTALL = @INSTALL@\t\t# needs install-sh or install.sh in sources\n TCLTK_PATH = @TCLTK_PATH@\n+TCL_PATH = @TCLSH_PATH@\n \n prefix = @prefix@\n exec_prefix = @exec_prefix@\ndiff --git a/configure.ac b/configure.ac\nindex fd1d241..184a466 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -85,6 +85,16 @@ AS_HELP_STRING([],[Bare --with-tcltk will make the GUI part only if])\n AS_HELP_STRING([],[Tcl/Tk interpreter will be found in a system.]),\\\n GIT_PARSE_WITH(tcltk))\n #\n+# Declare the with-tclsh/without-tclsh options.\n+AC_ARG_WITH(tclsh,\n+AS_HELP_STRING([--with-tclsh],[Tcl interpreter path])\n+AS_HELP_STRING([],[ARG is the full path to the Tcl interpreter that])\n+AS_HELP_STRING([],[is needed only during the compilation time.])\n+AS_HELP_STRING([],[Bare --with-tclsh will search for the Tcl])\n+AS_HELP_STRING([],[interpreter and use it.  If no interpreter])\n+AS_HELP_STRING([],[will be found, then the default one will be used]),\\\n+GIT_PARSE_WITH(tclsh))\n+#\n \n \n ## Checks for programs.\n@@ -110,6 +120,30 @@ if test -z \"$NO_TCLTK\"; then\n     AC_SUBST(TCLTK_PATH)\n   fi\n fi\n+# TCLSH_PATH will be set to the name of the Tcl interpreter.\n+# Possibly the name will be the fully qualified path, but\n+# it can be just the interpreter name.  TCLSH_PATH will be\n+# empty only in one case: when NO_TCLTK is defined.\n+if test -z \"$NO_TCLTK\"; then\n+  if test \"$with_tclsh\" = \"\"; then\n+  # No Tcl interpreter switches given.\n+  # Do not check for Tcl interpreter, use bare 'tclsh'.\n+    TCLSH_PATH=${__GIT_DEFAULT_TCLSH_NAME}\n+    AC_SUBST(TCLSH_PATH)\n+  elif test \"$with_tclsh\" = \"yes\"; then\n+  # Tcl interpreter check requested.\n+    AC_CHECK_PROGS(TCLSH_PATH, [tclsh], )\n+    if test -z \"$TCLSH_PATH\"; then\n+      AC_MSG_RESULT([Tcl interpreter was not found in the PATH.  Using bare '${__GIT_DEFAULT_TCLSH_NAME}'])\n+      TCLSH_PATH=${__GIT_DEFAULT_TCLSH_NAME}\n+      AC_SUBST(TCLSH_PATH)\n+    fi\n+  else\n+    AC_MSG_RESULT([Using Tcl interpreter $with_tclsh])\n+    TCLSH_PATH=\"$with_tclsh\"\n+    AC_SUBST(TCLSH_PATH)\n+  fi\n+fi\n \n ## Checks for libraries.\n AC_MSG_NOTICE([CHECKS for libraries])\n-- \n1.5.2.1\n"}]}