[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Opening a can of worms: a readline gnulib module?
From: |
Simon Josefsson |
Subject: |
Re: Opening a can of worms: a readline gnulib module? |
Date: |
Thu, 11 Aug 2005 23:16:14 +0200 |
User-agent: |
Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) |
"Oskar Liljeblad" <address@hidden> writes:
> I don't know if the readline module covers this, but on recent
> Fedora/RedHat systems you'll need to link with ncurses or some
> other library providing certain termcap (or was it terminfo?)
> functions... You don't need to do this with Debian.
This appears to be the case, I have access to one such system, so I
can try M4 magic on it. I have no idea how to solve this without a
lot of code though (i.e., if AC_TRY_LINK fail, try the exact same
AC_TRY_LINK again but with -ltermcap in LIBS too). Relevant current
code below.
Thoughts?
AC_CACHE_CHECK(for readline, gl_cv_lib_readline, [
gl_cv_lib_readline=no
am_save_LIBS="$LIBS"
LIBS="$LIBS $LIBREADLINE"
AC_TRY_LINK([#include <stdio.h>
#include <readline/readline.h>],
[readline((char*)0);],
gl_cv_lib_readline=yes)
LIBS="$am_save_LIBS"
])
if test "$gl_cv_lib_readline" = yes; then
AC_DEFINE(HAVE_READLINE, 1, [Define if you have the readline() library.])
fi
if test "$gl_cv_lib_readline" = yes; then
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 need
$INCREADLINE
dnl either.
CPPFLAGS="$am_save_CPPFLAGS"
LIBREADLINE=
LTLIBREADLINE=
fi
AC_SUBST(LIBREADLINE)
AC_SUBST(LTLIBREADLINE)
AC_CHECK_HEADERS(readline/readline.h)
if test $gl_cv_lib_readline = no; then
AC_LIBOBJ(readline)
gl_PREREQ_READLINE
fi
- Re: Opening a can of worms: a readline gnulib module?, Simon Josefsson, 2005/08/11
- Re: Opening a can of worms: a readline gnulib module?, Bruno Haible, 2005/08/11
- Re: Opening a can of worms: a readline gnulib module?, Simon Josefsson, 2005/08/11
- Re: Opening a can of worms: a readline gnulib module?, Bruno Haible, 2005/08/11
- Re: Opening a can of worms: a readline gnulib module?, Simon Josefsson, 2005/08/11
- Re: Opening a can of worms: a readline gnulib module?, Bruno Haible, 2005/08/11
- Re: Opening a can of worms: a readline gnulib module?, Simon Josefsson, 2005/08/11
- Re: Opening a can of worms: a readline gnulib module?, Oskar Liljeblad, 2005/08/11
- Re: Opening a can of worms: a readline gnulib module?,
Simon Josefsson <=
- Re: Opening a can of worms: a readline gnulib module?, Oskar Liljeblad, 2005/08/11
- Re: Opening a can of worms: a readline gnulib module?, Simon Josefsson, 2005/08/11
- Re: Opening a can of worms: a readline gnulib module?, Simon Josefsson, 2005/08/12
- Re: Opening a can of worms: a readline gnulib module?, Bruno Haible, 2005/08/12
- Re: Opening a can of worms: a readline gnulib module?, Simon Josefsson, 2005/08/12
- Re: [bug-gnulib] Re: Opening a can of worms: a readline gnulib module?, Bruno Haible, 2005/08/12
- Re: [bug-gnulib] Re: Opening a can of worms: a readline gnulib module?, Oskar Liljeblad, 2005/08/12
- Re: [bug-gnulib] Re: Opening a can of worms: a readline gnulib module?, Bruno Haible, 2005/08/12
- Re: Opening a can of worms: a readline gnulib module?, Bruno Haible, 2005/08/11
- Re: Opening a can of worms: a readline gnulib module?, Simon Josefsson, 2005/08/11