autoconf
[Top][All Lists]
Advanced

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

Re: Need help with autoconf configure script


From: Bob Rossi
Subject: Re: Need help with autoconf configure script
Date: Tue, 12 Jul 2005 13:29:31 -0400
User-agent: Mutt/1.3.28i

As a follow up, I've attached the config.log session of when it works and
doesn't work. Is there anything obvious here to anyone?

Thanks,
Bob Rossi

On Tue, Jul 12, 2005 at 09:32:56AM -0400, Bob Rossi wrote:
> Hi again,
> 
> I'm still trying to get CGDB working with autoconf. I've got a very
> strange problem. I have this in my configure.in,
> 
>    if test "$opt_with_readline_prefix" = "no"; then
>    echo "READLINE_PREFIX=NO"
>    else
>    echo "READLINE_PREFIX=YES"
>    VL_LIB_READLINE
>    fi
> 
> I downloaded VL_LIB_READLINE from here,
>   http://autoconf-archive.cryp.to/vl_lib_readline.html
> although I have modified it slightly (see attachment).
> 
> If I run ./configure then by default opt_with_readline_prefix is "no".
> During ../cgdb/configure I get,
>    checking pty.h usability... yes
>    checking pty.h presence... no
>    configure: WARNING: pty.h: accepted by the compiler, rejected by the 
> preprocessor!
>    configure: WARNING: pty.h: proceeding with the compiler's result
>    checking for pty.h... yes
> so I get error's when VL_LIB_READLINE is *not* run.
> 
> If I run ../cgdb/configure --with-readline, then
> opt_with_readline_prefix is not "no". This causes VL_LIB_READLINE to
> run. When this happens, I get,
> 
>    checking pty.h usability... yes
>    checking pty.h presence... yes
>    checking for pty.h... yes
> 
> I can't figure out why I'm getting error's when VL_LIB_READLINE is not
> run. Any help would be greatly appreciated. I've attached the slightly
> modified version of VL_LIB_READLINE that I am using.
> 
> Thanks,
> Bob Rossi

> dnl Available from the GNU Autoconf Macro Archive at:
> dnl http://www.gnu.org/software/ac-archive/htmldoc/vl_lib_readline.html
> dnl
> AC_DEFUN([VL_LIB_READLINE], [
>   AC_CACHE_CHECK([for a readline compatible library],
>                  vl_cv_lib_readline, [
>     ORIG_LIBS="$LIBS"
>     for readline_lib in readline; do
>       for termcap_lib in "" termcap ncurses curses; do
>         if test -z "$termcap_lib"; then
>           TRY_LIB="-l$readline_lib"
>         else
>           TRY_LIB="-l$readline_lib -l$termcap_lib"
>         fi
>         LIBS="$ORIG_LIBS $TRY_LIB"
>         AC_TRY_LINK_FUNC(readline, vl_cv_lib_readline="$TRY_LIB")
>         if test -n "$vl_cv_lib_readline"; then
>           break
>         fi
>       done
>       if test -n "$vl_cv_lib_readline"; then
>         break
>       fi
>     done
>     if test -z "$vl_cv_lib_readline"; then
>       vl_cv_lib_readline="no"
>       LIBS="$ORIG_LIBS"
>     fi
>   ])
> 
>   have_readline=no
>   if test "$vl_cv_lib_readline" != "no"; then
>     have_readline=yes
>     AC_DEFINE(HAVE_LIBREADLINE, 1,
>               [Define if you have a readline compatible library])
>     AC_CHECK_HEADERS(readline.h readline/readline.h)
>     AC_CACHE_CHECK([whether readline supports history],
>                    vl_cv_lib_readline_history, [
>       vl_cv_lib_readline_history="no"
>       AC_TRY_LINK_FUNC(add_history, vl_cv_lib_readline_history="yes")
>     ])
>     have_history=no
>     if test "$vl_cv_lib_readline_history" = "yes"; then
>       have_history=yes
>       AC_DEFINE(HAVE_READLINE_HISTORY, 1,
>                 [Define if your readline library has \`add_history'])
>       AC_CHECK_HEADERS(history.h readline/history.h)
>     fi
>   fi
> 
> dnl Here we need to quit if there is no readline available
>     if test $have_readline = no; then
>         AC_MSG_ERROR([   *****************************************************
>                      cgdb requires the GNU readline library to link!
>                      *****************************************************])
>     fi
> 
> dnl Here we need to quit if there is no history available
>     if test $have_history = no; then
>         AC_MSG_ERROR([   *****************************************************
>                      cgdb requires the GNU readline history library to link!
>                      *****************************************************])
>     fi
> ])dnl

> _______________________________________________
> Autoconf mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/autoconf

Attachment: config.log.diff
Description: Text document


reply via email to

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