diff options
author | Ludovic Courtès <ludo@gnu.org> | 2009-08-21 01:18:20 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2009-08-21 01:49:29 +0200 |
commit | 7a5ab3693ca5be77f1014130eff3bb3cf483e8be (patch) | |
tree | 9fa33b178c126dfe06bdeebcfbabbe6946f259f3 /guile-readline | |
parent | afe5e6baa76796b1467890fd55416a7f304bed5c (diff) |
Don't use a sub-`configure' for `guile-readline'.
* acinclude.m4 (GUILE_READLINE): New macro, based on the former
`guile-readline/configure.ac'.
* configure.ac: Remove `AC_CONFIG_SUBDIRS' invocation. Add
`GUILE_READLINE' invocation. Produce files under `guile-readline'.
* guile-readline/Makefile.am: Conditionalize the meat under
`HAVE_READLINE'.
(INCLUDES): Rename to...
(AM_CPPFLAGS): this. Users updates.
(AM_CFLAGS): New variable.
(libguilereadline_v_@LIBGUILEREADLINE_MAJOR@_la_LIBADD): Add
$(READLINE_LIBS).
* guile-readline/readline.c: Include <config.h>.
* guile-readline/configure.ac, guile-readline/autogen.sh: Remove.
Diffstat (limited to 'guile-readline')
-rw-r--r-- | guile-readline/Makefile.am | 24 | ||||
-rwxr-xr-x | guile-readline/autogen.sh | 8 | ||||
-rw-r--r-- | guile-readline/configure.ac | 88 | ||||
-rw-r--r-- | guile-readline/readline.c | 8 |
4 files changed, 21 insertions, 107 deletions
diff --git a/guile-readline/Makefile.am b/guile-readline/Makefile.am index 9df82bcb1..f505ed228 100644 --- a/guile-readline/Makefile.am +++ b/guile-readline/Makefile.am @@ -1,6 +1,6 @@ ## Process this file with Automake to create Makefile.in ## -## Copyright (C) 1998, 1999, 2000, 2001, 2004, 2006, 2007, 2008 Free Software Foundation, Inc. +## Copyright (C) 1998, 1999, 2000, 2001, 2004, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. ## ## This file is part of guile-readline. ## @@ -21,13 +21,17 @@ SUBDIRS = ice-9 +if HAVE_READLINE + ## Prevent automake from adding extra -I options DEFS = @DEFS@ @EXTRA_DEFS@ ## Check for headers in $(srcdir)/.., so that #include ## <libguile/MUMBLE.h> will find MUMBLE.h in this dir when we're ## building. Also look for Gnulib headers in `lib'. -INCLUDES = -I. -I.. -I$(srcdir)/.. \ - -I$(top_srcdir)/lib -I$(top_builddir)/lib +AM_CPPFLAGS = -I. -I.. -I$(srcdir)/.. \ + -I$(top_srcdir)/lib -I$(top_builddir)/lib + +AM_CFLAGS = $(GCC_CFLAGS) GUILE_SNARF = ../libguile/guile-snarf @@ -35,25 +39,31 @@ lib_LTLIBRARIES = libguilereadline-v-@LIBGUILEREADLINE_MAJOR@.la libguilereadline_v_@LIBGUILEREADLINE_MAJOR@_la_SOURCES = readline.c libguilereadline_v_@LIBGUILEREADLINE_MAJOR@_la_LIBADD = \ - ../libguile/libguile.la ../lib/libgnu.la -libguilereadline_v_@LIBGUILEREADLINE_MAJOR@_la_LDFLAGS = -version-info @LIBGUILEREADLINE_INTERFACE@ -export-dynamic -no-undefined + $(READLINE_LIBS) \ + ../libguile/libguile.la ../lib/libgnu.la + +libguilereadline_v_@LIBGUILEREADLINE_MAJOR@_la_LDFLAGS = \ + -version-info @LIBGUILEREADLINE_INTERFACE@ -export-dynamic \ + -no-undefined BUILT_SOURCES = readline.x pkginclude_HEADERS = readline.h -snarfcppopts = $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) +snarfcppopts = $(DEFS) $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) SUFFIXES = .x .c.x: $(GUILE_SNARF) -o $@ $< $(snarfcppopts) EXTRA_DIST = LIBGUILEREADLINE-VERSION ChangeLog-2008 -MKDEP = gcc -M -MG $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) +MKDEP = gcc -M -MG $(DEFS) $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) CLEANFILES = *.x +endif HAVE_READLINE + dist-hook: (temp="/tmp/mangle-deps.$$$$"; \ trap "rm -f $$temp" 0 1 2 15; \ diff --git a/guile-readline/autogen.sh b/guile-readline/autogen.sh deleted file mode 100755 index 76149ba31..000000000 --- a/guile-readline/autogen.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -[ -f readline-activator.scm ] || { - echo "autogen.sh: run this command only in the guile-readline directory." - exit 1 -} - -autoreconf -i --force diff --git a/guile-readline/configure.ac b/guile-readline/configure.ac deleted file mode 100644 index f24fc9418..000000000 --- a/guile-readline/configure.ac +++ /dev/null @@ -1,88 +0,0 @@ -AC_PREREQ(2.50) - -dnl Don't use "echo -n", which is not portable (e.g., not available on -dnl MacOS X). Instead, use `patsubst' to remove the newline. -AC_INIT(guile-readline, - patsubst(m4_esyscmd(. ../GUILE-VERSION && echo ${GUILE_VERSION}), [ -]), - [bug-guile@gnu.org]) - -AC_CONFIG_AUX_DIR([../build-aux]) -AC_CONFIG_SRCDIR(readline.c) -AM_CONFIG_HEADER([guile-readline-config.h]) -AM_INIT_AUTOMAKE([foreign no-define]) - -. $srcdir/../GUILE-VERSION - -AC_PROG_INSTALL -AC_PROG_CC -AM_PROG_CC_STDC -AC_LIBTOOL_WIN32_DLL -AC_PROG_LIBTOOL - -dnl -dnl Check for Winsock and other functionality on Win32 (*not* CygWin) -dnl -AC_CYGWIN -AC_MINGW32 -EXTRA_DEFS="" -if test "$MINGW32" = "yes" ; then - if test $enable_shared = yes ; then - EXTRA_DEFS="-DSCM_IMPORT" - fi -fi -AC_SUBST(EXTRA_DEFS) - -for termlib in ncurses curses termcap terminfo termlib ; do - AC_CHECK_LIB(${termlib}, tgoto, - [LIBS="-l${termlib} $LIBS"; break]) -done - -AC_LIB_LINKFLAGS(readline) -AC_CHECK_LIB(readline, readline) -if test $ac_cv_lib_readline_readline = no; then - AC_MSG_WARN([libreadline was not found on your system.]) -fi - -AC_CHECK_FUNCS(siginterrupt rl_clear_signals rl_cleanup_after_signal) - -dnl Check for modern readline naming -AC_CHECK_FUNCS(rl_filename_completion_function) - -dnl Check for rl_get_keymap. We only use this for deciding whether to -dnl install paren matching on the Guile command line (when using -dnl readline for input), so it's completely optional. -AC_CHECK_FUNCS(rl_get_keymap) - -AC_CACHE_CHECK([for rl_getc_function pointer in readline], - ac_cv_var_rl_getc_function, - [AC_TRY_LINK([ -#include <stdio.h> -#include <readline/readline.h>], - [printf ("%ld", (long) rl_getc_function)], - [ac_cv_var_rl_getc_function=yes], - [ac_cv_var_rl_getc_function=no])]) -if test "${ac_cv_var_rl_getc_function}" = "yes"; then - AC_DEFINE(HAVE_RL_GETC_FUNCTION, 1, - [Define if your readline library has the rl_getc_function variable.]) -fi - -if test $ac_cv_lib_readline_readline = yes \ - -a $ac_cv_var_rl_getc_function = no; then - AC_MSG_WARN([*** libreadline is too old on your system.]) - AC_MSG_WARN([*** You need readline version 2.1 or later.]) -fi - -AC_CHECK_FUNCS(strdup) - -. $srcdir/LIBGUILEREADLINE-VERSION -AC_SUBST(LIBGUILEREADLINE_MAJOR) -AC_SUBST(LIBGUILEREADLINE_INTERFACE_CURRENT) -AC_SUBST(LIBGUILEREADLINE_INTERFACE_REVISION) -AC_SUBST(LIBGUILEREADLINE_INTERFACE_AGE) -AC_SUBST(LIBGUILEREADLINE_INTERFACE) - -AC_SUBST(GUILE_EFFECTIVE_VERSION) - -AC_CONFIG_FILES(Makefile ice-9/Makefile) -AC_OUTPUT diff --git a/guile-readline/readline.c b/guile-readline/readline.c index 7f86ceb3d..cbf4051cc 100644 --- a/guile-readline/readline.c +++ b/guile-readline/readline.c @@ -1,6 +1,6 @@ /* readline.c --- line editing support for Guile */ -/* Copyright (C) 1997,1999,2000,2001, 2002, 2003, 2006, 2007, 2008 Free Software Foundation, Inc. +/* Copyright (C) 1997,1999,2000,2001, 2002, 2003, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -21,9 +21,9 @@ - -/* Include private, configure generated header (i.e. config.h). */ -#include "guile-readline-config.h" +#ifdef HAVE_CONFIG_H +# include <config.h> +#endif #ifdef HAVE_RL_GETC_FUNCTION #include "libguile.h" |