commit-inetutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU Inetutils branch, master, updated. inetutils-1_8-168-g7a2dba7


From: Simon Josefsson
Subject: [SCM] GNU Inetutils branch, master, updated. inetutils-1_8-168-g7a2dba7
Date: Sat, 19 Nov 2011 15:35:09 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Inetutils ".

The branch, master has been updated
       via  7a2dba700aae9a9ba8ab2b205ac29812f0b7fdd8 (commit)
       via  49d3cbf19690de7b82475e2919b76ddba660b5e6 (commit)
      from  83c828db1380d4c6886dfb2cd35af65c7dcfe74c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=7a2dba700aae9a9ba8ab2b205ac29812f0b7fdd8


commit 7a2dba700aae9a9ba8ab2b205ac29812f0b7fdd8
Author: Simon Josefsson <address@hidden>
Date:   Sat Nov 19 16:34:42 2011 +0100

    doc: Mention portability issues.
    
    * README (Notes): Doc fix.

diff --git a/ChangeLog b/ChangeLog
index a760a6e..4b5fd5f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2011-11-19  Simon Josefsson  <address@hidden>
 
+       * README (Notes): Doc fix.
+
+2011-11-19  Simon Josefsson  <address@hidden>
+
        * bootstrap.conf (gnulib_modules): Remove readline.
        * configure.ac: Search for readline.
        * ftp/cmds.c: Unconditionally include readline headers.
diff --git a/README b/README
index 6de48f2..f00e59b 100644
--- a/README
+++ b/README
@@ -39,6 +39,9 @@ Some known deficiencies:
 
  - Non-Shishi Kerberos support does not build.  Patches welcome.
 
+ - InetUtils does not build on Cygwin, Minix, MinGW, MSCV, BeOS, Haiki
+   (and probably other systems as well).  Patches welcome.
+
 See the file INSTALL for installation instructions.
 
 Please send all bug reports to <address@hidden>.

http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=49d3cbf19690de7b82475e2919b76ddba660b5e6


commit 49d3cbf19690de7b82475e2919b76ddba660b5e6
Author: Simon Josefsson <address@hidden>
Date:   Sat Nov 19 16:11:13 2011 +0100

    ftp: require the real readline library.
    
    * bootstrap.conf (gnulib_modules): Remove readline.
    * configure.ac: Search for readline.
    * ftp/cmds.c: Unconditionally include readline headers.
    * ftp/main.c: Likewise.

diff --git a/ChangeLog b/ChangeLog
index 2c2fe98..a760a6e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-11-19  Simon Josefsson  <address@hidden>
+
+       * bootstrap.conf (gnulib_modules): Remove readline.
+       * configure.ac: Search for readline.
+       * ftp/cmds.c: Unconditionally include readline headers.
+       * ftp/main.c: Likewise.
+
 2011-11-19  Alfred M. Szmidt  <address@hidden>
 
        * .gitignore (/m4): Added to list.
diff --git a/am/readline.m4 b/am/readline.m4
new file mode 100644
index 0000000..b7ce9e4
--- /dev/null
+++ b/am/readline.m4
@@ -0,0 +1,81 @@
+# readline.m4 serial 9
+dnl Copyright (C) 2005-2006, 2009-2011 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.
+
+dnl Written by Simon Josefsson, with help from Bruno Haible and Oskar
+dnl Liljeblad.
+
+AC_DEFUN([gl_FUNC_READLINE],
+[
+  dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
+  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+  AC_REQUIRE([AC_LIB_RPATH])
+
+  dnl Search for libreadline and define LIBREADLINE, LTLIBREADLINE and
+  dnl INCREADLINE accordingly.
+  AC_LIB_LINKFLAGS_BODY([readline])
+
+  dnl Add $INCREADLINE to CPPFLAGS before performing the following checks,
+  dnl because if the user has installed libreadline and not disabled its use
+  dnl via --without-libreadline-prefix, he wants to use it. The AC_LINK_IFELSE
+  dnl will then succeed.
+  am_save_CPPFLAGS="$CPPFLAGS"
+  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCREADLINE])
+
+  AC_CACHE_CHECK([for readline], [gl_cv_lib_readline], [
+    gl_cv_lib_readline=no
+    am_save_LIBS="$LIBS"
+    dnl On some systems, -lreadline doesn't link without an additional
+    dnl -lncurses or -ltermcap.
+    dnl Try -lncurses before -ltermcap, because libtermcap is unsecure
+    dnl by design and obsolete since 1994. Try -lcurses last, because
+    dnl libcurses is unusable on some old Unices.
+    for extra_lib in "" ncurses termcap curses; do
+      LIBS="$am_save_LIBS $LIBREADLINE"
+      if test -n "$extra_lib"; then
+        LIBS="$LIBS -l$extra_lib"
+      fi
+      AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>
+#include <readline/readline.h>]],
+          [[readline((char*)0);]])],
+        [if test -n "$extra_lib"; then
+           gl_cv_lib_readline="yes, requires -l$extra_lib"
+         else
+           gl_cv_lib_readline="yes"
+         fi
+        ])
+      if test "$gl_cv_lib_readline" != no; then
+        break
+      fi
+    done
+    LIBS="$am_save_LIBS"
+  ])
+
+  if test "$gl_cv_lib_readline" != no; then
+    AC_DEFINE([HAVE_READLINE], [1], [Define if you have the readline library.])
+    extra_lib=`echo "$gl_cv_lib_readline" | sed -n -e 's/yes, requires //p'`
+    if test -n "$extra_lib"; then
+      LIBREADLINE="$LIBREADLINE $extra_lib"
+      LTLIBREADLINE="$LTLIBREADLINE $extra_lib"
+    fi
+    AC_MSG_CHECKING([how to link with libreadline])
+    AC_MSG_RESULT([$LIBREADLINE])
+  else
+    dnl If $LIBREADLINE didn't lead to a usable library, we don't
+    dnl need $INCREADLINE either.
+    CPPFLAGS="$am_save_CPPFLAGS"
+    LIBREADLINE=
+    LTLIBREADLINE=
+  fi
+  AC_SUBST([LIBREADLINE])
+  AC_SUBST([LTLIBREADLINE])
+
+  AC_CHECK_HEADERS([readline/readline.h readline/history.h])
+])
+
+# Prerequisites of lib/readline.c.
+AC_DEFUN([gl_PREREQ_READLINE], [
+  :
+])
diff --git a/bootstrap.conf b/bootstrap.conf
index 3f9042d..02235c1 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -74,7 +74,6 @@ obstack
 poll
 progname
 read-file
-readline
 readutmp
 realloc-gnu
 regex
diff --git a/configure.ac b/configure.ac
index 421bda6..75d43f5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -148,6 +148,14 @@ AC_CHECK_LIB(socket, getpeername)
 # See if a termcap library is available (under one of several names)
 IU_LIB_TERMCAP
 
+# Find libreadline -- disable the ftp client if not found.
+gl_FUNC_READLINE
+if test "$gl_cv_lib_readline" = no; then
+  enable_ftp=no
+  ftp_BUILD=''
+  ftp_INSTALL_HOOK=''
+fi
+
 dnl See if there's a separate libcrypt (many systems put crypt there)
 AC_CHECK_LIB(crypt, crypt, LIBCRYPT=-lcrypt)
 AC_SUBST(LIBCRYPT)
diff --git a/ftp/cmds.c b/ftp/cmds.c
index 1d14cd0..9ecb408 100644
--- a/ftp/cmds.c
+++ b/ftp/cmds.c
@@ -77,10 +77,8 @@
    system headers on some platforms. */
 #include <glob.h>
 
-#include "readline.h"
-#ifdef HAVE_READLINE_HISTORY_H
-# include <readline/history.h>
-#endif
+#include <readline/readline.h>
+#include <readline/history.h>
 
 #include "ftp_var.h"
 #include "unused-parameter.h"
diff --git a/ftp/main.c b/ftp/main.c
index 7668c03..90fe2ef 100644
--- a/ftp/main.c
+++ b/ftp/main.c
@@ -77,10 +77,8 @@
 #include "libinetutils.h"
 #include "unused-parameter.h"
 
-#include "readline.h"
-#ifdef HAVE_READLINE_HISTORY_H
-# include <readline/history.h>
-#endif
+#include <readline/readline.h>
+#include <readline/history.h>
 
 
 #define DEFAULT_PROMPT "ftp> "

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog      |   11 +++++++
 README         |    3 ++
 am/readline.m4 |   81 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 bootstrap.conf |    1 -
 configure.ac   |    8 +++++
 ftp/cmds.c     |    6 +---
 ftp/main.c     |    6 +---
 7 files changed, 107 insertions(+), 9 deletions(-)
 create mode 100644 am/readline.m4


hooks/post-receive
-- 
GNU Inetutils 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]