meson: Only detect each function once
Use conf_data outside of include/ to avoid re-running detection of the same functions. Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Peter Harris <pharris@opentext.com>
This commit is contained in:
parent
03d6275e60
commit
c4c002d1ca
|
@ -21,32 +21,32 @@ srcs_os = [
|
||||||
|
|
||||||
# Wrapper code for missing C library functions
|
# Wrapper code for missing C library functions
|
||||||
srcs_libc = []
|
srcs_libc = []
|
||||||
if not cc.has_function('reallocarray')
|
if not conf_data.get('HAVE_REALLOCARRAY')
|
||||||
srcs_libc += 'reallocarray.c'
|
srcs_libc += 'reallocarray.c'
|
||||||
endif
|
endif
|
||||||
if not cc.has_function('strcasecmp')
|
if not conf_data.get('HAVE_STRCASECMP')
|
||||||
srcs_libc += 'strcasecmp.c'
|
srcs_libc += 'strcasecmp.c'
|
||||||
endif
|
endif
|
||||||
if not cc.has_function('strcasestr')
|
if not conf_data.get('HAVE_STRCASESTR')
|
||||||
srcs_libc += 'strcasestr.c'
|
srcs_libc += 'strcasestr.c'
|
||||||
endif
|
endif
|
||||||
if not cc.has_function('strlcat')
|
if not conf_data.get('HAVE_STRLCAT')
|
||||||
srcs_libc += 'strlcat.c'
|
srcs_libc += 'strlcat.c'
|
||||||
endif
|
endif
|
||||||
if not cc.has_function('strlcpy')
|
if not conf_data.get('HAVE_STRLCPY')
|
||||||
srcs_libc += 'strlcpy.c'
|
srcs_libc += 'strlcpy.c'
|
||||||
endif
|
endif
|
||||||
if not cc.has_function('strndup')
|
if not conf_data.get('HAVE_STRNDUP')
|
||||||
srcs_libc += 'strndup.c'
|
srcs_libc += 'strndup.c'
|
||||||
endif
|
endif
|
||||||
if not cc.has_function('timingsafe_memcmp')
|
if not conf_data.get('HAVE_TIMINGSAFE_MEMCMP')
|
||||||
srcs_libc += 'timingsafe_memcmp.c'
|
srcs_libc += 'timingsafe_memcmp.c'
|
||||||
endif
|
endif
|
||||||
if not cc.has_function('poll')
|
if not conf_data.get('HAVE_POLL')
|
||||||
srcs_os += 'xserver_poll.c'
|
srcs_os += 'xserver_poll.c'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if cc.has_function('sigaction')
|
if conf_data.get('BUSFAULT')
|
||||||
srcs_os += 'busfault.c'
|
srcs_os += 'busfault.c'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user