Need help inserting AS_TR_CPP functionality in macro

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

 



I need a macro, NCO_CHECK_FUNCS(func1, func2, ....), to define CPP
tokens HAVE_FUNC1, HAVE_FUNC2, .... when func1() and func2() are
found, or to defined NEED_FUNC1, NEED_FUNC2, .... when func1() and
func2() are not found.

The current definition of this macro fails because it does not
transform (usually lowercase) function names (e.g., acos()) into
uppercase CPP-ish tokens---it produces NEED_acos instead of
NEED_ACOS. Hence it probably needs to call AS_TR_CPP somehow.
Yet my autoconf skills are poor and no matter where I insert a
call to AS_TR_CPP, it breaks.

Would greatly appreciate it if someone would show how to modify
the following to generate results like HAVE_ACOS and NEED_ACOS
instead of HAVE_acos and NEED_acos:

AC_DEFUN([NCO_CHECK_FUNCS],
[AC_FOREACH([NCO_Func],[$1],
 [AC_CHECK_FUNC(NCO_Func,
   [AC_DEFINE_UNQUOTED([HAVE_]NCO_Func, [1],
     [Define to 1 if compiler finds external `]NCO_Func[' function])],
   [AC_DEFINE_UNQUOTED([NEED_]NCO_Func, [1],
     [Define to 1 if compiler needs external `]NCO_Func[' function])]dnl
)])])

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

_______________________________________________
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