From d1c3b63ad472a72cb0c2b9c92bf9eafc65c98285 Mon Sep 17 00:00:00 2001 From: Keith Seitz Date: Thu, 16 Aug 2001 22:47:00 +0000 Subject: [PATCH] * configure.in (GDBTK_SRC_DIR): We must have autoconf give us the absolute path to the source directory. * configure: Regenerated. * Makefile.in (GDBTK_SRC_DIR): Add variable so that autoconf can substitue it in for us. (gdbtk.o): Pass in GDBTK_SRC_DIR instead of srcdir. We really do need an absolute pathname. --- gdb/ChangeLog | 10 +++++++ gdb/Makefile.in | 6 +++- gdb/configure | 71 +++++++++++++++++++++++++++--------------------- gdb/configure.in | 8 ++++++ 4 files changed, 63 insertions(+), 32 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index bad0d3a5243..411cb14de1e 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,13 @@ +2001-08-16 Keith Seitz + + * configure.in (GDBTK_SRC_DIR): We must have autoconf + give us the absolute path to the source directory. + * configure: Regenerated. + * Makefile.in (GDBTK_SRC_DIR): Add variable so that + autoconf can substitue it in for us. + (gdbtk.o): Pass in GDBTK_SRC_DIR instead of srcdir. We + really do need an absolute pathname. + 2001-08-15 Keith Seitz * Makefile.in (GDBTK_VERSION): Set a version number. diff --git a/gdb/Makefile.in b/gdb/Makefile.in index 3ee505b72bc..d8156348456 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -270,6 +270,10 @@ IDE_CFLAGS=$(GUI_CFLAGS_X) $(IDE_CFLAGS_X) GDBTK_VERSION = 1.0 GDBTK_LIBRARY = $(datadir)/insight$(GDBTK_VERSION) +# Gdbtk requires an absolute path to the source directory or +# the testsuite won't run properly. +GDBTK_SRC_DIR = @GDBTK_SRC_DIR@ + SUBDIR_GDBTK_OBS = \ gdbtk.o gdbtk-bp.o gdbtk-cmds.o gdbtk-hooks.o \ gdbtk-register.o gdbtk-stack.o gdbtk-varobj.o gdbtk-wrapper.o @@ -1395,7 +1399,7 @@ gdbtk.o: $(srcdir)/gdbtk/generic/gdbtk.c \ $(ITK_CFLAGS) $(TIX_CFLAGS) \ $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) $(GDBTK_CFLAGS)\ $(srcdir)/gdbtk/generic/gdbtk.c \ - -DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\" -DSRC_DIR=\"$(srcdir)\" + -DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\" -DSRC_DIR=\"$(GDBTK_SRC_DIR)\" gdbtk-bp.o: $(srcdir)/gdbtk/generic/gdbtk-bp.c \ $(srcdir)/gdbtk/generic/gdbtk.h $(srcdir)/gdbtk/generic/gdbtk-cmds.h \ diff --git a/gdb/configure b/gdb/configure index 83701f143f6..3707a4ddacc 100755 --- a/gdb/configure +++ b/gdb/configure @@ -2857,7 +2857,7 @@ EOF fi -for ac_prog in mawk gawk nawk awk +for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 @@ -7052,6 +7052,13 @@ configdir="unix" GDBTKLIBS= if test "${enable_gdbtk}" = "yes"; then + # Gdbtk must have an absolute path to srcdir in order to run + # properly when not installed. + here=`pwd` + cd ${srcdir} + GDBTK_SRC_DIR=`pwd` + cd $here + # # Ok, lets find the tcl configuration @@ -7069,7 +7076,7 @@ if test "${with_tclconfig+set}" = set; then fi echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6 -echo "configure:7073: checking for Tcl configuration" >&5 +echo "configure:7080: checking for Tcl configuration" >&5 if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7177,7 +7184,7 @@ if test "${with_tkconfig+set}" = set; then fi echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6 -echo "configure:7181: checking for Tk configuration" >&5 +echo "configure:7188: checking for Tk configuration" >&5 if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7286,7 +7293,7 @@ fi no_tcl=true echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6 -echo "configure:7290: checking for Tcl private headers. dir=${configdir}" >&5 +echo "configure:7297: checking for Tcl private headers. dir=${configdir}" >&5 # Check whether --with-tclinclude or --without-tclinclude was given. if test "${with_tclinclude+set}" = set; then withval="$with_tclinclude" @@ -7352,17 +7359,17 @@ fi if test x"${ac_cv_c_tclh}" = x ; then ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6 -echo "configure:7356: checking for tclInt.h" >&5 +echo "configure:7363: checking for tclInt.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7366: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7373: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -7422,7 +7429,7 @@ fi # no_tk=true echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6 -echo "configure:7426: checking for Tk private headers" >&5 +echo "configure:7433: checking for Tk private headers" >&5 # Check whether --with-tkinclude or --without-tkinclude was given. if test "${with_tkinclude+set}" = set; then withval="$with_tkinclude" @@ -7488,17 +7495,17 @@ fi if test x"${ac_cv_c_tkh}" = x ; then ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for tk.h""... $ac_c" 1>&6 -echo "configure:7492: checking for tk.h" >&5 +echo "configure:7499: checking for tk.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7502: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7509: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -7544,7 +7551,7 @@ fi echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6 -echo "configure:7548: checking for Itcl private headers. srcdir=${srcdir}" >&5 +echo "configure:7555: checking for Itcl private headers. srcdir=${srcdir}" >&5 if test x"${ac_cv_c_itclh}" = x ; then for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do if test -f $i/generic/itcl.h ; then @@ -7567,7 +7574,7 @@ fi echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6 -echo "configure:7571: checking for Itk private headers. srcdir=${srcdir}" >&5 +echo "configure:7578: checking for Itk private headers. srcdir=${srcdir}" >&5 if test x"${ac_cv_c_itkh}" = x ; then for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do if test -f $i/generic/itk.h ; then @@ -7590,7 +7597,7 @@ fi echo $ac_n "checking for Tix private headers. srcdir=${srcdir}""... $ac_c" 1>&6 -echo "configure:7594: checking for Tix private headers. srcdir=${srcdir}" >&5 +echo "configure:7601: checking for Tix private headers. srcdir=${srcdir}" >&5 if test x"${ac_cv_c_tixh}" = x ; then for i in ${srcdir}/../tix ${srcdir}/../../tix ${srcdir}/../../../tix ; do if test -f $i/generic/tix.h ; then @@ -7642,7 +7649,7 @@ if test "${with_itclconfig+set}" = set; then fi echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6 -echo "configure:7646: checking for Itcl configuration" >&5 +echo "configure:7653: checking for Itcl configuration" >&5 if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7754,7 +7761,7 @@ if test "${with_itkconfig+set}" = set; then fi echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6 -echo "configure:7758: checking for Itk configuration" >&5 +echo "configure:7765: checking for Itk configuration" >&5 if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7866,7 +7873,7 @@ if test "${with_tixconfig+set}" = set; then fi echo $ac_n "checking for Tix configuration""... $ac_c" 1>&6 -echo "configure:7870: checking for Tix configuration" >&5 +echo "configure:7877: checking for Tix configuration" >&5 if eval "test \"`echo '$''{'ac_cv_c_tixconfig'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8003,12 +8010,13 @@ fi + # If we find X, set shell vars x_includes and x_libraries to the # paths, otherwise set no_x=yes. # Uses ac_ vars as temps to allow command line to override cache and checks. # --without-x overrides everything else, but does not touch the cache. echo $ac_n "checking for X""... $ac_c" 1>&6 -echo "configure:8012: checking for X" >&5 +echo "configure:8020: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -8070,12 +8078,12 @@ if test "$ac_x_includes" = NO; then # First, try using that file with no special directory specified. cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8079: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8087: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8144,14 +8152,14 @@ if test "$ac_x_libraries" = NO; then ac_save_LIBS="$LIBS" LIBS="-l$x_direct_test_library $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* LIBS="$ac_save_LIBS" # We can link X programs with no special library path. @@ -8491,7 +8499,7 @@ fi echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:8495: checking whether ln -s works" >&5 +echo "configure:8503: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8515,12 +8523,12 @@ fi echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 -echo "configure:8519: checking for Cygwin environment" >&5 +echo "configure:8527: checking for Cygwin environment" >&5 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8543: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cygwin=yes else @@ -8548,19 +8556,19 @@ echo "$ac_t""$ac_cv_cygwin" 1>&6 CYGWIN= test "$ac_cv_cygwin" = yes && CYGWIN=yes echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 -echo "configure:8552: checking for mingw32 environment" >&5 +echo "configure:8560: checking for mingw32 environment" >&5 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8572: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_mingw32=yes else @@ -8579,7 +8587,7 @@ test "$ac_cv_mingw32" = yes && MINGW32=yes echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:8583: checking for executable suffix" >&5 +echo "configure:8591: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8589,7 +8597,7 @@ else rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:8593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:8601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in *.c | *.o | *.obj) ;; @@ -8864,6 +8872,7 @@ s%@TIXLIB@%$TIXLIB%g s%@TIX_DEPS@%$TIX_DEPS%g s%@GDBTKLIBS@%$GDBTKLIBS%g s%@GDBTK_CFLAGS@%$GDBTK_CFLAGS%g +s%@GDBTK_SRC_DIR@%$GDBTK_SRC_DIR%g s%@IGNORE_SIM@%$IGNORE_SIM%g s%@IGNORE_SIM_OBS@%$IGNORE_SIM_OBS%g s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g diff --git a/gdb/configure.in b/gdb/configure.in index f676877eaa1..6c30972ad63 100644 --- a/gdb/configure.in +++ b/gdb/configure.in @@ -941,6 +941,13 @@ configdir="unix" GDBTKLIBS= if test "${enable_gdbtk}" = "yes"; then + # Gdbtk must have an absolute path to srcdir in order to run + # properly when not installed. + here=`pwd` + cd ${srcdir} + GDBTK_SRC_DIR=`pwd` + cd $here + CY_AC_PATH_TCLCONFIG if test -z "${no_tcl}"; then CY_AC_LOAD_TCLCONFIG @@ -1080,6 +1087,7 @@ AC_SUBST(TIXLIB) AC_SUBST(TIX_DEPS) AC_SUBST(GDBTKLIBS) AC_SUBST(GDBTK_CFLAGS) +AC_SUBST(GDBTK_SRC_DIR) AC_PATH_X -- 2.30.2