Lines Matching +full:self +full:- +full:working +full:- +full:mode

1 dnl Copyright 2000-2007 Niels Provos
2 dnl Copyright 2007-2012 Niels Provos and Nick Mathewson
8 AC_INIT(libevent,2.1.12-stable)
13 AC_CONFIG_AUX_DIR([build-aux])
17 AC_CONFIG_HEADERS(config.h evconfig-private.h:evconfig-private.h.in)
34 # CFLAGS="$CFLAGS -D_OSF_SOURCE"
42 # AC_PROG_MKDIR_P - $(MKDIR_P) should be defined by AM_INIT_AUTOMAKE
49 # have -fno-strict-aliasing
57 CFLAGS="$CFLAGS -Wall"
58 # And disable the strict-aliasing optimization, since it breaks
59 # our sockaddr-handling code in strange ways.
61 CFLAGS="$CFLAGS -fno-strict-aliasing"
70 CFLAGS="$CFLAGS -Wno-deprecated-declarations"
75 AC_ARG_ENABLE(gcc-warnings,
76 AS_HELP_STRING(--disable-gcc-warnings, disable verbose warnings with GCC))
78 AC_ARG_ENABLE(gcc-hardening,
79 AS_HELP_STRING(--enable-gcc-hardening, enable compiler security checks),
81 CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2 -fstack-protector-all"
82 CFLAGS="$CFLAGS -fwrapv -fPIE -Wstack-protector"
83 CFLAGS="$CFLAGS --param ssp-buffer-size=1"
86 AC_ARG_ENABLE(thread-support,
87 AS_HELP_STRING(--disable-thread-support, disable support for threading),
89 AC_ARG_ENABLE(malloc-replacement,
90 …AS_HELP_STRING(--disable-malloc-replacement, disable support for replacing the memory mgt function…
93 AS_HELP_STRING(--disable-openssl, disable support for openssl encryption),
95 AC_ARG_ENABLE(debug-mode,
96 AS_HELP_STRING(--disable-debug-mode, disable support for running in debug mode),
98 AC_ARG_ENABLE([libevent-install],
99 AS_HELP_STRING([--disable-libevent-install, disable installation of libevent]),
101 AC_ARG_ENABLE([libevent-regress],
102 AS_HELP_STRING([--disable-libevent-regress, skip regress in make check]),
105 AS_HELP_STRING([--disable-samples, skip building of sample programs]),
107 AC_ARG_ENABLE([function-sections],
108 …AS_HELP_STRING([--enable-function-sections, make static library allow smaller binaries with --gc-s…
110 AC_ARG_ENABLE([verbose-debug],
111 AS_HELP_STRING([--enable-verbose-debug, verbose debug logging]),
113 AC_ARG_ENABLE([clock-gettime],
114 AS_HELP_STRING(--disable-clock-gettime, do not use clock_gettime even if it is available),
123 dnl the command line with --enable-shared and --disable-shared.
140 dnl - check if the macro _WIN32 is defined on this compiler.
141 dnl - (this is how we check for a windows compiler)
155 dnl - check if the macro __midipix__ is defined on this compiler.
156 dnl - (this is how we check for a midipix version of GCC)
170 dnl - check if the macro __CYGWIN__ is defined on this compiler.
171 dnl - (this is how we check for a cygwin version of GCC)
205 EV_LIB_WS32=-lws2_32
206 EV_LIB_GDI=-lgdi32
423 dnl check getaddrinfo and gethostbyname_r for non-windows
448 # (This is cut-and-pasted from Tor, which based its logic on
546 AC_MSG_CHECKING(for working kqueue)
569 if (pipe(fd) == -1)
571 if (fcntl(fd[1], F_SETFL, O_NONBLOCK) == -1)
577 if ((kq = kqueue()) == -1)
585 if (n == -1)
593 if (n == -1 || n == 0)
638 return (epfd == -1 ? 1 : 0);
824 # check if we should hard-code the mm functions.
830 # check if we should hard-code debugging out
833 [Define if libevent should build without support for a debug mode])
838 CFLAGS="$CFLAGS -DUSE_DEBUG"
868 # -W is the same as -Wextra
869-W -Wfloat-equal -Wundef -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings
871 CFLAGS="$CFLAGS -Werror"
874 CFLAGS="$CFLAGS -Wno-unused-parameter -Wstrict-aliasing"
878 CFLAGS="$CFLAGS -Winit-self -Wmissing-field-initializers -Wdeclaration-after-statement"
879 #CFLAGS="$CFLAGS -Wold-style-definition"
884 CFLAGS="$CFLAGS -Waddress"
889 CFLAGS="$CFLAGS -Wnormalized=id -Woverride-init"
894 CFLAGS="$CFLAGS -Wlogical-op"
898 # Disable the unused-function warnings, because these trigger
899 # for minheap-internal.h related code.
900 CFLAGS="$CFLAGS -Wno-unused-function"
907 CFLAGS="$CFLAGS -Qunused-arguments"
912 ##This will break the world on some 64-bit architectures
913 # CFLAGS="$CFLAGS -Winline"
923 dnl NetBSD will link but likely not run with --gc-sections
926 dnl --gc-sections causes attempt to load as linux elf, with
930 dnl fail even with Linux emulation working as designed.
932 dnl to a NetBSD host with Linux emulation working.
934 CFLAGS="$CFLAGS -Wl,--gc-sections"
967 dnl mention gc-sections.
968 if test "X$cross_compiling" = "Xyes" || grep gc-sections conftest.err ; then
983 CFLAGS="-ffunction-sections -fdata-sections $CFLAGS"
984 LIBEVENT_GC_SECTIONS="-Wl,--gc-sections"