[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 17:16:35 -0400 |
User-agent: |
Mutt/1.3.28i |
Hi all,
Sorry to reply to my own Email, but I have more info, and with this I'm
hopeing someone could solve the last piece of the puzzle.
To recap, look at the if/else below(in original Email). When I go into the
top part of the if statement, VL_LIB_READLINE isn't ever called. However,
my configure script is still corrupted even though VL_LIB_READLINE isn't
executed. If I take out the VL_LIB_READLINE everything works fine.
I've commented lines out of the VL_LIB_READLINE macro and found the lines
that are breaking the configure script for me.
if test "$vl_cv_lib_readline" != "no"; then
AC_DEFINE(HAVE_LIBREADLINE, 1,
[Define if you have a readline compatible library])
dnl 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")
])
if test "$vl_cv_lib_readline_history" = "yes"; then
AC_DEFINE(HAVE_READLINE_HISTORY, 1,
[Define if your readline library has \`add_history'])
dnl AC_CHECK_HEADERS(history.h readline/history.h)
fi
fi
The 2 lines commentted out above (AC_CHECK_HEADERS) are causing
VL_LIB_READLINE to break the configure script, even though those lines
are never executed. Does anyone understand how this could happen?
I am at a loss and really need some help.
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
- Need help with autoconf configure script, Bob Rossi, 2005/07/12
- Re: Need help with autoconf configure script,
Bob Rossi <=
- Re: Need help with autoconf configure script, Andreas Schwab, 2005/07/12
- Re: Need help with autoconf configure script, Bob Rossi, 2005/07/13
- Re: Need help with autoconf configure script, Andreas Schwab, 2005/07/13
- Re: Need help with autoconf configure script, Bob Rossi, 2005/07/13
- Re: Need help with autoconf configure script, Stepan Kasal, 2005/07/14
- Re: Need help with autoconf configure script, Thomas Dickey, 2005/07/14
- Re: Need help with autoconf configure script, Stepan Kasal, 2005/07/14
- Re: Need help with autoconf configure script, Bob Rossi, 2005/07/14