[Top][All Lists]

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

Re: how to add this function to the aclole.m4

From: Ralph Blach
Subject: Re: how to add this function to the aclole.m4
Date: Thu, 20 May 2010 16:27:59 -0400
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20100402 Fedora/2.0.4-1.fc12 SeaMonkey/2.0.4

Ralf Wildenhues wrote:
Hello Ralph,

please don't top-post, it makes threads hard to read; thank you.

* Ralph Blach wrote on Thu, May 20, 2010 at 08:27:02PM CEST:
Eric Blake wrote:
On 05/19/2010 05:21 PM, Ralph Blach wrote:
I want to add this function to the aclocal.m4

How do I do it.
Are you using automake?  If so, just stick the function in a file in the
same directory as where you tell 'aclocal -I dir' to look.  If not, just
paste it in.
I am quite happy with aclocal, but and the default macros,

Is there anyway I can add a directory, and still have aclocal use new macro.
Yes, as Eric indicated: you can do it like this:

- create a m4/ subdirectory of your top source directory,
- create a file m4/mymacro.m4 with the macro(s) contents,
- add the line
   to the toplevel file,
- optionally also add the line
   to the file

and rerun 'autoreconf -v'.  If your file uses the macro,
then it should now be picked up from the file in the m4 directory.

Have fun,

Autoconf mailing list

    [AC_CACHE_CHECK(for $1 function prototype in $2, ac_cv_have_$1_proto,
        AC_EGREP_HEADER($1, $2,
    if test $ac_cv_have_$1_proto = yes ; then
ac_tr_func=HAVE_`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`_PROTO

autoreconfig -v is run, the new configure file is made, but
I get this configure error

checking for gethostname function prototype in unistd.h... ./configure: line 3828: syntax error near unexpected token `newline'
./configure: line 3828: `*GNU*'

Any ideas.


reply via email to

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