We need an autobuild mechanism to define tokens indicating the absence
of a function. In other words, a mechanism which checks for the
presence of a function, and if the result is negative it defines the
token NEED_XYZ (instead of _not_ defining HAVE_XYZ). Is there such
a beast or can you create one? If so then I want to make use of
this mechanism in the compilation of ncap when the presence/absence
of math functions is checked.
Thanks,
Charlie
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I made this change by defining a new macro. Now in configure.in, use NCO_CHECK_FUNCS instead of AC_CHECK_FUNCS when you want NEED_func defined if it is not found.
I am curious why this is needed, however. Why doesn't
#ifndef HAVE_func
...
#endif
suffice?
rorik
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
90% of the functions which NCO needs on a given
platform are already present, so it is much quicker
to specify which functions are needed, rather than
those that are not needed. This is particularly true
for ncap on MACOSX. Thus the new macro will help
clarify the logic in the code (#ifdef is more straightforward
than #ifndef) and shorten the Makefile.old (which is
still required on many platforms).
Thanks,
Charlie
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I made this change by defining a new macro. Now in configure.in, use NCO_CHECK_FUNCS instead of AC_CHECK_FUNCS when you want NEED_func defined if it is not found.
I am curious why this is needed, however. Why doesn't
#ifndef HAVE_func
...
#endif
suffice?
rorik
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Rorik,
We need an autobuild mechanism to define tokens indicating the absence
of a function. In other words, a mechanism which checks for the
presence of a function, and if the result is negative it defines the
token NEED_XYZ (instead of _not_ defining HAVE_XYZ). Is there such
a beast or can you create one? If so then I want to make use of
this mechanism in the compilation of ncap when the presence/absence
of math functions is checked.
Thanks,
Charlie
I made this change by defining a new macro. Now in configure.in, use NCO_CHECK_FUNCS instead of AC_CHECK_FUNCS when you want NEED_func defined if it is not found.
I am curious why this is needed, however. Why doesn't
#ifndef HAVE_func
...
#endif
suffice?
rorik
90% of the functions which NCO needs on a given
platform are already present, so it is much quicker
to specify which functions are needed, rather than
those that are not needed. This is particularly true
for ncap on MACOSX. Thus the new macro will help
clarify the logic in the code (#ifdef is more straightforward
than #ifndef) and shorten the Makefile.old (which is
still required on many platforms).
Thanks,
Charlie
I made this change by defining a new macro. Now in configure.in, use NCO_CHECK_FUNCS instead of AC_CHECK_FUNCS when you want NEED_func defined if it is not found.
I am curious why this is needed, however. Why doesn't
#ifndef HAVE_func
...
#endif
suffice?
rorik