Date: Wed, 1 Mar 2000 01:01:45 +0500 (KGT)
From: CyberPsychotic <[EMAIL PROTECTED]>
~ :The GNU binutils use this macro to detect this case:
~ :
oh, by the way while playing with this macro I noticed a couple of
problems :
1. `test $bfd_cv_decl_needed_$1` didn't work because $bfd_cv_decl_needed
was considered as two shell variables $bfd_cv_decl_needed and $1, so I had
to tweak it with eval "test `echo ..`".
2. It breaks autoheader is some funny way, because autoheader replaces
most of macroses which are supposed to define things with it's own pieces
which then generate config.h.in. However it doesn't execute shell
scripting parts, so for every used macros like this it would have:
#undef NEED_DECLARATION_
I have fixed it by adding a wrapper macro with `for f in functions` so
#undef NEED_DECLARATION_ appears only once, but now you still have to
manually define all #undef NEED_DECLARATION_FUNCTIONS to get the things
working properly.
I don't know what sort of playing around you were doing. When used in
BFD, where it is an AC_DEFUN, the $1 is replaced at the m4 level, so
the shell never sees it. Certainly if you take it out of the
AC_DEFUN, or try to make it into a loop, or add an extra level of
quoting, it won't work.
Perhaps the same issue arises with autoheader. At least for me,
autoheader works fine, and I get entries like this:
/* Define if malloc is not declared in system header files. */
#undef NEED_DECLARATION_MALLOC
In any case, you may want to just pick up the macro that Akim
mentioned that is in the current sources, and use that until the next
autoconf release comes out.
Ian