]> granicus.if.org Git - libevent/commitdiff
build: use literals for AC_CHECK_HEADERS/AC_CHECK_FUNCS
authorAzat Khuzhin <azat@libevent.org>
Sun, 28 Mar 2021 14:16:54 +0000 (17:16 +0300)
committerAzat Khuzhin <azat@libevent.org>
Sun, 28 Mar 2021 14:19:28 +0000 (17:19 +0300)
autoconf 2.72 reports:

    configure.ac:188: warning: AC_CHECK_HEADERS(\
    ): you should use literals
    ../autoconf-2.71/lib/autoconf/headers.m4:217: AC_CHECK_HEADERS is expanded from...
    configure.ac:188: the top level
    configure.ac:188: warning: AC_CHECK_HEADERS(afunix.h
    ): you should use literals

And also it fails to find fcntl.h and other headers because of this:

    configure:14725: checking for  fcntl.h
    configure:14725: gcc -c -I/mingw64/include  conftest.c >&5
    conftest.c:77:10: fatal error:  fcntl.h: No such file or directory
       77 | #include < fcntl.h>

Refs: https://github.com/libevent/libevent/pull/1146/checks?check_run_id=2211752215

configure.ac

index 1f1e8146e140313d0b5f0862ecd48dc71bf148fa..40e2ab226cc58f366536a3a85e97cb2855079cbb 100644 (file)
@@ -185,40 +185,40 @@ LIBEVENT_OPENSSL
 LIBEVENT_MBEDTLS
 
 dnl Checks for header files.
-AC_CHECK_HEADERS([ \
-  arpa/inet.h \
-  fcntl.h \
-  ifaddrs.h \
-  mach/mach_time.h \
-  mach/mach.h \
-  netdb.h \
-  netinet/in.h \
-  netinet/in6.h \
-  netinet/tcp.h \
-  sys/un.h \
-  poll.h \
-  port.h \
-  stdarg.h \
-  stddef.h \
-  sys/devpoll.h \
-  sys/epoll.h \
-  sys/event.h \
-  sys/eventfd.h \
-  sys/ioctl.h \
-  sys/mman.h \
-  sys/param.h \
-  sys/queue.h \
-  sys/resource.h \
-  sys/select.h \
-  sys/sendfile.h \
-  sys/socket.h \
-  sys/stat.h \
-  sys/time.h \
-  sys/timerfd.h \
-  sys/uio.h \
-  sys/wait.h \
-  sys/random.h \
-  errno.h \
+AC_CHECK_HEADERS([
+  arpa/inet.h
+  fcntl.h
+  ifaddrs.h
+  mach/mach_time.h
+  mach/mach.h
+  netdb.h
+  netinet/in.h
+  netinet/in6.h
+  netinet/tcp.h
+  sys/un.h
+  poll.h
+  port.h
+  stdarg.h
+  stddef.h
+  sys/devpoll.h
+  sys/epoll.h
+  sys/event.h
+  sys/eventfd.h
+  sys/ioctl.h
+  sys/mman.h
+  sys/param.h
+  sys/queue.h
+  sys/resource.h
+  sys/select.h
+  sys/sendfile.h
+  sys/socket.h
+  sys/stat.h
+  sys/time.h
+  sys/timerfd.h
+  sys/uio.h
+  sys/wait.h
+  sys/random.h
+  errno.h
   afunix.h
 ])
 
@@ -325,40 +325,40 @@ AC_C_INLINE
 AC_HEADER_TIME
 
 dnl Checks for library functions.
-AC_CHECK_FUNCS([ \
-  accept4 \
-  arc4random \
-  arc4random_buf \
-  arc4random_addrandom \
-  eventfd \
-  epoll_create1 \
-  fcntl \
-  getegid \
-  geteuid \
-  getifaddrs \
-  gettimeofday \
-  issetugid \
-  mach_absolute_time \
-  mmap \
-  nanosleep \
-  pipe \
-  pipe2 \
-  putenv \
-  sendfile \
-  setenv \
-  setrlimit \
-  sigaction \
-  signal \
-  strsignal \
-  strlcpy \
-  strsep \
-  strtok_r \
-  strtoll \
-  sysctl \
-  timerfd_create \
-  umask \
-  unsetenv \
-  usleep \
+AC_CHECK_FUNCS([
+  accept4
+  arc4random
+  arc4random_buf
+  arc4random_addrandom
+  eventfd
+  epoll_create1
+  fcntl
+  getegid
+  geteuid
+  getifaddrs
+  gettimeofday
+  issetugid
+  mach_absolute_time
+  mmap
+  nanosleep
+  pipe
+  pipe2
+  putenv
+  sendfile
+  setenv
+  setrlimit
+  sigaction
+  signal
+  strsignal
+  strlcpy
+  strsep
+  strtok_r
+  strtoll
+  sysctl
+  timerfd_create
+  umask
+  unsetenv
+  usleep
   getrandom
 ])