1
0
Fork 0

[configure] Check for libgen.h

This commit is contained in:
Witold Filipczyk 2022-05-08 13:59:24 +02:00
parent 027d0f9800
commit c5d321c1b5
3 changed files with 11 additions and 0 deletions

View File

@ -207,6 +207,7 @@ AC_HEADER_TIME
AC_CHECK_HEADERS(wchar.h wctype.h)
AC_CHECK_HEADERS(fcntl.h limits.h time.h unistd.h)
AC_CHECK_HEADERS(libgen.h)
AC_CHECK_HEADERS(sigaction.h)
AC_CHECK_HEADERS(arpa/inet.h)
AC_CHECK_HEADERS(netinet/in_systm.h netinet/in_system.h netinet/ip.h)

View File

@ -153,6 +153,10 @@ if compiler.has_header('fcntl.h')
conf_data.set('HAVE_FCNTL_H', 1)
endif
if compiler.has_header('libgen.h')
conf_data.set('HAVE_LIBGEN_H', 1)
endif
if compiler.has_header('unistd.h')
conf_data.set('HAVE_UNISTD_H', 1)
endif

View File

@ -8,7 +8,13 @@
#define _GNU_SOURCE /* strcasestr() */
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef HAVE_LIBGEN_H
#include <libgen.h> /* basename() */
#endif
#include <stdarg.h>
#include <stdio.h>