Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@suse.de>
To: gdb-patches@sourceware.org
Subject: --with-system-readline for gdb
Date: Wed, 15 Aug 2007 09:41:00 -0000	[thread overview]
Message-ID: <jey7gddtin.fsf@sykes.suse.de> (raw)

This patch adds the --with-system-readline option to the gdb configure
script.  OK?

Andreas.

2007-08-15  Andreas Schwab  <schwab@suse.de>

	* configure.ac: Accept --with-system-readline.
	(READLINE, READLINE_DEPS, READLINE_CFLAGS): Define and substitute.
	* configure: Regenerate.
	* Makefile.in (READLINE, READLINE_DEPS, READLINE_CFLAGS): Use
	substituted values.
	(CDEPS): Use $(READLINE_DEPS) instead of $(READLINE).

--- gdb/Makefile.in.~1.928.~	2007-08-13 10:59:54.000000000 +0200
+++ gdb/Makefile.in	2007-08-15 10:49:56.000000000 +0200
@@ -127,9 +127,10 @@ BFD_CFLAGS = -I$(BFD_DIR) -I$(BFD_SRC)
 
 # Where is the READLINE library?  Typically in ../readline.
 READLINE_DIR = ../readline
-READLINE = $(READLINE_DIR)/libreadline.a
 READLINE_SRC = $(srcdir)/$(READLINE_DIR)
-READLINE_CFLAGS = -I$(READLINE_SRC)/..
+READLINE = @READLINE@
+READLINE_DEPS = @READLINE_DEPS@
+READLINE_CFLAGS = @READLINE_CFLAGS@
 
 # Where is expat?  This will be empty if expat was not available.
 LIBEXPAT = @LIBEXPAT@
@@ -387,7 +388,7 @@ CLIBS = $(SIM) $(READLINE) $(OPCODES) $(
 	$(XM_CLIBS) $(TM_CLIBS) $(NAT_CLIBS) $(GDBTKLIBS) @LIBS@ \
 	$(LIBICONV) $(LIBEXPAT) \
 	$(LIBIBERTY) $(WIN32LIBS)
-CDEPS = $(XM_CDEPS) $(TM_CDEPS) $(NAT_CDEPS) $(SIM) $(BFD) $(READLINE) \
+CDEPS = $(XM_CDEPS) $(TM_CDEPS) $(NAT_CDEPS) $(SIM) $(BFD) $(READLINE_DEPS) \
 	$(OPCODES) $(INTL_DEPS) $(LIBIBERTY) $(CONFIG_DEPS)
 
 ADD_FILES = $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES)
--- gdb/configure.ac.~1.48.~	2007-06-19 17:10:30.000000000 +0200
+++ gdb/configure.ac	2007-08-15 10:53:48.000000000 +0200
@@ -337,6 +337,23 @@ if test "$ac_cv_search_tgetent" = no; th
   AC_MSG_ERROR([no termcap library found])
 fi
 
+AC_ARG_WITH([system-readline],
+  [AS_HELP_STRING([--with-system-readline],
+                  [use installed readline library])])
+
+if test "$with_system_readline" = yes; then
+  READLINE=-lreadline
+  READLINE_DEPS=
+  READLINE_CFLAGS=
+else
+  READLINE='$(READLINE_DIR)/libreadline.a'
+  READLINE_DEPS='$(READLINE)'
+  READLINE_CFLAGS='-I$(READLINE_SRC)/..'
+fi
+AC_SUBST(READLINE)
+AC_SUBST(READLINE_DEPS)
+AC_SUBST(READLINE_CFLAGS)
+
 AC_LIB_HAVE_LINKFLAGS([expat], [], [#include "expat.h"],
 		      [XML_Parser p = XML_ParserCreate (0);])
 if test "$HAVE_LIBEXPAT" != yes; then

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


             reply	other threads:[~2007-08-15  9:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-15  9:41 Andreas Schwab [this message]
2007-08-15  9:44 ` Bob Rossi
2007-08-15  9:49   ` Andreas Schwab
2007-08-15  9:50 ` Jan Kratochvil
2007-09-03 17:29 ` Daniel Jacobowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jey7gddtin.fsf@sykes.suse.de \
    --to=schwab@suse.de \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox