bug-gnulib
[Top][All Lists]
Advanced

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

Re: play nice with AC_CACHE_CHECK


From: Simon Josefsson
Subject: Re: play nice with AC_CACHE_CHECK
Date: Tue, 07 Mar 2006 14:19:40 +0100
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

Ralf Wildenhues <address@hidden> writes:

>         * readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
>         test to be side-effect free by storing the result in the cache
>         variable gl_cv_lib_readline, and moving the assignment of
>         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.

I installed this while we are waiting for your papers.  I hope I
didn't break any policy here, if so, please someone tell me and I'll
back the change out until we have the papers.

Thanks!

> Index: m4/readline.m4
> ===================================================================
> RCS file: /cvsroot/gnulib/gnulib/m4/readline.m4,v
> retrieving revision 1.4
> diff -u -r1.4 readline.m4
> --- m4/readline.m4    9 Jan 2006 21:42:56 -0000       1.4
> +++ m4/readline.m4    3 Mar 2006 17:38:15 -0000
> @@ -42,23 +42,20 @@
>        AC_TRY_LINK([#include <stdio.h>
>  #include <readline/readline.h>],
>          [readline((char*)0);],
> -        gl_cv_lib_readline=yes)
> -      if test "$gl_cv_lib_readline" = yes; then
> -        if test -n "$extra_lib"; then
> -          LIBREADLINE="$LIBREADLINE -l$extra_lib"
> -          LTLIBREADLINE="$LTLIBREADLINE -l$extra_lib"
> -        fi
> -        break
> +        [gl_cv_lib_readline=" -l$extra_lib"])
> +      if test "$gl_cv_lib_readline" != no; then
> +     break
>        fi
>      done
>      LIBS="$am_save_LIBS"
>    ])
>  
> -  if test "$gl_cv_lib_readline" = yes; then
> +  if test "$gl_cv_lib_readline" != no; then
>      AC_DEFINE(HAVE_READLINE, 1, [Define if you have the readline library.])
> -  fi
> -
> -  if test "$gl_cv_lib_readline" = yes; then
> +    if test "$gl_cv_lib_readline" != " -l"; then
> +      LIBREADLINE="$LIBREADLINE$gl_cv_lib_readline"
> +      LTLIBREADLINE="$LTLIBREADLINE$gl_cv_lib_readline"
> +    fi
>      AC_MSG_CHECKING([how to link with libreadline])
>      AC_MSG_RESULT([$LIBREADLINE])
>    else




reply via email to

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