From 580a74aa0515083c070a8a795d84cf843d54bf22 Mon Sep 17 00:00:00 2001 From: Date: Fri, 27 Jan 2006 22:10:07 -0500 Subject: [PATCH] Adapt the autoconf machinery to OpenBSD 3.8 OpenBSD 3.8 includes in its base system an heavily patched version of an older (3.x serie) GNU readline package where libhistory is not yet parted from libreadline -- the autoconf script was changed accordingly. --- configure.ac | 21 ++++++++++++++------- doc/adesklets_en.texi | 5 +++-- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/configure.ac b/configure.ac index 36cda5e..93c8326 100644 --- a/configure.ac +++ b/configure.ac @@ -335,17 +335,24 @@ AC_ARG_WITH(history, if test x$withval = "xyes"; then AC_CHECK_LIB(history,add_history, READLINE_LIBS="$READLINE_LIBS -lhistory"; - AC_DEFINE(HAVE_READLINE_HISTORY_H,1, - [Define to 1 if you have the header file.]) - HaveLibHistory=yes - AC_CHECK_LIB(history,free_history_entry, - AC_DEFINE(HAVE_FREE_HISTORY_ENTRY,1, - [Define to 1 if you have the `free_history_entry' function.])), + HaveLibHistory=history, + AC_CHECK_LIB(readline,add_history, + HaveLibHistory=readline, HaveLibHistory=no, - $LFLAGS) + $READLINE_LIBS), + $READLINE_LIBS) + if test $HaveLibHistory = "no"; then AC_MSG_WARN([Could not find GNU history library in the system]) +else +AC_DEFINE(HAVE_READLINE_HISTORY_H,1, + [Define to 1 if you have the header file.]) +AC_CHECK_LIB($HaveLibHistory,free_history_entry, + AC_DEFINE(HAVE_FREE_HISTORY_ENTRY,1, + [Define to 1 if you have the `free_history_entry' function.]),, + $READLINE_LIBS) fi + AC_MSG_CHECKING([for history max command lenght]) enableval= AC_ARG_ENABLE(history-max-command-lenght, diff --git a/doc/adesklets_en.texi b/doc/adesklets_en.texi index 3dc47ae..039af87 100644 --- a/doc/adesklets_en.texi +++ b/doc/adesklets_en.texi @@ -385,7 +385,8 @@ A reasonably POSIX-compliant system all usable fonts present in the system @item @weblink2{GNU history,http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html}, -the faithful complement to GNU readline for command history support +the faithful complement to GNU readline for command history support: @emph{it is +required to have it for all the desklets using interactive mode of execution} @item iconv library and headers (such as @weblink2{libiconv,http://www.gnu.org/software/libiconv/}), for @@ -433,7 +434,7 @@ out of the box on a variety of @itemize @item @strong{Kernels/Systems}: Linux (2.2, 2.4, 2.6 series), FreeBSD - (4.10, 5, 6 and 7), NetBSD (1.6) + (4.10, 5, 6 and 7), NetBSD (1.6), OpenBSD (3.8) @item @strong{C Libraries} (when applicable): glibc (2.1.3 and up), uclibc (0.9.28) @item @strong{Compilers}: gcc (2.95.2, whole 3 serie, 4.0.2), icc 7.0 (with tweaking) -- 2.11.4.GIT