bug-autoconf
[Top][All Lists]
Advanced

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

AC_ARG_WITH gobbles brackets


From: Bruno Haible
Subject: AC_ARG_WITH gobbles brackets
Date: Mon, 17 Feb 2003 14:43:42 +0100 (CET)

Hi,

This bug in 2.57 seems to be around since 2.52 at least. AC_ARG_WITH now
ignores brackets in its argument.

================ configure.in ================
AC_INIT

dnl Snippet taken from libtool.m4.
AC_ARG_WITH(gnu-ld,
[  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)

AC_OUTPUT
===============================================


$ autoconf-2.13 
$ ./configure --help | grep gnu-ld
  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]

$ autoconf-2.52
$ ./configure --help | grep gnu-ld
  --with-gnu-ld           assume the C compiler uses GNU ld default=no

$ autoconf-2.57
$ ./configure --help | grep gnu-ld
  --with-gnu-ld           assume the C compiler uses GNU ld default=no


If I use double brackets, then in the "configure --help" output I get single
brackets with autoconf-2.57, but double brackets with autoconf-2.13.
Can you tell an input syntax that works the same way with both autoconf-2.13
and autoconf-2.57? The only that I can come up with is this ugly thing:

================ configure.in ================
AC_INIT

dnl Work around breakage in autoconf >= 2.52.
ifdef([AC_HELP_STRING],
[AC_DEFUN([my_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
[AC_DEFUN([my_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])

dnl Snippet taken from libtool.m4.
my_ARG_WITH(gnu-ld,
[  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)

AC_OUTPUT
===============================================


Bruno





reply via email to

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