From 6a30b0a545185ae9b6b69744a64f3ff76312470a Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 3 Sep 2007 19:00:16 +0000 Subject: [PATCH] * 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/ChangeLog | 9 +++++++++ gdb/Makefile.in | 7 ++++--- gdb/configure | 26 +++++++++++++++++++++++++- gdb/configure.ac | 17 +++++++++++++++++ 4 files changed, 55 insertions(+), 4 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 085e1b61adf..c54a9327783 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,12 @@ +2007-09-03 Andreas Schwab + + * 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). + 2007-09-03 Maxim Grigoriev Daniel Jacobowitz diff --git a/gdb/Makefile.in b/gdb/Makefile.in index 7349156cf06..95e38bf1da6 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -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) $(BFD) $(INTL) $(LIBIBERTY) \ $(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) diff --git a/gdb/configure b/gdb/configure index a696cb683cb..185f19c250d 100755 --- a/gdb/configure +++ b/gdb/configure @@ -313,7 +313,7 @@ ac_includes_default="\ ac_subdirs_all="$ac_subdirs_all gdbtk" ac_subdirs_all="$ac_subdirs_all multi-ice" ac_subdirs_all="$ac_subdirs_all gdbserver" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS DATADIRNAME INSTOBJEXT GENCAT CATOBJEXT localedir PACKAGE subdirs AWK INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S RANLIB ac_ct_RANLIB YACC AR ac_ct_AR DLLTOOL ac_ct_DLLTOOL WINDRES ac_ct_WINDRES MIG ac_ct_MIG HAVE_LIBEXPAT LIBEXPAT LTLIBEXPAT ALLOCA CONFIG_LDFLAGS TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE WARN_CFLAGS WERROR_CFLAGS SER_HARDWIRE WIN32LIBS LIBGUI GUI_CFLAGS_X WIN32LDAPP TCL_VERSION TCL_MAJOR_VERSION TCL_MINOR_VERSION TCL_CC TCL_DEFS TCL_SHLIB_CFLAGS TCL_SHLIB_LD TCL_SHLIB_LD_LIBS TCL_SHLIB_SUFFIX TCL_DL_LIBS TCL_LD_FLAGS TCL_LD_SEARCH_FLAGS TCL_CC_SEARCH_FLAGS TCL_COMPAT_OBJS TCL_RANLIB TCL_BUILD_LIB_SPEC TCL_LIB_SPEC TCL_LIB_VERSIONS_OK TK_VERSION TK_DEFS TK_BUILD_INCLUDES TK_XINCLUDES TK_XLIBSW TK_BUILD_LIB_SPEC TK_LIB_SPEC TCLHDIR TKHDIR ITCLHDIR ITKHDIR ITCL_VERSION ITCL_DEFS ITCL_BUILD_INCLUDES ITCL_BUILD_LIB_SPEC ITCL_LIB_SPEC ITK_VERSION ITK_DEFS ITK_BUILD_INCLUDES ITK_BUILD_LIB_SPEC ITK_LIB_SPEC X_CFLAGS X_LDFLAGS X_LIBS TCL_DEPS TK_DEPS ITCLLIB ITCL_DEPS ITKLIB ITK_DEPS GDBTKLIBS GDBTK_CFLAGS GDBTK_SRC_DIR IGNORE_SIM IGNORE_SIM_OBS ENABLE_CFLAGS PROFILE_CFLAGS CONFIG_OBS CONFIG_DEPS CONFIG_SRCS CONFIG_ALL CONFIG_CLEAN CONFIG_INSTALL CONFIG_UNINSTALL target_subdir frags xm_h tm_h nm_h LIBICONV LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS DATADIRNAME INSTOBJEXT GENCAT CATOBJEXT localedir PACKAGE subdirs AWK INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S RANLIB ac_ct_RANLIB YACC AR ac_ct_AR DLLTOOL ac_ct_DLLTOOL WINDRES ac_ct_WINDRES MIG ac_ct_MIG READLINE READLINE_DEPS READLINE_CFLAGS HAVE_LIBEXPAT LIBEXPAT LTLIBEXPAT ALLOCA CONFIG_LDFLAGS TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE WARN_CFLAGS WERROR_CFLAGS SER_HARDWIRE WIN32LIBS LIBGUI GUI_CFLAGS_X WIN32LDAPP TCL_VERSION TCL_MAJOR_VERSION TCL_MINOR_VERSION TCL_CC TCL_DEFS TCL_SHLIB_CFLAGS TCL_SHLIB_LD TCL_SHLIB_LD_LIBS TCL_SHLIB_SUFFIX TCL_DL_LIBS TCL_LD_FLAGS TCL_LD_SEARCH_FLAGS TCL_CC_SEARCH_FLAGS TCL_COMPAT_OBJS TCL_RANLIB TCL_BUILD_LIB_SPEC TCL_LIB_SPEC TCL_LIB_VERSIONS_OK TK_VERSION TK_DEFS TK_BUILD_INCLUDES TK_XINCLUDES TK_XLIBSW TK_BUILD_LIB_SPEC TK_LIB_SPEC TCLHDIR TKHDIR ITCLHDIR ITKHDIR ITCL_VERSION ITCL_DEFS ITCL_BUILD_INCLUDES ITCL_BUILD_LIB_SPEC ITCL_LIB_SPEC ITK_VERSION ITK_DEFS ITK_BUILD_INCLUDES ITK_BUILD_LIB_SPEC ITK_LIB_SPEC X_CFLAGS X_LDFLAGS X_LIBS TCL_DEPS TK_DEPS ITCLLIB ITCL_DEPS ITKLIB ITK_DEPS GDBTKLIBS GDBTK_CFLAGS GDBTK_SRC_DIR IGNORE_SIM IGNORE_SIM_OBS ENABLE_CFLAGS PROFILE_CFLAGS CONFIG_OBS CONFIG_DEPS CONFIG_SRCS CONFIG_ALL CONFIG_CLEAN CONFIG_INSTALL CONFIG_UNINSTALL target_subdir frags xm_h tm_h nm_h LIBICONV LIBOBJS LTLIBOBJS' ac_subst_files='host_makefile_frag target_makefile_frag' # Initialize some variables set by options. @@ -877,6 +877,7 @@ Optional Packages: --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-separate-debug-dir=path Look for global separate debug info in this path LIBDIR/debug --with-libunwind Use libunwind frame unwinding support + --with-system-readline use installed readline library --with-gnu-ld assume the C compiler uses GNU ld default=no --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib --without-libexpat-prefix don't search for libexpat in includedir and libdir @@ -5718,6 +5719,26 @@ echo "$as_me: error: no termcap library found" >&2;} fi +# Check whether --with-system-readline or --without-system-readline was given. +if test "${with_system_readline+set}" = set; then + withval="$with_system_readline" + +fi; + +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 + + + + + if test "X$prefix" = "XNONE"; then acl_final_prefix="$ac_default_prefix" else @@ -24377,6 +24398,9 @@ s,@WINDRES@,$WINDRES,;t t s,@ac_ct_WINDRES@,$ac_ct_WINDRES,;t t s,@MIG@,$MIG,;t t s,@ac_ct_MIG@,$ac_ct_MIG,;t t +s,@READLINE@,$READLINE,;t t +s,@READLINE_DEPS@,$READLINE_DEPS,;t t +s,@READLINE_CFLAGS@,$READLINE_CFLAGS,;t t s,@HAVE_LIBEXPAT@,$HAVE_LIBEXPAT,;t t s,@LIBEXPAT@,$LIBEXPAT,;t t s,@LTLIBEXPAT@,$LTLIBEXPAT,;t t diff --git a/gdb/configure.ac b/gdb/configure.ac index 651f7b9906f..4fdf4165b28 100644 --- a/gdb/configure.ac +++ b/gdb/configure.ac @@ -335,6 +335,23 @@ if test "$ac_cv_search_tgetent" = no; then 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 -- 2.30.2