autoconf-patches
[Top][All Lists]
Advanced

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

Multiline arguments to AC_CHECK_HEADERS and AC_CHECK_FUNCS


From: Stepan Kasal
Subject: Multiline arguments to AC_CHECK_HEADERS and AC_CHECK_FUNCS
Date: Fri, 11 May 2007 18:26:57 +0200
User-agent: Mutt/1.4.2.1i

Hi,
  some macros take a list as an argument.  It improves readability to
put the items on individual lines:

AC_CONFIG_FILES([dir1/Makefile
  dir2/Makefile
  dir3/Makefile
])
AC_CHECK_HEADERS([foo.h
  bar.h
  baz.h
])
AC_CHECK_FUNCS([foo
  bar
  baz
])

While the first macro call in the example works, the other two don't.

Would you accept the attached patch, which "fixes" this?

I verified that it passes the testsuite.

Have a nice day,
        Stepan Kasal

PS:
Here is my personal experience, which motivated me to submit this
patch:
When I stumbled over the problem, I tried:
        funcs="foo
          bar
          baz"
        AC_CHECK_FUNCS([$foo])
But this is wrong, as it hides the list from autoheader.
So I invented things like:
        AC_CHECK_FUNCS([foo]dnl
                [bar]dnl
                [baz])
and spent some time inventing the right explanatory comment for
this...
I eventually found somewhere the usual workaround:
        AC_CHECK_FUNCS([foo \
          bar \
          baz])
But I spent a few hours with this silly issue.
I believe that the suggested patch can save other people this
frustration.

Attachment: autoconf-20070511-multiline-args.patch
Description: Text document


reply via email to

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