How can I check if a function exists in waf?

Sebastian Huber sebastian.huber at embedded-brains.de
Fri Feb 1 06:43:02 UTC 2019


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"):

./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.



More information about the devel mailing list