autoconf
[Top][All Lists]
Advanced

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

help with broken autoconf/m4 macro?


From: Charlie Zender
Subject: help with broken autoconf/m4 macro?
Date: Tue, 27 Jul 2010 11:26:41 -0700
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.11) Gecko/20100713 Thunderbird/3.0.6

Hi,

I am trying to maintain a package (NCO) with some possibly arcane
or obsolete autoconf/m4 usage. One macro started breaking a year or
two ago and I do not know how to fix it. The autoconf macro that
is breaking is called NCO_CHECK_FUNCS. It is intended to be used
in configure.in thusly:

NCO_CHECK_FUNCS([acosf asinf atanf atan2f cosf expf fabsf fmodf log10f
logf powf sinf sqrtf tanf])

For each functional argument XXX, NCO_CHECK_FUNCS searches for XXX and
defines HAVE_XXX = 0 _and_ NEED_XXX = 1 when xxx() is not found, and
defines HAVE_XXX = 1 _and_ NEED_XXX = 0 when xxx() is found.
Here is the definition of NCO_CHECK_FUNCS in acinclude.m4:

AC_DEFUN([NCO_CHECK_FUNCS],
[AC_FOREACH([AC_Func],[$1],
  [AH_TEMPLATE(AS_TR_CPP(HAVE_[]AC_Func),dnl
                [Define to 1 if compiler finds external `]AC_Func[' function])
        AH_TEMPLATE(AS_TR_CPP(NEED_[]AC_Func),dnl
        [Define to 1 if compiler needs external `]AC_Func[' function])  
               ])dnl
for ac_func in $1
do
AC_CHECK_FUNC($ac_func,
              [AC_DEFINE_UNQUOTED([AS_TR_CPP([HAVE_$ac_func])])],
              [AC_DEFINE_UNQUOTED([AS_TR_CPP([NEED_$ac_func])])])dnl
done
])

The result of running aclocal or autoheader is a string of warnings
(see below) at every localtion where configure.in employs NCO_CHECK_FUNCS.
These symptoms can be reproduced by downloading and attempting to
build the NCO source distribution

wget http://dust.ess.uci.edu/nco/nco.tar.gz .
tar xvzf nco.tar.gz
cd nco-4.0.2
aclocal;autoheader;automake --foreign;autoconf

Any help appreciated,
Charlie

address@hidden:~/nco$ cd ~/nco;aclocal;autoheader;automake --foreign;autoconf
configure.in:470: warning: AC_DEFINE: not an identifier:
../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
../../lib/autoconf/functions.m4:60: AC_CHECK_FUNC is expanded from...
acinclude.m4:34: NCO_CHECK_FUNCS is expanded from...
configure.in:470: the top level
configure.in:471: warning: AC_DEFINE: not an identifier:
configure.in:471: the top level
configure.in:472: warning: AC_DEFINE: not an identifier:
configure.in:472: the top level
configure.in:473: warning: AC_DEFINE: not an identifier:
configure.in:473: the top level
configure.in:474: warning: AC_DEFINE: not an identifier:
configure.in:474: the top level
configure.in:475: warning: AC_DEFINE: not an identifier:
configure.in:475: the top level
configure.in:476: warning: AC_DEFINE: not an identifier:
configure.in:476: the top level
configure.in:477: warning: AC_DEFINE: not an identifier:
configure.in:477: the top level
configure.in:478: warning: AC_DEFINE: not an identifier:
configure.in:478: the top level
configure.in:479: warning: AC_DEFINE: not an identifier:
configure.in:479: the top level
configure.in:470: warning: AC_DEFINE: not an identifier:
../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
../../lib/autoconf/functions.m4:60: AC_CHECK_FUNC is expanded from...
acinclude.m4:34: NCO_CHECK_FUNCS is expanded from...
configure.in:470: the top level
configure.in:471: warning: AC_DEFINE: not an identifier:
configure.in:471: the top level
configure.in:472: warning: AC_DEFINE: not an identifier:
configure.in:472: the top level
configure.in:473: warning: AC_DEFINE: not an identifier:
configure.in:473: the top level
configure.in:474: warning: AC_DEFINE: not an identifier:
configure.in:474: the top level
configure.in:475: warning: AC_DEFINE: not an identifier:
configure.in:475: the top level
configure.in:476: warning: AC_DEFINE: not an identifier:
configure.in:476: the top level
configure.in:477: warning: AC_DEFINE: not an identifier:
configure.in:477: the top level
configure.in:478: warning: AC_DEFINE: not an identifier:
configure.in:478: the top level
configure.in:479: warning: AC_DEFINE: not an identifier:
configure.in:479: the top level
autoheader: warning: missing template:
autoheader: Use AC_DEFINE([], [], [Description])
configure.in:470: warning: AC_DEFINE: not an identifier:
../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
../../lib/autoconf/functions.m4:60: AC_CHECK_FUNC is expanded from...
acinclude.m4:34: NCO_CHECK_FUNCS is expanded from...
configure.in:470: the top level
configure.in:471: warning: AC_DEFINE: not an identifier:
configure.in:471: the top level
configure.in:472: warning: AC_DEFINE: not an identifier:
configure.in:472: the top level
configure.in:473: warning: AC_DEFINE: not an identifier:
configure.in:473: the top level
configure.in:474: warning: AC_DEFINE: not an identifier:
configure.in:474: the top level
configure.in:475: warning: AC_DEFINE: not an identifier:
configure.in:475: the top level
configure.in:476: warning: AC_DEFINE: not an identifier:
configure.in:476: the top level
configure.in:477: warning: AC_DEFINE: not an identifier:
configure.in:477: the top level
configure.in:478: warning: AC_DEFINE: not an identifier:
configure.in:478: the top level
configure.in:479: warning: AC_DEFINE: not an identifier:
configure.in:479: the top level
configure.in:470: warning: AC_DEFINE: not an identifier:
../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
../../lib/autoconf/functions.m4:60: AC_CHECK_FUNC is expanded from...
acinclude.m4:34: NCO_CHECK_FUNCS is expanded from...
configure.in:470: the top level
configure.in:471: warning: AC_DEFINE: not an identifier:
configure.in:471: the top level
configure.in:472: warning: AC_DEFINE: not an identifier:
configure.in:472: the top level
configure.in:473: warning: AC_DEFINE: not an identifier:
configure.in:473: the top level
configure.in:474: warning: AC_DEFINE: not an identifier:
configure.in:474: the top level
configure.in:475: warning: AC_DEFINE: not an identifier:
configure.in:475: the top level
configure.in:476: warning: AC_DEFINE: not an identifier:
configure.in:476: the top level
configure.in:477: warning: AC_DEFINE: not an identifier:
configure.in:477: the top level
configure.in:478: warning: AC_DEFINE: not an identifier:
configure.in:478: the top level
configure.in:479: warning: AC_DEFINE: not an identifier:
configure.in:479: the top level

-- 
Charlie Zender, Department of Earth System Science
University of California, Irvine (949) 891-2429 :)



reply via email to

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