Initial Linux ELF support.
authorMichael Meissner <gnu@the-meissners.org>
Thu, 6 Apr 1995 21:08:05 +0000 (21:08 +0000)
committerMichael Meissner <gnu@the-meissners.org>
Thu, 6 Apr 1995 21:08:05 +0000 (21:08 +0000)
gdb/ChangeLog
gdb/configure.in
gdb/gdbtk.c

index d0cb66c..7d8f0e1 100644 (file)
@@ -1,3 +1,19 @@
+Thu Apr  6 17:00:46 1995  Michael Meissner  <meissner@tiktok.cygnus.com>
+
+       * Makefile.in (X11_INCLUDES): Define as empty.
+       (X11_CFLAGS): Define as including $(X11_INCLUDES).
+       (X11_LIB_SWITCHES): Define as empty.
+       (X11_LIBS): Define as -lX11.
+
+       * configure.in (enable_gdbtk): If gdbtk, support the --x-includes
+       and --x-libraries switches, setting the X11_INCLUDES and
+       X11_LIB_SWITCHES respectively.  Instead of using a hardcoded -lX11
+       in ENABLE_CLIBS, use the X11_LIB_SWITCHES and X11_LIBS variables.
+
+       * gdbtk.c (gdbtk_init): If SIOCSPGRP is not available, don't use
+       it.  This means that the stop button doesn't work, but is better
+       than nothing.
+
 Wed Apr  5 19:57:38 1995  Jim Kingdon  (kingdon@lioth.cygnus.com)
 
        * mips-tdep.c (mips_print_register): Remove unused variable
index c2fc4ba..52cebd8 100644 (file)
@@ -437,11 +437,30 @@ fi
 
 # start-sanitize-gdbtk
 if [ "${enable_gdbtk}" = "yes" ] ; then
+       if [ x"${other_options}" != x"" ]; then
+               for opt in $other_options; do
+                       case "$opt" in
+                               -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+                               | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+                                       X11_INCLUDES=`echo "$opt" | sed 's/[-_a-zA-Z0-9]*=//'`
+                                       sed -e "s;^\\(X11_INCLUDES[     ]*=\\).*\$;\\1 -I${X11_INCLUDES};" \
+                                               < Makefile > Makefile.tem
+                                       mv -f Makefile.tem Makefile;;
+
+                               -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+                               | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+                                       X11_LIB_SWITCHES=`echo "$opt" | sed 's/[-_a-zA-Z0-9]*=//'`
+                                       sed -e "s;^\\(X11_LIB_SWITCHES[         ]*=\\).*\$;\\1 -L${X11_LIB_SWITCHES};" \
+                                               < Makefile > Makefile.tem
+                                       mv -f Makefile.tem Makefile;;
+                       esac
+               done
+       fi
        sed -e '/# End of host and/i\
 \
 ENABLE_GDBTK = 1\
 ENABLE_DEPFILES = gdbtk.o\
-ENABLE_CLIBS = $(TCL) $(TK) -lX11 -lm
+ENABLE_CLIBS = $(TCL) $(TK) $(X11_LIB_SWITCHES) $(X11_LIBS) -lm
 ' < Makefile > Makefile.tem
        mv -f Makefile.tem Makefile
 fi
index fd4aeed..f3d8204 100644 (file)
@@ -1117,9 +1117,11 @@ gdbtk_init ()
   if (ioctl (x_fd, FIOASYNC, &i))
     perror_with_name ("gdbtk_init: ioctl FIOASYNC failed");
 
+#ifdef SIOCSPGRP
   i = getpid();
   if (ioctl (x_fd, SIOCSPGRP, &i))
     perror_with_name ("gdbtk_init: ioctl SIOCSPGRP failed");
+#endif
 #else
   if (ioctl (x_fd,  I_SETSIG, S_INPUT|S_RDNORM) < 0)
     perror_with_name ("gdbtk_init: ioctl I_SETSIG failed");