autocrap de-cargo-culting

Poul-Henning Kamp phk at phk.freebsd.dk
Fri Nov 25 11:32:55 CET 2016


Does anybody know of any reason not to apply this patch ?


diff --git a/configure.ac b/configure.ac
index bfc0099..da8d2d9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -21,12 +21,6 @@ AM_SILENT_RULES([yes])
 AC_DISABLE_STATIC
 AC_PROG_LIBTOOL
 
-# Checks for programs.
-AC_GNU_SOURCE
-AC_PROG_CC
-AC_PROG_CC_STDC
-AC_PROG_CPP
-
 AX_PTHREAD(,[AC_MSG_ERROR([Could not configure pthreads support])])
 
 LIBS="$PTHREAD_LIBS $LIBS"
@@ -88,13 +82,6 @@ fi
 
 save_LIBS="${LIBS}"
 LIBS=""
-AC_SEARCH_LIBS(pthread_create, [thr pthread c_r])
-PTHREAD_LIBS="${LIBS}"
-LIBS="${save_LIBS}"
-AC_SUBST(PTHREAD_LIBS)
-
-save_LIBS="${LIBS}"
-LIBS=""
 AC_CHECK_LIB(socket, socket)
 AC_CHECK_LIB(nsl, getaddrinfo)
 NET_LIBS="${LIBS}"
@@ -198,43 +185,18 @@ AC_CHECK_HEADERS([edit/readline/readline.h],
 	])
 
 # Checks for header files.
-AC_HEADER_STDC
-AC_HEADER_SYS_WAIT
-AC_HEADER_TIME
-AC_CHECK_HEADERS([sys/param.h])
-AC_CHECK_HEADERS([sys/types.h])
 AC_CHECK_HEADERS([sys/endian.h])
 AC_CHECK_HEADERS([sys/filio.h])
 AC_CHECK_HEADERS([sys/mount.h], [], [], [#include <sys/param.h>])
-AC_CHECK_HEADERS([sys/socket.h])
 AC_CHECK_HEADERS([sys/statvfs.h])
 AC_CHECK_HEADERS([sys/vfs.h])
 AC_CHECK_HEADERS([endian.h])
 AC_CHECK_HEADERS([execinfo.h])
-AC_CHECK_HEADERS([netinet/in.h])
 AC_CHECK_HEADERS([pthread_np.h], [], [], [#include <pthread.h>])
-AC_CHECK_HEADERS([stddef.h])
-AC_CHECK_HEADERS([stdlib.h])
-AC_CHECK_HEADERS([unistd.h])
 AC_CHECK_HEADERS([priv.h])
 
-# Checks for typedefs, structures, and compiler characteristics.
-AC_C_CONST
-AC_CHECK_MEMBERS([struct sockaddr.sa_len],,,[
-#include <sys/types.h>
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-])
-
 # Checks for library functions.
-AC_TYPE_SIGNAL
-AC_TYPE_SIZE_T
-AC_FUNC_VPRINTF
-AC_CHECK_FUNCS([strerror])
-AC_FUNC_STRERROR_R
 AC_CHECK_FUNCS([dladdr])
-AC_CHECK_FUNCS([socket])
 AC_CHECK_FUNCS([nanosleep])
 AC_CHECK_FUNCS([setppriv])
 AC_CHECK_FUNCS([fallocate])
@@ -244,8 +206,6 @@ save_LIBS="${LIBS}"
 LIBS="${PTHREAD_LIBS}"
 AC_CHECK_FUNCS([pthread_set_name_np])
 AC_CHECK_FUNCS([pthread_setname_np])
-AC_CHECK_FUNCS([pthread_mutex_isowned_np])
-AC_CHECK_FUNCS([pthread_timedjoin_np])
 LIBS="${save_LIBS}"
 
 # Support for visibility attribute
-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.



More information about the varnish-dev mailing list