From 3fc11d3e80ff4229745e2185a9ee77c780220f3d Mon Sep 17 00:00:00 2001 From: Jason Molenda Date: Mon, 7 Feb 2000 00:19:45 +0000 Subject: import insight-2000-02-04 snapshot (2nd try) --- gdb/configure.in | 162 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 162 insertions(+) (limited to 'gdb/configure.in') diff --git a/gdb/configure.in b/gdb/configure.in index e85f636..8c5ba2f 100644 --- a/gdb/configure.in +++ b/gdb/configure.in @@ -500,6 +500,10 @@ if test x$gdb_cv_os_cygwin = xyes; then fi AC_SUBST(WIN32LIBS) +LIBGUI="../libgui/src/libgui.a" +GUI_CFLAGS_X="-I${srcdir}/../libgui/src" +AC_SUBST(LIBGUI) +AC_SUBST(GUI_CFLAGS_X) AC_ARG_WITH(cpu, [ --with-cpu=CPU Set the default CPU variant to debug], @@ -536,6 +540,153 @@ AC_DEFINE_UNQUOTED(TARGET_CPU_DEFAULT, "${with_cpu}") ],) +ENABLE_GDBTK= + +AC_ARG_ENABLE(gdbtk, +[ --enable-gdbtk Enable GDBTK GUI front end], +[case "${enableval}" in + yes) + case "$host" in + *go32*) + AC_MSG_WARN([GDB does not support GDBtk on host ${host}. GDBtk will be disabled.]) + enable_gdbtk=no ;; + *windows*) + 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 ;; + *) + AC_MSG_ERROR(bad value ${enableval} given for gdbtk option) ;; +esac], +[ +# Default is on for everything but go32 and Cygwin +case "$host" in + *go32* | *windows*) + ;; + *) + enable_gdbtk=yes ;; + esac +]) + +WIN32LDAPP= +AC_SUBST(WIN32LIBS) +AC_SUBST(WIN32LDAPP) + +configdir="unix" + +GDBTKLIBS= +if test "${enable_gdbtk}" = "yes"; then + + CY_AC_PATH_TCLCONFIG + if test -z "${no_tcl}"; then + CY_AC_LOAD_TCLCONFIG + CY_AC_PATH_TKCONFIG + + # 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 + CY_AC_LOAD_TKCONFIG + CY_AC_PATH_TCLH + CY_AC_PATH_TKH + CY_AC_PATH_ITCLH + CY_AC_PATH_ITKH + CY_AC_PATH_TIXH + + # now look for Itcl library stuff + + CY_AC_PATH_ITCLCONFIG + if test -z "${no_itcl}"; then + CY_AC_LOAD_ITCLCONFIG + case "${host}" in + *-*-cygwin*) + itcldir=../itcl/itcl/win/ + ;; + *) + itcldir=../itcl/itcl/unix/ + ;; + esac + + + ITCLLIB="${ITCL_BUILD_LIB_SPEC}" + ITCL_DEPS="${itcldir}${ITCL_LIB_FILE}" + fi + + + # now look for Itk library stuff + CY_AC_PATH_ITKCONFIG + if test -z "${no_itcl}"; then + CY_AC_LOAD_ITKCONFIG + + case "${host}" in + *-*-cygwin*) + itkdir=../itcl/itk/win/ + ;; + *) + itkdir=../itcl/itk/unix/ + ;; + esac + + ITKLIB="${ITK_BUILD_LIB_SPEC}" + ITK_DEPS="${itkdir}${ITK_LIB_FILE}" + fi + + # now look for Tix library stuff + CY_AC_PATH_TIXCONFIG + if test -z "${no_tix}"; then + CY_AC_LOAD_TIXCONFIG + TIXLIB="${TIX_BUILD_LIB_SPEC}" + TIX_DEPS="${TIX_BUILD_LOCATION}/${TIX_LIB_FILE}" + fi + + ENABLE_GDBTK=1 + ENABLE_CFLAGS="$ENABLE_CFLAGS -DGDBTK" + # Tcl/Tk 8.1 require -fwritable strings. I don't + # know whether 8.2 will or not, but I bet it will. + # I don't have to worry about 7.x since we don't support it. + GDBTK_CFLAGS="" + if test "$GCC" = "yes"; then + if test "$TCL_VERSION" != "8.0" ; then + GDBTK_CFLAGS="-fwritable-strings" + fi + fi + + # Include some libraries that Tcl and Tk want. + TCL_LIBS='$(LIBGUI) $(ITCL) $(ITK) $(TIX) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)' + CONFIG_DEPS='$(LIBGUI) $(ITCL_DEPS) $(ITK_DEPS) $(TIX_DEPS) $(TK_DEPS) $(TCL_DEPS)' + # 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_SRCS="${CONFIG_SRCS} gdbtk/generic/gdbtk.c gdbtk/generic/gdbtk-cmds.c gdbtk/generic/gdbtk-hooks.c gdbtk/generic/gdbtk-variable.c gdbtk/generic/gdbtk-wrapper.c" + CONFIG_OBS="${CONFIG_OBS} gdbtk.o gdbtk-cmds.o gdbtk-hooks.o gdbtk-variable.o gdbtk-wrapper.o" + CONFIG_INITS="${CONFIG_INITS} gdbtk/generic/gdbtk.c gdbtk/generic/gdbtk-cmds.c gdbtk/generic/gdbtk-hooks.c gdbtk/generic/gdbtk-variable.c gdbtk/generic/gdbtk-wrapper.c" + + 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 + fi +fi + +AC_SUBST(ENABLE_GDBTK) +AC_SUBST(X_CFLAGS) +AC_SUBST(X_LDFLAGS) +AC_SUBST(X_LIBS) +AC_SUBST(ITCLLIB) +AC_SUBST(ITCL_DEPS) +AC_SUBST(ITKLIB) +AC_SUBST(ITK_DEPS) +AC_SUBST(TIXLIB) +AC_SUBST(TIX_DEPS) +AC_SUBST(GDBTKLIBS) +AC_SUBST(GDBTK_CFLAGS) AC_PATH_X @@ -721,6 +872,17 @@ else files="${files} config/nm-empty.h" links="${links} nm.h" fi +AC_PROG_LN_S +# Make it possible to use the GUI without doing a full install +if test "${enable_gdbtk}" = "yes" ; then + if test "$LN_S" = "ln -s" -a ! -f gdbtcl ; then + echo linking $srcdir/gdbtk/library to gdbtcl + $LN_S $srcdir/gdbtk/library gdbtcl + else + echo Warning: Unable to link $srcdir/gdbtk/library to gdbtcl. You will need to do a + echo " " make install before you are able to run the GUI. + fi +fi AC_LINK_FILES($files, $links) -- cgit v1.1