From mboxrd@z Thu Jan 1 00:00:00 1970 From: Fernando Nasser To: cgd@broadcom.com Cc: insight@sources.redhat.com, gdb@sources.redhat.com Subject: Re: configuring w/ insight sources but w/o X. Date: Fri, 17 Aug 2001 06:42:00 -0000 Message-id: <3B7D1E7A.3D8A900E@redhat.com> References: X-SW-Source: 2001-08/msg00149.html This looks close to good (although I have no time to try it right now -- I just browsed through). But please read on. The tix and itcl missing from skipdirs were probably forgotten to be added ages ago. Issuing a warning and disabling gdbtk if no X11 is available makes sense on UNIX systems. The problem I see with this is that it disables gdbtk on systems where X11 is not used by Tcl, like on Cygwin or Windows native. So, you'll have to check if it is a Unix host or not before disabling gdbtk. Fernando cgd@broadcom.com wrote: > > Today I ran into a couple of problems trying to configure a source > tree with insight sources included, using the --without-x flag. > > (I wanted/needed that flag, because I was cross-building a gdb for a > host that doesn't have X bits, and I've got gdb/insight rather than > just gdb in my sources.) > > Anyway, I tripped over a few issues configuring with --without-x: > > * the configure croaks in tix: > > checking Tcl source directory... /users/cgd/proj/gnu/write/gdb/src/tcl > checking Tk source directory... /users/cgd/proj/gnu/write/gdb/src/tk > ../../../../src/tix/unix/tk8.0/configure: ../../../tk/unix/tkConfig.sh: not found > configure: error: ../../../../src/tix/unix/tk8.0/configure failed for tk8.0 > configure: error: ../../../src/tix/unix/configure failed for unix > Configure in /users/cgd/proj/gnu/write/gdb/tmp/tix failed, exiting. > > * configuring itcl goes OK, but the build croaks: > > rm -f libitk3.0.a > ar cr libitk3.0.a itk_cmds.o itk_option.o itk_archetype.o itk_util.o > true libitk3.0.a > gmake[2]: *** No rule to make target `/users/cgd/proj/sb/systemsw-1.9.1/tools/build/targetbuild.20010801.0904.56/gdb/tk/unix/libtk8.0.a', needed by `itkwish'. Stop. > gmake[2]: Leaving directory `/users/cgd/proj/gnu/write/gdb/tmp/itcl/itk/unix' > gmake[1]: *** [all] Error 1 > gmake[1]: Leaving directory `/users/cgd/proj/gnu/write/gdb/tmp/itcl' > > * after adding tix and itcl to configure.in's "skipdirs," the gdb > build fails like: > > true libgdb.a > gmake[1]: *** No rule to make target `../libgui/src/libgui.a', needed by `gdb'. Stop. > gmake[1]: Leaving directory `/users/cgd/proj/gnu/write/gdb/tmp/gdb' > gmake: *** [all-gdb] Error 2 > > (because lack of X didn't cause gdbtk to be automatically disabled. > this could be worked around with --disable-gdbtk, but I figure it > should probably happen automatically since ... it can. 8-) > > What do people think of the patch below? (I'm not quite sure where to > submit the top-level configure.in change... MAINTAINERS and > configure.in don't seem to say) > > configured/built with --without-x host sparc-solaris2.7 (didn't try > testing in any significant way other than running the built gdb), > configured/building without any special flags on the same host (not > yet done building, but plan to do the same). > > cgd > ===== > top level changelog: > > 2001-08-16 Chris Demetriou > > * configure.in (skipdirs): Add tix and itcl to skipdirs if > configuring without X11 support. > > gdb changelog: > > 2001-08-16 Chris Demetriou > > * configure.in: Check for X11 before deciding whether to > enable gdbtk, and disable gdbtk if X11 support is not enabled. > * configure: Regenerate. > > Index: configure.in > =================================================================== > RCS file: /cvs/src/src/configure.in,v > retrieving revision 1.40 > diff -c -r1.40 configure.in > *** configure.in 2001/05/24 21:06:16 1.40 > --- configure.in 2001/08/17 06:30:16 > *************** > *** 396,402 **** > yes | "") # the default value for this tree is that X11 is available > ;; > no) > ! skipdirs="${skipdirs} tk libgui gash" > ;; > *) > echo "*** bad value \"${with_x}\" for -with-x flag; ignored" 1>&2 > --- 396,402 ---- > yes | "") # the default value for this tree is that X11 is available > ;; > no) > ! skipdirs="${skipdirs} tk libgui gash tix itcl" > ;; > *) > echo "*** bad value \"${with_x}\" for -with-x flag; ignored" 1>&2 > Index: gdb/configure.in > =================================================================== > RCS file: /cvs/src/src/gdb/configure.in,v > retrieving revision 1.69 > diff -c -r1.69 configure.in > *** configure.in 2001/07/30 22:08:41 1.69 > --- configure.in 2001/08/17 06:30:22 > *************** > *** 900,905 **** > --- 900,907 ---- > ],) > > > + AC_PATH_X > + > AC_ARG_ENABLE(gdbtk, > [ --enable-gdbtk Enable GDBTK GUI front end], > [case "${enableval}" in > *************** > *** 912,918 **** > AC_MSG_WARN([GDB does not support GDBtk on host ${host}. GDBtk will be disabled.]) > enable_gdbtk=no ;; > *) > ! enable_gdbtk=yes ;; > esac ;; > no) > enable_gdbtk=no ;; > --- 914,926 ---- > AC_MSG_WARN([GDB does not support GDBtk on host ${host}. GDBtk will be disabled.]) > enable_gdbtk=no ;; > *) > ! if test "${have_x}" = "yes"; then > ! enable_gdbtk=yes > ! else > ! enable_gdbtk=no > ! AC_MSG_WARN([X11 not found or disabled. GDBtk will be disabled.]) > ! fi > ! ;; > esac ;; > no) > enable_gdbtk=no ;; > *************** > *** 925,931 **** > *go32* | *windows*) > ;; > *) > ! if test -d "${srcdir}/gdbtk" ; then > enable_gdbtk=yes > fi > ;; > --- 933,939 ---- > *go32* | *windows*) > ;; > *) > ! if test "${have_x}" = "yes" && test -d "${srcdir}/gdbtk" ; then > enable_gdbtk=yes > fi > ;; > *************** > *** 1080,1087 **** > AC_SUBST(TIX_DEPS) > AC_SUBST(GDBTKLIBS) > AC_SUBST(GDBTK_CFLAGS) > - > - AC_PATH_X > > > # Unlike the sim directory, whether a simulator is linked is controlled by > --- 1088,1093 ---- -- Fernando Nasser Red Hat Canada Ltd. E-Mail: fnasser@redhat.com 2323 Yonge Street, Suite #300 Toronto, Ontario M4P 2C9