How can I check if a function exists in waf?

Vijay Kumar Banerjee vijaykumar9597 at gmail.com
Fri Feb 1 09:06:00 UTC 2019


On Fri, 1 Feb 2019 at 12:13, Sebastian Huber <
sebastian.huber at embedded-brains.de> wrote:

> Hello,
>
> how can I check if a function exists in waf (similar to AC_CHECK_FUNC)?
> Currently, we get this output from the RTEMS tools waf configure (please
> note the "Invalid argument 'function_name' in test"):
>
> Hi,

The support for 'function_name' has been removed since waf 2 as it
was broken ( see
https://gitlab.com/ita1024/waf/blob/master/waflib/Tools/c_config.py#L420)

I guess the best option is to just use 'header_name' or to use the
'fragment' parameter to write a fragment that calls the desired function.

> ./waf configure
> Setting top to                           : /scratch/git-rtems-tools
> Setting out to                           : /scratch/git-rtems-tools/build
> Version                                  : 5.551ce0825375-modified (5)
> Checking for program 'python'            : /usr/bin/python
> Checking for python version >= 2.6.6     : 2.7.14
> Checking for program 'python'            : /usr/bin/python
> Checking for program 'python2'           : /usr/bin/python2
> Checking for program 'python3'           : /usr/bin/python3
> Checking for 'gcc' (C compiler)          : /usr/bin/gcc
> Checking for 'g++' (C++ compiler)        : /usr/bin/g++
> Checking for header alloca.h             : yes
> Checking for header fcntl.h              : yes
> Checking for header process.h            : not found
> Checking for header stdlib.h             : yes
> Checking for header string.h             : yes
> Checking for header strings.h            : yes
> Checking for header sys/file.h           : yes
> Checking for header sys/stat.h           : yes
> Checking for header sys/time.h           : yes
> Checking for header sys/types.h          : yes
> Checking for header sys/wait.h           : yes
> Checking for header unistd.h             : yes
> Checking for header vfork.h              : not found
> Invalid argument 'function_name' in test
> Checking for header sys/time.h sys/resource.h : yes
> Checking for program 'm4'                     : /usr/bin/m4
> Checking for header sys/wait.h                : yes
> Invalid argument 'function_name' in test
> Checking for header signal.h                  : yes
> Checking for 'gcc' (C compiler)               : /usr/bin/gcc
> Checking for 'g++' (C++ compiler)             : /usr/bin/g++
> Checking for 'gcc' (C compiler)               : /usr/bin/gcc
> Invalid argument 'function_name' in test
> Checking for header string.h                  : yes
> Checking for 'g++' (C++ compiler)             : /usr/bin/g++
> Invalid argument 'function_name' in test
> Checking for header stdlib.h                  : yes
> Invalid argument 'function_name' in test
> Checking for header stdlib.h                  : yes
> 'configure' finished successfully (1.058s)
>
> --
> Sebastian Huber, embedded brains GmbH
>
> Address : Dornierstr. 4, D-82178 Puchheim, Germany
> Phone   : +49 89 189 47 41-16
> Fax     : +49 89 189 47 41-09
> E-Mail  : sebastian.huber at embedded-brains.de
> PGP     : Public key available on request.
>
> Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
>
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20190201/003b2105/attachment-0002.html>


More information about the devel mailing list