summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gnulib-local/ChangeLog11
-rw-r--r--gnulib-local/Makefile.am3
-rw-r--r--gnulib-local/m4/termcap.m434
-rw-r--r--gnulib-local/m4/terminfo.m454
-rw-r--r--gnulib-local/modules/termcap1
-rw-r--r--gnulib-local/modules/terminfo1
6 files changed, 81 insertions, 23 deletions
diff --git a/gnulib-local/ChangeLog b/gnulib-local/ChangeLog
index 1e613a76f..32f32ef07 100644
--- a/gnulib-local/ChangeLog
+++ b/gnulib-local/ChangeLog
@@ -1,3 +1,14 @@
+2008-01-13 Bruno Haible <bruno@clisp.org>
+
+ New configure option --disable-curses.
+ * m4/curses.m4: New file.
+ * m4/termcap.m4 (gl_TERMCAP_BODY): Require gl_CURSES and consider its
+ result.
+ * m4/terminfo.m4 (gl_TERMINFO_BODY): Likewise.
+ * modules/termcap (Files): Add m4/curses.m4.
+ * modules/terminfo (Files): Likewise.
+ * Makefile.am (EXTRA_DIST): Add m4/curses.m4.
+
2007-11-09 Bruno Haible <bruno@clisp.org>
* m4/libglib.m4 (gl_LIBGLIB): Ensure that the <glib.h> is from a glib
diff --git a/gnulib-local/Makefile.am b/gnulib-local/Makefile.am
index 88632ef0b..228e45c3f 100644
--- a/gnulib-local/Makefile.am
+++ b/gnulib-local/Makefile.am
@@ -1,5 +1,5 @@
## Makefile for the gnulib-local directory of GNU gettext
-## Copyright (C) 2006-2007 Free Software Foundation, Inc.
+## Copyright (C) 2006-2008 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
@@ -250,6 +250,7 @@ m4/alloca.m4 \
m4/backupfile.m4 \
m4/ChangeLog.0 \
m4/ChangeLog.1 \
+m4/curses.m4 \
m4/exitfail.m4.diff \
m4/gcj.m4 \
m4/hard-locale.m4.diff \
diff --git a/gnulib-local/m4/termcap.m4 b/gnulib-local/m4/termcap.m4
index f4bed5708..a79cd51e0 100644
--- a/gnulib-local/m4/termcap.m4
+++ b/gnulib-local/m4/termcap.m4
@@ -1,5 +1,5 @@
-# termcap.m4 serial 6 (gettext-0.17)
-dnl Copyright (C) 2000-2002, 2006 Free Software Foundation, Inc.
+# termcap.m4 serial 7 (gettext-0.18)
+dnl Copyright (C) 2000-2002, 2006, 2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -34,17 +34,35 @@ AC_DEFUN([gl_TERMCAP_BODY],
dnl tparm().
dnl Some systems, like mingw, have nothing at all.
+ dnl Some people want to avoid these libraries, in special situations such
+ dnl as when cross-compiling.
+ AC_REQUIRE([gl_CURSES])
+
dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
AC_REQUIRE([AC_LIB_RPATH])
- dnl Search for libncurses and define LIBNCURSES, LTLIBNCURSES and INCNCURSES
- dnl accordingly.
- AC_LIB_LINKFLAGS_BODY([ncurses])
+ if test "$gl_curses_allowed" != no; then
+
+ dnl Search for libncurses and define LIBNCURSES, LTLIBNCURSES and INCNCURSES
+ dnl accordingly.
+ AC_LIB_LINKFLAGS_BODY([ncurses])
+
+ dnl Search for libtermcap and define LIBTERMCAP, LTLIBTERMCAP and INCTERMCAP
+ dnl accordingly.
+ AC_LIB_LINKFLAGS_BODY([termcap])
+
+ else
+
+ LIBNCURSES=
+ LTLIBNCURSES=
+ INCNCURSES=
- dnl Search for libtermcap and define LIBTERMCAP, LTLIBTERMCAP and INCTERMCAP
- dnl accordingly.
- AC_LIB_LINKFLAGS_BODY([termcap])
+ LIBTERMCAP=
+ LTLIBTERMCAP=
+ INCTERMCAP=
+
+ fi
AC_CACHE_CHECK([where termcap library functions come from], [gl_cv_termcap], [
gl_cv_termcap="not found, consider installing GNU ncurses"
diff --git a/gnulib-local/m4/terminfo.m4 b/gnulib-local/m4/terminfo.m4
index e4a777081..461137a4b 100644
--- a/gnulib-local/m4/terminfo.m4
+++ b/gnulib-local/m4/terminfo.m4
@@ -1,5 +1,5 @@
-# terminfo.m4 serial 2 (gettext-0.17)
-dnl Copyright (C) 2000-2002, 2006 Free Software Foundation, Inc.
+# terminfo.m4 serial 3 (gettext-0.18)
+dnl Copyright (C) 2000-2002, 2006, 2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -37,25 +37,51 @@ AC_DEFUN([gl_TERMINFO_BODY],
dnl tparm().
dnl Some systems, like mingw, have nothing at all.
+ dnl Some people want to avoid these libraries, in special situations such
+ dnl as when cross-compiling.
+ AC_REQUIRE([gl_CURSES])
+
dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
AC_REQUIRE([AC_LIB_RPATH])
- dnl Search for libncurses and define LIBNCURSES, LTLIBNCURSES and INCNCURSES
- dnl accordingly.
- AC_LIB_LINKFLAGS_BODY([ncurses])
+ if test "$gl_curses_allowed" != no; then
+
+ dnl Search for libncurses and define LIBNCURSES, LTLIBNCURSES and INCNCURSES
+ dnl accordingly.
+ AC_LIB_LINKFLAGS_BODY([ncurses])
+
+ dnl Search for libtermcap and define LIBTERMCAP, LTLIBTERMCAP and INCTERMCAP
+ dnl accordingly.
+ AC_LIB_LINKFLAGS_BODY([termcap])
+
+ dnl Search for libxcurses and define LIBXCURSES, LTLIBXCURSES and INCXCURSES
+ dnl accordingly.
+ AC_LIB_LINKFLAGS_BODY([xcurses])
+
+ dnl Search for libcurses and define LIBCURSES, LTLIBCURSES and INCCURSES
+ dnl accordingly.
+ AC_LIB_LINKFLAGS_BODY([curses])
- dnl Search for libtermcap and define LIBTERMCAP, LTLIBTERMCAP and INCTERMCAP
- dnl accordingly.
- AC_LIB_LINKFLAGS_BODY([termcap])
+ else
+
+ LIBNCURSES=
+ LTLIBNCURSES=
+ INCNCURSES=
+
+ LIBTERMCAP=
+ LTLIBTERMCAP=
+ INCTERMCAP=
- dnl Search for libxcurses and define LIBXCURSES, LTLIBXCURSES and INCXCURSES
- dnl accordingly.
- AC_LIB_LINKFLAGS_BODY([xcurses])
+ LIBXCURSES=
+ LTLIBXCURSES=
+ INCXCURSES=
- dnl Search for libcurses and define LIBCURSES, LTLIBCURSES and INCCURSES
- dnl accordingly.
- AC_LIB_LINKFLAGS_BODY([curses])
+ LIBCURSES=
+ LTLIBCURSES=
+ INCCURSES=
+
+ fi
dnl When searching for the terminfo functions, prefer libtermcap over
dnl libxcurses and libcurses, because it is smaller.
diff --git a/gnulib-local/modules/termcap b/gnulib-local/modules/termcap
index dfd4928dd..fbee86cc1 100644
--- a/gnulib-local/modules/termcap
+++ b/gnulib-local/modules/termcap
@@ -3,6 +3,7 @@ Information about terminal capabilities.
Files:
m4/termcap.m4
+m4/curses.m4
lib/tparm.c
lib/tputs.c
diff --git a/gnulib-local/modules/terminfo b/gnulib-local/modules/terminfo
index 32d408795..6d5625e64 100644
--- a/gnulib-local/modules/terminfo
+++ b/gnulib-local/modules/terminfo
@@ -3,6 +3,7 @@ Information about terminal capabilities.
Files:
m4/terminfo.m4
+m4/curses.m4
lib/tparm.c
lib/tputs.c