This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

--with-system-readline for gdb


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."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]