git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Consistent use of AC_LANG_PROGRAM in configure.ac and aclocal.m4.

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Jan 2, 2011, 07:59 UTC
Message-ID
<20110102075953.GB8937@burratino>
In-Reply-To
<20110102060044.GJ19818@gmx.de>
Ralf Wildenhues wrote:
Show 8 quoted lines
> This avoids warnings from Autoconf 2.68 about missing use of
> AC_LANG_PROGRAM and friends.
> 
> Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
> ---
> 
> The patch should not cause any semantic changes in the generated
> configure script.

This part belongs in the commit message too, imho (though no need to resend just for that, of course).

Show 8 quoted lines
> --- a/configure.ac
> +++ b/configure.ac
> @@ -345,7 +345,7 @@ esac
>  AC_CACHE_CHECK([if linker supports -R], git_cv_ld_dashr, [
>     SAVE_LDFLAGS="${LDFLAGS}"
>     LDFLAGS="${SAVE_LDFLAGS} -R /"
> -   AC_LINK_IFELSE(AC_LANG_PROGRAM([], []), [git_cv_ld_dashr=yes], [git_cv_ld_dashr=no])
> +   AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], [git_cv_ld_dashr=yes], [git_cv_ld_dashr=no])

Could you say a few words about the effect of this? Mostly because it would be useful to people down the line tempted to make the same mistake again.

Show 6 quoted lines
> @@ -500,7 +494,7 @@ for l in $lib_order; do
>      old_LIBS="$LIBS"
>      LIBS="$LIBS $l"
>      AC_MSG_CHECKING([for iconv in $l])
> -    AC_LINK_IFELSE(ICONVTEST_SRC,
> +    AC_LINK_IFELSE([ICONVTEST_SRC],
I'm curious about this one, too.
Show 11 quoted lines
> @@ -931,18 +915,16 @@ AC_SUBST(NO_INITGROUPS)
>  #
>  # Define PTHREAD_LIBS to the linker flag used for Pthread support.
>  AC_DEFUN([PTHREADTEST_SRC], [
> +AC_LANG_PROGRAM([[
>  #include <pthread.h>
> -
> -int main(void)
> -{
> +]], [[
>  	pthread_mutex_t test_mutex;

By the way, what problem is the warning about AC_LANG_PROGRAM meant to prevent? (Just curious. A five-minute google search didn't reveal anything obvious.)

Thanks, Jonathan

Previous: Ralf WildenhuesNext: Ralf Wildenhues
Message 2 of 7 in “Consistent use of AC_LANG_PROGRAM in configure.ac and aclocal.m4.”
  1. Consistent use of AC_LANG_PROGRAM in configure.ac and aclocal.m4.Ralf Wildenhues, Jan 2, 2011
  2. Jonathan NiederJan 2, 2011
  3. Ralf WildenhuesJan 2, 2011
  4. Jonathan NiederJan 2, 2011
  5. Consistent use of AC_LANG_PROGRAM in configure.ac and aclocal.m4.Ralf Wildenhues, Jan 2, 2011
  6. Ralf WildenhuesFeb 1, 2011
  7. configure: use AC_LANG_PROGRAM consistentlyJonathan Nieder, Feb 12, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.