summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3cfaf11)
raw | patch | inline | side by side (parent: 3cfaf11)
author | Eygene Ryabinkin <rea-git@codelabs.ru> | |
Wed, 28 Mar 2007 11:12:07 +0000 (04:12 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sun, 1 Apr 2007 06:59:47 +0000 (23:59 -0700) |
--with-tcltk enables the search of the Tcl/Tk interpreter. If no
interpreter is found then Tcl/Tk dependend parts are disabled.
--without-tcltk unconditionally disables Tcl/Tk dependent parts.
The original behaviour is not changed: bare './configure' just
installs the Tcl/Tk part doing no checks for the interpreter.
Signed-off-by: Eygene Ryabinkin <rea-git@codelabs.ru>
interpreter is found then Tcl/Tk dependend parts are disabled.
--without-tcltk unconditionally disables Tcl/Tk dependent parts.
The original behaviour is not changed: bare './configure' just
installs the Tcl/Tk part doing no checks for the interpreter.
Signed-off-by: Eygene Ryabinkin <rea-git@codelabs.ru>
Makefile | patch | blob | history | |
config.mak.in | patch | blob | history | |
configure.ac | patch | blob | history |
diff --git a/Makefile b/Makefile
index 0797ad4a990f0518f362e6f1da5a9f66c01e2d7b..da086a7fedea0097620c148d6e269c09f7c9fb6e 100644 (file)
--- a/Makefile
+++ b/Makefile
#
# Define NO_TCLTK if you do not want Tcl/Tk GUI.
#
+# The TCLTK_PATH variable governs the location of the Tck/Tk interpreter.
+# If not set it defaults to the bare 'wish'. If it is set to the empty
+# string then NO_TCLTK will be forced (this is used by configure script).
+#
GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE
@$(SHELL_PATH) ./GIT-VERSION-GEN
TAR = tar
INSTALL = install
RPMBUILD = rpmbuild
+TCLTK_PATH = wish
# sparse is architecture-neutral, which means that we need to tell it
# explicitly what architecture to check for. Fix this up for yours..
export NO_PERL_MAKEMAKER
endif
+ifeq ($(TCLTK_PATH),)
+NO_TCLTK=NoThanks
+endif
+
QUIET_SUBDIR0 = $(MAKE) -C # space to separate -C and subdir
QUIET_SUBDIR1 =
SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
PERL_PATH_SQ = $(subst ','\'',$(PERL_PATH))
+TCLTK_PATH_SQ = $(subst ','\'',$(TCLTK_PATH))
LIBS = $(GITLIBS) $(EXTLIBS)
all::
ifndef NO_TCLTK
- $(QUIET_SUBDIR0)git-gui $(QUIET_SUBDIR1) all
+ $(QUIET_SUBDIR0)git-gui TCLTK_PATH='$(TCLTK_PATH_SQ)' $(QUIET_SUBDIR1) all
endif
$(QUIET_SUBDIR0)perl $(QUIET_SUBDIR1) PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' all
$(QUIET_SUBDIR0)templates $(QUIET_SUBDIR1)
diff --git a/config.mak.in b/config.mak.in
index 9a578405d856c3633e7137a24964b7b80fd96485..eb9d7a55496492fa021e8262f052c7f46b60ea20 100644 (file)
--- a/config.mak.in
+++ b/config.mak.in
AR = @AR@
TAR = @TAR@
#INSTALL = @INSTALL@ # needs install-sh or install.sh in sources
+TCLTK_PATH = @TCLTK_PATH@
prefix = @prefix@
exec_prefix = @exec_prefix@
diff --git a/configure.ac b/configure.ac
index 3a8e778defcf1f0e1285664785c69d9213f99516..01fa0f0bdaf7a1094a327bde230d3dad5c762a62 100644 (file)
--- a/configure.ac
+++ b/configure.ac
# Define PERL_PATH to provide path to Perl.
GIT_ARG_SET_PATH(perl)
#
+# Declare the with-tcltk/without-tcltk options.
+AC_ARG_WITH(tcltk,
+AS_HELP_STRING([--with-tcltk],[use Tcl/Tk GUI (default is YES)])
+AS_HELP_STRING([],[ARG is the full path to the Tcl/Tk interpreter.])
+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))
+#
## Checks for programs.
#AC_PROG_INSTALL # needs install-sh or install.sh in sources
AC_CHECK_TOOL(AR, ar, :)
AC_CHECK_PROGS(TAR, [gtar tar])
+# TCLTK_PATH will be set to some value if we want Tcl/Tk
+# or will be empty otherwise.
+if test -z "$NO_TCLTK"; then
+ if test "$with_tcltk" = ""; then
+ # No Tcl/Tk switches given. Do not check for Tcl/Tk, use bare 'wish'.
+ TCLTK_PATH=wish
+ AC_SUBST(TCLTK_PATH)
+ elif test "$with_tcltk" = "yes"; then
+ # Tcl/Tk check requested.
+ AC_CHECK_PROGS(TCLTK_PATH, [wish], )
+ elif test -x "$with_tcltk"; then
+ AC_MSG_RESULT([Using Tcl/Tk interpreter $with_tcltk])
+ TCLTK_PATH="$with_tcltk"
+ AC_SUBST(TCLTK_PATH)
+ else
+ AC_MSG_ERROR([Tcl/Tk interpreter was not found in $with_tcltk])
+ fi
+fi
## Checks for libraries.
AC_MSG_NOTICE([CHECKS for libraries])