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

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

 



On 05/20/2010 03:50 PM, Steffen DETTMER wrote:
> I think you should rewrite your macro as:
> 
> 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

Why waste the extra processes during all client's configure time, when
you can convert the string during m4 time just once during the
developer's autoconf time?

ac_tr_func=HAVE_[]m4_translit([[$1]],[a-z],[A-Z])_PROTO

-- 
Eric Blake   eblake@xxxxxxxxxx    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
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