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

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

 



* Ralph Blach wrote on Thu, May 20, 2010 at 10:27:59PM CEST:
> AC_DEFUN([AC_CHECK_FUNC_PROTO],
>     [AC_CACHE_CHECK(for $1 function prototype in $2, ac_cv_have_$1_proto,
>         AC_EGREP_HEADER($1, $2,
>             ac_cv_have_$1_proto=yes,
>             ac_cv_have_$1_proto=no))
>     if test $ac_cv_have_$1_proto = yes ; then
>             ac_tr_func=HAVE_`echo $1 | tr
> 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`_PROTO
>         AC_DEFINE_UNQUOTED($ac_tr_func)
>     fi
> ])
> 
> 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*'

Your macro still lacks proper quotation.  You need to [quote] at least
the third argument of the AC_CACHE_CHECK call, but better all others
too, as well as each argument of AC_EGREP_HEADER.

If that still causes the error above, then it would be helpful to see,
say, a dozen lines of the configure script around the line where the
error occurs.

Cheers,
Ralf

_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux