[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: avoiding obsolete macros like AC_TRY_RUN
From: |
Bruno Haible |
Subject: |
Re: avoiding obsolete macros like AC_TRY_RUN |
Date: |
Wed, 2 Sep 2009 10:12:58 +0200 |
User-agent: |
KMail/1.9.9 |
Ralf Wildenhues wrote:
> diff --git a/m4/getloadavg.m4 b/m4/getloadavg.m4
> index 28237d7..e5ea9a4 100644
> --- a/m4/getloadavg.m4
> +++ b/m4/getloadavg.m4
> @@ -174,14 +174,14 @@ AC_CHECK_HEADERS([nlist.h],
> `n_un' member. Obsolete, depend on
> `HAVE_STRUCT_NLIST_N_UN_N_NAME])], [],
> address@hidden:@include <nlist.h>])
> - AC_TRY_LINK([#include <nlist.h>],
> - [struct nlist x;
> - #ifdef HAVE_STRUCT_NLIST_N_UN_N_NAME
> - x.n_un.n_name = "";
> - #else
> - x.n_name = "";
> - #endif],
> - [AC_DEFINE([N_NAME_POINTER], [1],
> - [Define to 1 if the nlist n_name member is a
> pointer])])
> + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <nlist.h>]],
> + [[struct nlist x;
> + #ifdef HAVE_STRUCT_NLIST_N_UN_N_NAME
> + x.n_un.n_name = "";
> + #else
> + x.n_name = "";
> + #endif]])],
> + [AC_DEFINE([N_NAME_POINTER], [1],
> + [Define to 1 if the nlist n_name member is a
> pointer])])
> ])dnl
> ])# gl_PREREQ_GETLOADAVG
I wonder about the indentation here: The [AC_DEFINE line is indented by 3 more
spaces
than the [AC_LANG_PROGRAM argument, making it look like the AC_DEFINE
expression was
an argument to AC_LANG_PROGRAM, not an argument to AC_LINK_IFELSE.
The indentation in m4/fsusage.m4 and m4/ls-mntd-fs.m4 is also bizarre.
Bruno
- avoiding obsolete macros like AC_TRY_RUN [Re: gnulib-izing sharutils, Jim Meyering, 2009/09/01
- Re: avoiding obsolete macros like AC_TRY_RUN, Ralf Wildenhues, 2009/09/02
- Re: avoiding obsolete macros like AC_TRY_RUN, Jim Meyering, 2009/09/02
- Re: avoiding obsolete macros like AC_TRY_RUN,
Bruno Haible <=
- Re: avoiding obsolete macros like AC_TRY_RUN, Ralf Wildenhues, 2009/09/02
- Re: avoiding obsolete macros like AC_TRY_RUN, Ralf Wildenhues, 2009/09/04
- Re: avoiding obsolete macros like AC_TRY_RUN, Jim Meyering, 2009/09/04
- Re: avoiding obsolete macros like AC_TRY_RUN, Ben Pfaff, 2009/09/04
- Re: avoiding obsolete macros like AC_TRY_RUN, Simon Josefsson, 2009/09/07
- Re: avoiding obsolete macros like AC_TRY_RUN, Paolo Bonzini, 2009/09/07
- Re: avoiding obsolete macros like AC_TRY_RUN, Ralf Wildenhues, 2009/09/08