aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2009-02-02 23:18:05 +0000
committerDoug Evans <dje@google.com>2009-02-02 23:18:05 +0000
commit85541719ae3213788be9e97b855c18e159b2a182 (patch)
tree1929aad5338ce7fc7fba70a780b40d39f22d90b2
parenta42952252f6cfaf3b84072997bd187c39b2088bb (diff)
downloadgdb-85541719ae3213788be9e97b855c18e159b2a182.zip
gdb-85541719ae3213788be9e97b855c18e159b2a182.tar.gz
gdb-85541719ae3213788be9e97b855c18e159b2a182.tar.bz2
* config/tcl.m4 (SC_PATH_TCLCONFIG): Don't exit 0 if tclconfig fails.
(SC_PATH_TKCONFIG): Don't exit 0 if tkconfig fails. (SC_LOAD_TCLCONFIG): Quote all uses of TCL_BIN_DIR, it may contain "# no Tcl configs found". (SC_LOAD_TKCONFIG): Similarily for TK_BIN_DIR. * gdb/configure.ac (gdbkt): Check both no_tcl/no_tk first, before doing any further tcl/tk configury. Don't configure gdbtk if tcl or tk check fails. * gdb/aclocal.m4: Regenerate. * gdb/configure: Regenerate. * gdb/gdbtk/plugins/aclocal.m4: Regenerate. * gdb/gdbtk/plugins/configure: Regenerate.
-rw-r--r--config/ChangeLog8
-rw-r--r--config/tcl.m414
-rw-r--r--gdb/ChangeLog8
-rw-r--r--gdb/aclocal.m424
-rwxr-xr-xgdb/configure366
-rw-r--r--gdb/configure.ac110
6 files changed, 274 insertions, 256 deletions
diff --git a/config/ChangeLog b/config/ChangeLog
index e5dfc51..b762abf 100644
--- a/config/ChangeLog
+++ b/config/ChangeLog
@@ -1,3 +1,11 @@
+2009-02-02 Doug Evans <dje@google.com>
+
+ * tcl.m4 (SC_PATH_TCLCONFIG): Don't exit 0 if tclconfig fails.
+ (SC_PATH_TKCONFIG): Don't exit 0 if tkconfig fails.
+ (SC_LOAD_TCLCONFIG): Quote all uses of TCL_BIN_DIR, it may contain
+ "# no Tcl configs found".
+ (SC_LOAD_TKCONFIG): Similarily for TK_BIN_DIR.
+
2008-11-21 Kai Tietz <kai.tietz@onevision.com>
Fix PR/25502
diff --git a/config/tcl.m4 b/config/tcl.m4
index be0129b..900a2ce 100644
--- a/config/tcl.m4
+++ b/config/tcl.m4
@@ -114,7 +114,6 @@ AC_DEFUN([SC_PATH_TCLCONFIG], [
if test x"${ac_cv_c_tclconfig}" = x ; then
TCL_BIN_DIR="# no Tcl configs found"
AC_MSG_WARN([Can't find Tcl configuration definitions])
- exit 0
else
no_tcl=
TCL_BIN_DIR=${ac_cv_c_tclconfig}
@@ -237,7 +236,6 @@ AC_DEFUN([SC_PATH_TKCONFIG], [
if test x"${ac_cv_c_tkconfig}" = x ; then
TK_BIN_DIR="# no Tk configs found"
AC_MSG_WARN([Can't find Tk configuration definitions])
- exit 0
else
no_tk=
TK_BIN_DIR=${ac_cv_c_tkconfig}
@@ -285,7 +283,7 @@ AC_DEFUN([SC_LOAD_TCLCONFIG], [
# of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
# instead of TCL_BUILD_LIB_SPEC since it will work with both an
# installed and uninstalled version of Tcl.
- if test -f ${TCL_BIN_DIR}/Makefile ; then
+ if test -f "${TCL_BIN_DIR}/Makefile" ; then
TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
@@ -295,7 +293,7 @@ AC_DEFUN([SC_LOAD_TCLCONFIG], [
# against Tcl.framework installed in an arbitary location.
case ${TCL_DEFS} in
*TCL_FRAMEWORK*)
- if test -f ${TCL_BIN_DIR}/${TCL_LIB_FILE}; then
+ if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
for i in "`cd ${TCL_BIN_DIR}; pwd`" \
"`cd ${TCL_BIN_DIR}/../..; pwd`"; do
if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
@@ -304,7 +302,7 @@ AC_DEFUN([SC_LOAD_TCLCONFIG], [
fi
done
fi
- if test -f ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}; then
+ if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
fi
@@ -368,7 +366,7 @@ AC_DEFUN([SC_LOAD_TKCONFIG], [
# of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
# instead of TK_BUILD_LIB_SPEC since it will work with both an
# installed and uninstalled version of Tcl.
- if test -f ${TK_BIN_DIR}/Makefile ; then
+ if test -f "${TK_BIN_DIR}/Makefile" ; then
TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
@@ -378,7 +376,7 @@ AC_DEFUN([SC_LOAD_TKCONFIG], [
# against Tk.framework installed in an arbitary location.
case ${TK_DEFS} in
*TK_FRAMEWORK*)
- if test -f ${TK_BIN_DIR}/${TK_LIB_FILE}; then
+ if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
for i in "`cd ${TK_BIN_DIR}; pwd`" \
"`cd ${TK_BIN_DIR}/../..; pwd`"; do
if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
@@ -387,7 +385,7 @@ AC_DEFUN([SC_LOAD_TKCONFIG], [
fi
done
fi
- if test -f ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}; then
+ if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
fi
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 53059c5..2740f36 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,11 @@
+2009-02-02 Doug Evans <dje@google.com>
+
+ * configure.ac (gdbkt): Check both no_tcl/no_tk first, before
+ doing any further tcl/tk configury. Don't configure gdbtk if
+ tcl or tk check fails.
+ * aclocal.m4: Regenerate.
+ * configure: Regenerate.
+
2009-02-02 Tom Tromey <tromey@redhat.com>
PR exp/9059:
diff --git a/gdb/aclocal.m4 b/gdb/aclocal.m4
index e09bb9c..bc533a4 100644
--- a/gdb/aclocal.m4
+++ b/gdb/aclocal.m4
@@ -468,27 +468,6 @@ AC_DEFUN([AM_PROG_INSTALL_SH],
install_sh=${install_sh-"$am_aux_dir/install-sh"}
AC_SUBST(install_sh)])
-# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 2
-
-# Check whether the underlying file-system supports filenames
-# with a leading dot. For instance MS-DOS doesn't.
-AC_DEFUN([AM_SET_LEADING_DOT],
-[rm -rf .tst 2>/dev/null
-mkdir .tst 2>/dev/null
-if test -d .tst; then
- am__leading_dot=.
-else
- am__leading_dot=_
-fi
-rmdir .tst 2>/dev/null
-AC_SUBST([am__leading_dot])])
-
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
# From Jim Meyering
@@ -889,4 +868,7 @@ m4_include([gnulib/m4/onceonly_2_57.m4])
m4_include([gnulib/m4/stdint.m4])
m4_include([gnulib/m4/string_h.m4])
m4_include([gnulib/m4/wchar.m4])
+m4_include([../config/extensions.m4])
+m4_include([../config/lead-dot.m4])
+m4_include([../config/proginstall.m4])
m4_include([acinclude.m4])
diff --git a/gdb/configure b/gdb/configure
index ede5504..7579c84 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -6552,6 +6552,7 @@ am__api_version="1.9"
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# OS/2's system install, which has a completely different semantic
# ./install, which can be erroneously created by make from ./install.sh.
+# Reject install programs that cannot install multiple files.
echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
if test -z "$INSTALL"; then
@@ -6585,8 +6586,18 @@ case $as_dir/ in
# program-specific install script used by HP pwplus--don't use.
:
else
- ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
- break 3
+ rm -rf conftest.one conftest.two conftest.dir
+ echo one > conftest.one
+ echo two > conftest.two
+ mkdir conftest.dir
+ if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+ test -s conftest.one && test -s conftest.two &&
+ test -s conftest.dir/conftest.one &&
+ test -s conftest.dir/conftest.two
+ then
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
fi
fi
done
@@ -6595,15 +6606,16 @@ case $as_dir/ in
esac
done
+rm -rf conftest.one conftest.two conftest.dir
fi
if test "${ac_cv_path_install+set}" = set; then
INSTALL=$ac_cv_path_install
else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for INSTALL within a source directory, because that will
# break other packages using the cache if that directory is
- # removed, or if the path is relative.
+ # removed, or if the value is a relative name.
INSTALL=$ac_install_sh
fi
fi
@@ -8538,6 +8550,7 @@ done
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# OS/2's system install, which has a completely different semantic
# ./install, which can be erroneously created by make from ./install.sh.
+# Reject install programs that cannot install multiple files.
echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
if test -z "$INSTALL"; then
@@ -8571,8 +8584,18 @@ case $as_dir/ in
# program-specific install script used by HP pwplus--don't use.
:
else
- ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
- break 3
+ rm -rf conftest.one conftest.two conftest.dir
+ echo one > conftest.one
+ echo two > conftest.two
+ mkdir conftest.dir
+ if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+ test -s conftest.one && test -s conftest.two &&
+ test -s conftest.dir/conftest.one &&
+ test -s conftest.dir/conftest.two
+ then
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
fi
fi
done
@@ -8581,15 +8604,16 @@ case $as_dir/ in
esac
done
+rm -rf conftest.one conftest.two conftest.dir
fi
if test "${ac_cv_path_install+set}" = set; then
INSTALL=$ac_cv_path_install
else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for INSTALL within a source directory, because that will
# break other packages using the cache if that directory is
- # removed, or if the path is relative.
+ # removed, or if the value is a relative name.
INSTALL=$ac_install_sh
fi
fi
@@ -19939,7 +19963,6 @@ fi
TCL_BIN_DIR="# no Tcl configs found"
{ echo "$as_me:$LINENO: WARNING: Can't find Tcl configuration definitions" >&5
echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
- exit 0
else
no_tcl=
TCL_BIN_DIR=${ac_cv_c_tclconfig}
@@ -19948,127 +19971,9 @@ echo "${ECHO_T}found ${TCL_BIN_DIR}/tclConfig.sh" >&6
fi
fi
- if test -z "${no_tcl}"; then
-
- echo "$as_me:$LINENO: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
-echo $ECHO_N "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... $ECHO_C" >&6
-
- if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
- echo "$as_me:$LINENO: result: loading" >&5
-echo "${ECHO_T}loading" >&6
- . ${TCL_BIN_DIR}/tclConfig.sh
- else
- echo "$as_me:$LINENO: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
-echo "${ECHO_T}could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6
- fi
-
- # eval is required to do the TCL_DBGX substitution
- eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
- eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
-
- # If the TCL_BIN_DIR is the build directory (not the install directory),
- # then set the common variable name to the value of the build variables.
- # For example, the variable TCL_LIB_SPEC will be set to the value
- # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
- # instead of TCL_BUILD_LIB_SPEC since it will work with both an
- # installed and uninstalled version of Tcl.
- if test -f ${TCL_BIN_DIR}/Makefile ; then
- TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
- TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
- TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
- elif test "`uname -s`" = "Darwin"; then
- # If Tcl was built as a framework, attempt to use the libraries
- # from the framework at the given location so that linking works
- # against Tcl.framework installed in an arbitary location.
- case ${TCL_DEFS} in
- *TCL_FRAMEWORK*)
- if test -f ${TCL_BIN_DIR}/${TCL_LIB_FILE}; then
- for i in "`cd ${TCL_BIN_DIR}; pwd`" \
- "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
- if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
- TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
- break
- fi
- done
- fi
- if test -f ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}; then
- TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
- TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
- fi
- ;;
- esac
- fi
-
- # eval is required to do the TCL_DBGX substitution
- eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
- eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
- eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
- eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- # Check for in-tree tcl
- here=`pwd`
- cd ${srcdir}/..
- topdir=`pwd`
- cd ${here}
-
- intree="no"
- if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
- intree="yes"
- fi
-
- # Find Tcl private headers
- if test x"${intree}" = xno; then
-
- echo "$as_me:$LINENO: checking for Tcl private headers" >&5
-echo $ECHO_N "checking for Tcl private headers... $ECHO_C" >&6
- private_dir=""
- dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
- if test -f ${dir}/tclInt.h ; then
- private_dir=${dir}
- fi
-
- if test x"${private_dir}" = x; then
- { { echo "$as_me:$LINENO: error: could not find private Tcl headers" >&5
-echo "$as_me: error: could not find private Tcl headers" >&2;}
- { (exit 1); exit 1; }; }
- else
- TCL_PRIVATE_INCLUDE="-I${private_dir}"
- echo "$as_me:$LINENO: result: ${private_dir}" >&5
-echo "${ECHO_T}${private_dir}" >&6
- fi
-
- TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
- TCL_LIBRARY="${TCL_LIB_SPEC}"
- TCL_DEPS=""
- else
- # If building tcl in the same src tree, private headers
- # are not needed, but we need to be sure to use the right
- # headers library
- TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
- TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
- TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
- fi
-
-
-
-
- # If $no_tk is nonempty, then we can't do Tk, and there is no
- # point to doing Tcl.
- if test -z "${no_tk}"; then
+ # If $no_tk is nonempty, then we can't do Tk, and there is no
+ # point to doing Tcl.
#
# Ok, lets find the tk configuration
@@ -20179,7 +20084,6 @@ fi
TK_BIN_DIR="# no Tk configs found"
{ echo "$as_me:$LINENO: WARNING: Can't find Tk configuration definitions" >&5
echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
- exit 0
else
no_tk=
TK_BIN_DIR=${ac_cv_c_tkconfig}
@@ -20189,6 +20093,125 @@ echo "${ECHO_T}found ${TK_BIN_DIR}/tkConfig.sh" >&6
fi
+ if test -z "${no_tcl}" -a -z "${no_tk}"; then
+
+ echo "$as_me:$LINENO: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
+echo $ECHO_N "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... $ECHO_C" >&6
+
+ if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
+ echo "$as_me:$LINENO: result: loading" >&5
+echo "${ECHO_T}loading" >&6
+ . ${TCL_BIN_DIR}/tclConfig.sh
+ else
+ echo "$as_me:$LINENO: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
+echo "${ECHO_T}could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6
+ fi
+
+ # eval is required to do the TCL_DBGX substitution
+ eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
+ eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
+
+ # If the TCL_BIN_DIR is the build directory (not the install directory),
+ # then set the common variable name to the value of the build variables.
+ # For example, the variable TCL_LIB_SPEC will be set to the value
+ # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
+ # instead of TCL_BUILD_LIB_SPEC since it will work with both an
+ # installed and uninstalled version of Tcl.
+ if test -f "${TCL_BIN_DIR}/Makefile" ; then
+ TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
+ TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
+ TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
+ elif test "`uname -s`" = "Darwin"; then
+ # If Tcl was built as a framework, attempt to use the libraries
+ # from the framework at the given location so that linking works
+ # against Tcl.framework installed in an arbitary location.
+ case ${TCL_DEFS} in
+ *TCL_FRAMEWORK*)
+ if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
+ for i in "`cd ${TCL_BIN_DIR}; pwd`" \
+ "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
+ if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
+ TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
+ break
+ fi
+ done
+ fi
+ if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
+ TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
+ TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
+ fi
+ ;;
+ esac
+ fi
+
+ # eval is required to do the TCL_DBGX substitution
+ eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
+ eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
+ eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
+ eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ # Check for in-tree tcl
+ here=`pwd`
+ cd ${srcdir}/..
+ topdir=`pwd`
+ cd ${here}
+
+ intree="no"
+ if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
+ intree="yes"
+ fi
+
+ # Find Tcl private headers
+ if test x"${intree}" = xno; then
+
+ echo "$as_me:$LINENO: checking for Tcl private headers" >&5
+echo $ECHO_N "checking for Tcl private headers... $ECHO_C" >&6
+ private_dir=""
+ dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
+ if test -f ${dir}/tclInt.h ; then
+ private_dir=${dir}
+ fi
+
+ if test x"${private_dir}" = x; then
+ { { echo "$as_me:$LINENO: error: could not find private Tcl headers" >&5
+echo "$as_me: error: could not find private Tcl headers" >&2;}
+ { (exit 1); exit 1; }; }
+ else
+ TCL_PRIVATE_INCLUDE="-I${private_dir}"
+ echo "$as_me:$LINENO: result: ${private_dir}" >&5
+echo "${ECHO_T}${private_dir}" >&6
+ fi
+
+ TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
+ TCL_LIBRARY="${TCL_LIB_SPEC}"
+ TCL_DEPS=""
+ else
+ # If building tcl in the same src tree, private headers
+ # are not needed, but we need to be sure to use the right
+ # headers library
+ TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
+ TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
+ TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
+ fi
+
+
+
+
+
echo "$as_me:$LINENO: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
echo $ECHO_N "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... $ECHO_C" >&6
@@ -20211,7 +20234,7 @@ echo "${ECHO_T}could not find ${TK_BIN_DIR}/tkConfig.sh" >&6
# of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
# instead of TK_BUILD_LIB_SPEC since it will work with both an
# installed and uninstalled version of Tcl.
- if test -f ${TK_BIN_DIR}/Makefile ; then
+ if test -f "${TK_BIN_DIR}/Makefile" ; then
TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
@@ -20221,7 +20244,7 @@ echo "${ECHO_T}could not find ${TK_BIN_DIR}/tkConfig.sh" >&6
# against Tk.framework installed in an arbitary location.
case ${TK_DEFS} in
*TK_FRAMEWORK*)
- if test -f ${TK_BIN_DIR}/${TK_LIB_FILE}; then
+ if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
for i in "`cd ${TK_BIN_DIR}; pwd`" \
"`cd ${TK_BIN_DIR}/../..; pwd`"; do
if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
@@ -20230,7 +20253,7 @@ echo "${ECHO_T}could not find ${TK_BIN_DIR}/tkConfig.sh" >&6
fi
done
fi
- if test -f ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}; then
+ if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
fi
@@ -20257,14 +20280,14 @@ echo "${ECHO_T}could not find ${TK_BIN_DIR}/tkConfig.sh" >&6
- # Check for in-tree Tk
- intree="no"
- if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
- intree="yes"
- fi
+ # Check for in-tree Tk
+ intree="no"
+ if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
+ intree="yes"
+ fi
- # Find Tk private headers
- if test x"${intree}" = xno; then
+ # Find Tk private headers
+ if test x"${intree}" = xno; then
echo "$as_me:$LINENO: checking for Tk private headers" >&5
echo $ECHO_N "checking for Tk private headers... $ECHO_C" >&6
@@ -20284,50 +20307,49 @@ echo "$as_me: error: could not find Tk private headers" >&2;}
echo "${ECHO_T}${private_dir}" >&6
fi
- TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
- TK_LIBRARY=${TK_LIB_SPEC}
- TK_DEPS=""
- else
- TK_INCLUDE="-I${TK_SRC_DIR}/generic"
- TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
- TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
- fi
+ TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
+ TK_LIBRARY=${TK_LIB_SPEC}
+ TK_DEPS=""
+ else
+ TK_INCLUDE="-I${TK_SRC_DIR}/generic"
+ TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
+ TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
+ fi
- ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
+ ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
- # Include some libraries that Tcl and Tk want.
- TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
- # Yes, the ordering seems wrong here. But it isn't.
- # TK_LIBS is the list of libraries that need to be linked
- # after Tcl/Tk. Note that this isn't put into LIBS. If it
- # were in LIBS then any link tests after this point would
- # try to include things like `$(LIBGUI)', which wouldn't work.
- GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
+ # Include some libraries that Tcl and Tk want.
+ TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
+ # Yes, the ordering seems wrong here. But it isn't.
+ # TK_LIBS is the list of libraries that need to be linked
+ # after Tcl/Tk. Note that this isn't put into LIBS. If it
+ # were in LIBS then any link tests after this point would
+ # try to include things like `$(LIBGUI)', which wouldn't work.
+ GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
- CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
- CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
- CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
- CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
- CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
- CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
- CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
+ CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
+ CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
+ CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
+ CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
+ CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
+ CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
+ CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
- if test x$gdb_cv_os_cygwin = xyes; then
- WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
- WIN32LDAPP="-Wl,--subsystem,console"
- CONFIG_OBS="${CONFIG_OBS} gdbres.o"
- fi
+ if test x$gdb_cv_os_cygwin = xyes; then
+ WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
+ WIN32LDAPP="-Wl,--subsystem,console"
+ CONFIG_OBS="${CONFIG_OBS} gdbres.o"
fi
- fi
subdirs="$subdirs gdbtk"
+ fi
fi
diff --git a/gdb/configure.ac b/gdb/configure.ac
index c07eb10..3f81ff2 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -1696,7 +1696,12 @@ if test "${enable_gdbtk}" = "yes"; then
cd $here
SC_PATH_TCLCONFIG
- if test -z "${no_tcl}"; then
+
+ # If $no_tk is nonempty, then we can't do Tk, and there is no
+ # point to doing Tcl.
+ SC_PATH_TKCONFIG
+
+ if test -z "${no_tcl}" -a -z "${no_tk}"; then
SC_LOAD_TCLCONFIG
# Check for in-tree tcl
@@ -1728,62 +1733,57 @@ if test "${enable_gdbtk}" = "yes"; then
AC_SUBST(TCL_LIBRARY)
AC_SUBST(TCL_DEPS)
- # If $no_tk is nonempty, then we can't do Tk, and there is no
- # point to doing Tcl.
- if test -z "${no_tk}"; then
- SC_PATH_TKCONFIG
- SC_LOAD_TKCONFIG
-
- # Check for in-tree Tk
- intree="no"
- if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
- intree="yes"
- fi
-
- # Find Tk private headers
- if test x"${intree}" = xno; then
- CY_AC_TK_PRIVATE_HEADERS
- TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
- TK_LIBRARY=${TK_LIB_SPEC}
- TK_DEPS=""
- else
- TK_INCLUDE="-I${TK_SRC_DIR}/generic"
- TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
- TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
- fi
- AC_SUBST(TK_INCLUDE)
- AC_SUBST(TK_LIBRARY)
- AC_SUBST(TK_DEPS)
- AC_SUBST(TK_XINCLUDES)
-
- ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
-
- # Include some libraries that Tcl and Tk want.
- TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
- # Yes, the ordering seems wrong here. But it isn't.
- # TK_LIBS is the list of libraries that need to be linked
- # after Tcl/Tk. Note that this isn't put into LIBS. If it
- # were in LIBS then any link tests after this point would
- # try to include things like `$(LIBGUI)', which wouldn't work.
- GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
-
- CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
- CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
- CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
- CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
- CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
- CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
- CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
-
- if test x$gdb_cv_os_cygwin = xyes; then
- WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
- WIN32LDAPP="-Wl,--subsystem,console"
- CONFIG_OBS="${CONFIG_OBS} gdbres.o"
- fi
+ SC_LOAD_TKCONFIG
+
+ # Check for in-tree Tk
+ intree="no"
+ if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
+ intree="yes"
+ fi
+
+ # Find Tk private headers
+ if test x"${intree}" = xno; then
+ CY_AC_TK_PRIVATE_HEADERS
+ TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
+ TK_LIBRARY=${TK_LIB_SPEC}
+ TK_DEPS=""
+ else
+ TK_INCLUDE="-I${TK_SRC_DIR}/generic"
+ TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
+ TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
+ fi
+ AC_SUBST(TK_INCLUDE)
+ AC_SUBST(TK_LIBRARY)
+ AC_SUBST(TK_DEPS)
+ AC_SUBST(TK_XINCLUDES)
+
+ ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
+
+ # Include some libraries that Tcl and Tk want.
+ TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
+ # Yes, the ordering seems wrong here. But it isn't.
+ # TK_LIBS is the list of libraries that need to be linked
+ # after Tcl/Tk. Note that this isn't put into LIBS. If it
+ # were in LIBS then any link tests after this point would
+ # try to include things like `$(LIBGUI)', which wouldn't work.
+ GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
+
+ CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
+ CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
+ CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
+ CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
+ CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
+ CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
+ CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
+
+ if test x$gdb_cv_os_cygwin = xyes; then
+ WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
+ WIN32LDAPP="-Wl,--subsystem,console"
+ CONFIG_OBS="${CONFIG_OBS} gdbres.o"
fi
- fi
- AC_CONFIG_SUBDIRS(gdbtk)
+ AC_CONFIG_SUBDIRS(gdbtk)
+ fi
fi
AC_SUBST(X_CFLAGS)