From a2b63bbd6bea338402c419ddad28a782f4e180d1 Mon Sep 17 00:00:00 2001 From: Jason Molenda Date: Wed, 25 Oct 1995 01:33:26 +0000 Subject: [PATCH] Tue Oct 24 18:30:18 1995 Jason Molenda (crash@phydeaux.cygnus.com) * config/pa/hppahpux.mh: Remove hardcoding of X locations. * Makefile.in: Use X11_CFLAGS, X11_LDFLAGS and X11_LIBS. * configure.in: Link X statically on Solaris, SunOS and HPUX. --- gdb/Makefile.in | 20 ++- gdb/config/pa/hppahpux.mh | 3 - gdb/configure | 352 ++++++++++++++------------------------ gdb/configure.in | 95 +++++++--- 4 files changed, 206 insertions(+), 264 deletions(-) diff --git a/gdb/Makefile.in b/gdb/Makefile.in index d8d13ef21c3..693fb860090 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -74,8 +74,8 @@ MAKEINFO=makeinfo # Set this up with gcc if you have gnu ld and the loader will print out # line numbers for undefined references. -#CC-LD=gcc -static -CC-LD=$(CC) +#CC_LD=gcc -static +CC_LD=$(CC) # Where is our "include" directory? Typically $(srcdir)/../include. # This is essentially the header file directory for the library @@ -90,12 +90,13 @@ LIBIBERTY = ../libiberty/libiberty.a # Note that mmalloc can still be used on systems without mmap(). # To use your system malloc, comment out the following defines. MMALLOC_DIR = ../mmalloc +MMALLOC_SRC = $(srcdir)/$(MMALLOC_DIR) MMALLOC = $(MMALLOC_DIR)/libmmalloc.a # To use your system malloc, uncomment MMALLOC_DISABLE. #MMALLOC_DISABLE = -DNO_MMALLOC # To use mmalloc but disable corruption checking, uncomment MMALLOC_CHECK #MMALLOC_CHECK = -DNO_MMALLOC_CHECK -MMALLOC_CFLAGS = -I$(srcdir)/$(MMALLOC_DIR) $(MMALLOC_CHECK) $(MMALLOC_DISABLE) +MMALLOC_CFLAGS = -I$(MMALLOC_SRC) $(MMALLOC_CHECK) $(MMALLOC_DISABLE) # Where is the BFD library? Typically in ../bfd. BFD_DIR = ../bfd @@ -133,8 +134,9 @@ TCL_CFLAGS = @TCLHDIR@ TK = @TKLIB@ TK_CFLAGS = @TKHDIR@ -X11 = @X_LIBDIR@ @X_PRE_LIBS@ -lX11 @X_EXTRA_LIBS@ -X11_CFLAGS = @X_INCDIR@ +X11_CFLAGS = @X_CFLAGS@ $(X11_EXTRA_CFLAGS) +X11_LDFLAGS = @X_LDFLAGS@ +X11_LIBS = @X_LIBS@ $(X11_EXTRA_LIBS) ENABLE_GDBTK= @ENABLE_GDBTK@ #end-sanitize-gdbtk @@ -224,7 +226,7 @@ RUNTESTFLAGS= # part of libiberty) a POSIX interface. But at least for now the # host-dependent makefile fragment might need to use something else # besides ser-unix.o -SER_HARDWIRE=ser-unix.o +SER_HARDWIRE = ser-unix.o # The `remote' debugging target is supported for most architectures, # but not all (e.g. 960) @@ -601,7 +603,7 @@ init.c: $(OBS) $(TSOBS) # Removing the old gdb first works better if it is running, at least on SunOS. gdb: $(OBS) $(TSOBS) $(ADD_DEPS) $(CDEPS) init.o rm -f gdb - $(CC-LD) $(INTERNAL_LDFLAGS) -o gdb \ + $(CC_LD) $(INTERNAL_LDFLAGS) -o gdb \ init.o $(OBS) $(TSOBS) $(ADD_FILES) $(CLIBS) $(LOADLIBES) nlm: force @@ -643,7 +645,7 @@ saber_gdb: $(SFILES) $(DEPFILES) copying.c version.c # A Mach 3.0 program to force gdb back to command level stop-gdb: stop-gdb.o - ${CC-LD} $(GLOBAL_CFLAGS) $(LDFLAGS) -o stop-gdb \ + ${CC_LD} $(GLOBAL_CFLAGS) $(LDFLAGS) -o stop-gdb \ stop-gdb.o $(CLIBS) $(LOADLIBES) # This is useful when debugging GDB, because some Unix's don't let you run GDB @@ -1406,6 +1408,8 @@ rs6000-tdep.o: rs6000-tdep.c $(defs_h) $(gdbcore_h) $(inferior_h) \ ser-go32.o: ser-go32.c $(defs_h) serial.h +ser-mac.o: ser-mac.c $(defs_h) serial.h signals.h + ser-tcp.o: ser-tcp.c $(defs_h) serial.h signals.h ser-unix.o: ser-unix.c $(defs_h) serial.h diff --git a/gdb/config/pa/hppahpux.mh b/gdb/config/pa/hppahpux.mh index 8e736520bc1..683c1d7df8e 100644 --- a/gdb/config/pa/hppahpux.mh +++ b/gdb/config/pa/hppahpux.mh @@ -4,9 +4,6 @@ TERMCAP = -lcurses XM_FILE= xm-hppah.h XDEPFILES= ser-tcp.o -XM_CLIBS= -L/usr/lib/X11R5 - -X11_CFLAGS= -I/usr/include/X11R5 NAT_FILE= nm-hppah.h NATDEPFILES= hppah-nat.o coredep.o corelow.o inftarg.o fork-child.o somread.o infptrace.o hpread.o somsolib.o diff --git a/gdb/configure b/gdb/configure index 994818ba01d..6be8cf9ba4c 100755 --- a/gdb/configure +++ b/gdb/configure @@ -1,7 +1,7 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.4.2 +# Generated automatically using autoconf version 2.4 # Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation @@ -39,18 +39,6 @@ target=NONE verbose= x_includes=NONE x_libraries=NONE -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -libdir='${exec_prefix}/lib' -includedir='${prefix}/include' -oldincludedir='/usr/include' -infodir='${prefix}/info' -mandir='${prefix}/man' # Initialize some other variables. subdirs= @@ -75,14 +63,9 @@ do case "$ac_option" in - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir="$ac_optarg" ;; - - -build | --build | --buil | --bui | --bu) + -build | --build | --buil | --bui | --bu | --b) ac_prev=build ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) + -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*) build="$ac_optarg" ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ @@ -92,12 +75,6 @@ do | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file="$ac_optarg" ;; - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) - datadir="$ac_optarg" ;; - -disable-* | --disable-*) ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` # Reject names that are not valid shell variable names. @@ -148,26 +125,12 @@ Configuration: Directory and file names: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + --exec-prefix=PREFIX install architecture-dependent files in PREFIX [same as prefix] - --bindir=DIR user executables in DIR [EPREFIX/bin] - --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] - --libexecdir=DIR program executables in DIR [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data in DIR [PREFIX/share] - --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data in DIR [PREFIX/com] - --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] - --libdir=DIR object code libraries in DIR [EPREFIX/lib] - --includedir=DIR C header files in DIR [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] - --infodir=DIR info documentation in DIR [PREFIX/info] - --mandir=DIR man documentation in DIR [PREFIX/man] --srcdir=DIR find the sources in DIR [configure dir or ..] --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names -EOF - cat << EOF Host type: --build=BUILD configure for building on BUILD [BUILD=HOST] --host=HOST configure for HOST [guessed] @@ -188,44 +151,6 @@ EOF -host=* | --host=* | --hos=* | --ho=*) host="$ac_optarg" ;; - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir="$ac_optarg" ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir="$ac_optarg" ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir="$ac_optarg" ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir="$ac_optarg" ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst \ - | --locals | --local | --loca | --loc | --lo) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) - localstatedir="$ac_optarg" ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir="$ac_optarg" ;; - -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; @@ -238,15 +163,6 @@ EOF | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir="$ac_optarg" ;; - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) @@ -287,23 +203,6 @@ EOF | -silent | --silent | --silen | --sile | --sil) silent=yes ;; - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir="$ac_optarg" ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir="$ac_optarg" ;; - -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) @@ -314,13 +213,6 @@ EOF -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir="$ac_optarg" ;; - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir="$ac_optarg" ;; - -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) @@ -330,7 +222,7 @@ EOF verbose=yes ;; -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.4.2" + echo "configure generated by autoconf version 2.4" exit 0 ;; -with-* | --with-*) @@ -495,12 +387,9 @@ fi ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='echo $CPP $CPPFLAGS 1>&5; -$CPP $CPPFLAGS' -ac_compile='echo ${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5; -${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5' -ac_link='echo ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5; -${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5' +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5' +ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5' if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. @@ -561,7 +450,6 @@ else ac_cv_prog_gcc=no fi fi - echo "$ac_t""$ac_cv_prog_gcc" 1>&6 if test $ac_cv_prog_gcc = yes; then GCC=yes @@ -579,8 +467,7 @@ fi rm -f conftest* fi - -echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6 + echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6 if test $ac_cv_prog_gcc_g = yes; then CFLAGS="-g -O" else @@ -607,7 +494,7 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error @@ -621,7 +508,7 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error @@ -648,7 +535,7 @@ echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking for AIX""... $ac_c" 1>&6 cat > conftest.$ac_ext <&6 else cat > conftest.$ac_ext < EOF @@ -793,17 +680,10 @@ else esac done IFS="$ac_save_ifs" - + # As a last resort, use the slow shell script. + test -z "$ac_cv_path_install" && ac_cv_path_install="$ac_install_sh" 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 - # break other packages using the cache if that directory is - # removed, or if the path is relative. - INSTALL="$ac_install_sh" - fi + INSTALL="$ac_cv_path_install" fi echo "$ac_t""$INSTALL" 1>&6 @@ -1007,7 +887,7 @@ else ac_cv_c_cross=yes else cat > conftest.$ac_ext <&6 cross_compiling=$ac_cv_c_cross +echo "$ac_t""$ac_cv_c_cross" 1>&6 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1051,7 +930,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1069,7 +948,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1090,7 +969,7 @@ if test "$cross_compiling" = yes; then ac_cv_header_stdc=no else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1111,7 +990,6 @@ fi rm -fr conftest* fi fi - echo "$ac_t""$ac_cv_header_stdc" 1>&6 if test $ac_cv_header_stdc = yes; then cat >> confdefs.h <<\EOF @@ -1128,7 +1006,7 @@ 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 @@ -1146,7 +1024,7 @@ rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdedfghijklmnopqrstuvwxyz./\055' 'ABCDEDFGHIJKLMNOPQRSTUVWXYZ___'` + ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'` cat >> confdefs.h <&6 else cat > conftest.$ac_ext < #include @@ -1202,7 +1080,6 @@ fi rm -f conftest* fi - echo "$ac_t""$ac_cv_header_stat_broken" 1>&6 if test $ac_cv_header_stat_broken = yes; then cat >> confdefs.h <<\EOF @@ -1220,7 +1097,7 @@ else ac_cv_func_mmap=no else cat > conftest.$ac_ext <&6 if test $ac_cv_func_mmap = yes; then cat >> confdefs.h <<\EOF @@ -1319,8 +1195,8 @@ ENABLE_CLIBS= ENABLE_OBS= # Check whether --enable-netrom or --disable-netrom was given. -if test "${enable_netrom+set}" = set; then - enableval="$enable_netrom" +enableval="$enable_netrom" +if test -n "$enableval"; then case "${enableval}" in yes) enable_netrom=yes ;; no) enable_netrom=no ;; @@ -1337,8 +1213,8 @@ fi ENABLE_GDBTK= # Check whether --enable-gdbtk or --disable-gdbtk was given. -if test "${enable_gdbtk+set}" = set; then - enableval="$enable_gdbtk" +enableval="$enable_gdbtk" +if test -n "$enableval"; then case "${enableval}" in yes) enable_gdbtk=yes ;; no) enable_gdbtk=no ;; @@ -1348,15 +1224,15 @@ fi if test "${enable_gdbtk}" = "yes"; then - # If we find X, set shell vars x_includes and x_libraries to the + # 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 # Check whether --with-x or --without-x was given. -if test "${with_x+set}" = set; then - withval="$with_x" +withval="$with_x" +if test -n "$withval"; then : fi @@ -1409,7 +1285,7 @@ test -z "$x_direct_test_library" && x_direct_test_library=Xt test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h cat > conftest.$ac_ext < EOF @@ -1472,7 +1348,7 @@ rm -f conftest* ac_save_LIBS="$LIBS" LIBS="-l$x_direct_test_library $LIBS" cat > conftest.$ac_ext <&6 fi - if test "$no_x" = yes; then + if test "$no_x" = yes; then # Not all programs may use this symbol, but it does not hurt to define it. X_CFLAGS="$X_CFLAGS -DX_DISPLAY_MISSING" else @@ -1584,14 +1460,13 @@ else # libraries we check for below, so use a different variable. # --interran@uluru.Stanford.EDU, kb@cs.umb.edu. echo $ac_n "checking for -lICE""... $ac_c" 1>&6 -ac_lib_var=`echo ICE | tr './+' '__p'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then +if eval "test \"`echo '$''{'ac_cv_lib_ICE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lICE $LIBS" cat > conftest.$ac_ext <&6 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" else @@ -1628,14 +1503,13 @@ fi # libraries were built with DECnet support. And karl@cs.umb.edu says # the Alpha needs dnet_stub (dnet does not exist). echo $ac_n "checking for -ldnet""... $ac_c" 1>&6 -ac_lib_var=`echo dnet | tr './+' '__p'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then +if eval "test \"`echo '$''{'ac_cv_lib_dnet'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-ldnet $LIBS" cat > conftest.$ac_ext <&6 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" else @@ -1663,14 +1537,13 @@ fi if test $ac_cv_lib_dnet = no; then echo $ac_n "checking for -ldnet_stub""... $ac_c" 1>&6 -ac_lib_var=`echo dnet_stub | tr './+' '__p'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then +if eval "test \"`echo '$''{'ac_cv_lib_dnet_stub'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-ldnet_stub $LIBS" cat > conftest.$ac_ext <&6 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" else @@ -1703,14 +1576,13 @@ fi # Not sure which flavor of 386 UNIX this is, but it seems harmless to # check for it. echo $ac_n "checking for -lnsl""... $ac_c" 1>&6 -ac_lib_var=`echo nsl | tr './+' '__p'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then +if eval "test \"`echo '$''{'ac_cv_lib_nsl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&6 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" else @@ -1742,14 +1614,13 @@ fi # But -lsocket is broken on IRIX, according to simon@lia.di.epfl.ch. if test "`(uname) 2>/dev/null`" != IRIX; then echo $ac_n "checking for -lsocket""... $ac_c" 1>&6 -ac_lib_var=`echo socket | tr './+' '__p'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then +if eval "test \"`echo '$''{'ac_cv_lib_socket'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&6 X_EXTRA_LIBS="$X_EXTRA_LIBS -lsocket" else @@ -1780,7 +1651,7 @@ fi fi - + # # Ok, lets find the tk source trees so we can use the headers # If the directory (presumably symlink) named "tk" exists, use that one @@ -1806,7 +1677,7 @@ 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 @@ -1882,7 +1753,7 @@ fi - + # # Ok, lets find the tcl source trees so we can use the headers # @@ -1908,7 +1779,7 @@ 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 @@ -1978,26 +1849,67 @@ fi - ENABLE_GDBTK=1 + ENABLE_GDBTK=1 - if test "x$x_includes" != "x" ; - then - X_INCDIR="-I$x_includes" - else - X_INCDIR="" - fi + if test "x$no_x" != "xyes"; then + if test "x$x_includes" != "x" ; + then + X_CFLAGS="-I$x_includes" + else + X_CFLAGS="" + fi + + if test "x$x_libraries" != "x" ; + then + X_LDFLAGS="-L$x_libraries" + else + X_LDFLAGS="" + fi + + case "$host" in +# +# gdb linked statically w/ Solaris iff GCC is used, otherwise dynamic +# + sparc-sun-solaris2*) + if test "x$GCC" = "xyes"; + then + X_LIBS="-Wl,-Bstatic -lX11 -lXext -lX11 -Wl,-Bdynamic" + else + if test "x$x_libraries" != "x" ; + then + X_LDFLAGS="$X_LDFLAGS -R$x_libraries" + fi + X_LIBS="-lX11 -lXext -lX11" + fi ;; +# +# gdb linked statically w/ SunOS or HPUX +# + m68k-hp-hpux*|hppa*-hp-hpux*|sparc-sun-sunos*) + if test "x$x_libraries" != "x" ; + then + X_LIBS="$x_libraries/libX11.a" + else + X_LIBS="/usr/lib/libX11.a" + fi ;; +# +# default is to link dynamically +# + *) + X_LIBS="-lX11" ;; + esac + else + X_LDLAGS="" + X_CFLAGS="" + X_LIBS="" + echo "configure: warning: No X based programs will be built" 1>&2 + fi + + TCL_LIBS='$(TCL) $(TK) $(X11_LDFLAGS) $(X11_LIBS)' + ENABLE_CLIBS="${ENABLE_CLIBS} ${TCL_LIBS} -lm" + ENABLE_OBS="${ENABLE_OBS} gdbtk.o" +fi - if test "x$x_libraries" != "x" ; - then - X_LIBDIR="-L$x_libraries" - else - X_LIBDIR="" - fi - TCL_LIBS='$(TCL) $(TK) $(X11)' - ENABLE_CLIBS="${ENABLE_CLIBS} ${TCL_LIBS} -lm" - ENABLE_OBS="${ENABLE_OBS} gdbtk.o" -fi @@ -2523,7 +2435,7 @@ do echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.4.2" + echo "$CONFIG_STATUS generated by autoconf version 2.4" exit 0 ;; -help | --help | --hel | --he | --h) echo "\$ac_cs_usage"; exit 0 ;; @@ -2550,18 +2462,6 @@ s%@LIBS@%$LIBS%g s%@exec_prefix@%$exec_prefix%g s%@prefix@%$prefix%g s%@program_transform_name@%$program_transform_name%g -s%@bindir@%$bindir%g -s%@sbindir@%$sbindir%g -s%@libexecdir@%$libexecdir%g -s%@datadir@%$datadir%g -s%@sysconfdir@%$sysconfdir%g -s%@sharedstatedir@%$sharedstatedir%g -s%@localstatedir@%$localstatedir%g -s%@libdir@%$libdir%g -s%@includedir@%$includedir%g -s%@oldincludedir@%$oldincludedir%g -s%@infodir@%$infodir%g -s%@mandir@%$mandir%g s%@CC@%$CC%g s%@CPP@%$CPP%g s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g @@ -2592,8 +2492,8 @@ s%@TKLIB@%$TKLIB%g s%@TCLHDIR@%$TCLHDIR%g s%@TCLLIB@%$TCLLIB%g s%@ENABLE_GDBTK@%$ENABLE_GDBTK%g -s%@X_INCDIR@%$X_INCDIR%g -s%@X_LIBDIR@%$X_LIBDIR%g +s%@X_CLFAGS@%$X_CLFAGS%g +s%@X_LDFLAGS@%$X_LDFLAGS%g s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g s%@ENABLE_CLIBS@%$ENABLE_CLIBS%g s%@ENABLE_OBS@%$ENABLE_OBS%g diff --git a/gdb/configure.in b/gdb/configure.in index bc3220ac327..fbe72df2c7a 100644 --- a/gdb/configure.in +++ b/gdb/configure.in @@ -51,35 +51,76 @@ no) enable_gdbtk=no ;; esac]) if test "${enable_gdbtk}" = "yes"; then - AC_PATH_X - AC_PATH_XTRA - - CYGNUS_PATH_TK - CYGNUS_PATH_TCL - - ENABLE_GDBTK=1 - - if test "x$x_includes" != "x" ; - then - X_INCDIR="-I$x_includes" - else - X_INCDIR="" - fi - - if test "x$x_libraries" != "x" ; - then - X_LIBDIR="-L$x_libraries" - else - X_LIBDIR="" - fi - - TCL_LIBS='$(TCL) $(TK) $(X11)' - ENABLE_CLIBS="${ENABLE_CLIBS} ${TCL_LIBS} -lm" - ENABLE_OBS="${ENABLE_OBS} gdbtk.o" + AC_PATH_X + AC_PATH_XTRA + + CYGNUS_PATH_TK + CYGNUS_PATH_TCL + + ENABLE_GDBTK=1 + + if test "x$no_x" != "xyes"; then + if test "x$x_includes" != "x" ; + then + X_CFLAGS="-I$x_includes" + else + X_CFLAGS="" + fi + + if test "x$x_libraries" != "x" ; + then + X_LDFLAGS="-L$x_libraries" + else + X_LDFLAGS="" + fi + + case "$host" in +# +# gdb linked statically w/ Solaris iff GCC is used, otherwise dynamic +# + sparc-sun-solaris2*) + if test "x$GCC" = "xyes"; + then + X_LIBS="-Wl,-Bstatic -lX11 -lXext -lX11 -Wl,-Bdynamic" + else + if test "x$x_libraries" != "x" ; + then + X_LDFLAGS="$X_LDFLAGS -R$x_libraries" + fi + X_LIBS="-lX11 -lXext -lX11" + fi ;; +# +# gdb linked statically w/ SunOS or HPUX +# + m68k-hp-hpux*|hppa*-hp-hpux*|sparc-sun-sunos*) + if test "x$x_libraries" != "x" ; + then + X_LIBS="$x_libraries/libX11.a" + else + X_LIBS="/usr/lib/libX11.a" + fi ;; +# +# default is to link dynamically +# + *) + X_LIBS="-lX11" ;; + esac + else + X_LDLAGS="" + X_CFLAGS="" + X_LIBS="" + AC_MSG_WARN([No X based programs will be built]) + fi + + TCL_LIBS='$(TCL) $(TK) $(X11_LDFLAGS) $(X11_LIBS)' + ENABLE_CLIBS="${ENABLE_CLIBS} ${TCL_LIBS} -lm" + ENABLE_OBS="${ENABLE_OBS} gdbtk.o" fi + AC_SUBST(ENABLE_GDBTK) -AC_SUBST(X_INCDIR) -AC_SUBST(X_LIBDIR) +AC_SUBST(X_CLFAGS) +AC_SUBST(X_LDFLAGS) +AC_SUBST(X_LIBS) # end-sanitize-gdbtk AC_SUBST(ENABLE_CFLAGS) -- 2.30.2