Commit Graph

140 Commits

Author SHA1 Message Date
2fa004f50c * configure.ac: Add --disable-doc / --enable-doc (default) 2017-04-29 18:32:30 +02:00
9f5290ff44 * configure.ac: Add "-fPIC -pie" for Thread sanitizer 2017-04-10 00:30:01 +05:30
3c54d527b6 * configure.ac: Fix test for asan and tsan being mutually exclusive
* configure.ac: Fix test for asan and tsan being mutually exclusive
* configure.ac: Make `./configure --help` document about msan and tsan being mutually exclusive
2017-04-10 00:09:04 +05:30
970077708a Merge pull request #175 from rootkea/configure
* configure.ac: Check for msan and tsan being mutually exclusive
2017-04-09 19:08:34 +02:00
3b5ef10e79 * configure.ac: Check for msan and tsan being mutually exclusive 2017-04-09 22:19:30 +05:30
720adc3c62 * configure.ac: Check for Valgrind and Sanitizers being mutually exclusive
* configure.ac: Check for valgrind and Sanitizers being mutually exclusive
* configure.ac: Make ./configure --help document above check
* configure.ac: Make ./configure --help document the existing check of asan and msan
2017-04-09 22:04:51 +05:30
b94bcc5f5d * configure.ac: Don't complain when exhaustive switch has default case 2017-04-07 16:36:16 +02:00
ab36970ed4 * configure.ac: Prevent some useless clang warnings 2017-04-07 16:22:13 +02:00
5cd7eb43d2 * configure.ac: Reduce warnings from gnulib code 2017-04-06 10:52:03 +02:00
f31385badf * configure.ac: Remove -Wformat when cross-compiling 2017-04-05 16:07:06 +02:00
43fd5d8e40 Fix --enable-fsanitize-msan for gcc
* configure.ac: Add -fsanitize=leak if available
2017-03-30 16:38:28 +02:00
ddd87213c2 * configure.ac: Add -Wdeclaration-after-statement to unwanted options (C89 only) 2017-03-29 17:13:36 +02:00
4f9f4f2828 Fix http to https
* README.md: Fix http to https
* bootstrap.conf: Likewise
* configure.ac: Likewise
2017-02-28 11:52:28 +01:00
5b2888ac9c Add brotli decompression, Accept-Encoding 'br' 2017-02-24 12:59:55 +01:00
33cbef6657 * configure.ac: Add xz archive format 2017-02-03 17:48:27 +01:00
f68819c5e7 Move m4 wget_ functions to m4/
* .gitignore: Add exception m4/wget_manywarnings.m4
* configure.ac: Remove manywarnings m4 code
* m4/wget_manywarnings.m4: Add manywarnings m4 code here
2016-11-11 22:17:08 +01:00
f877389749 * configure.ac: Define and use wget_MANYWARNINGS m4 macro 2016-11-11 17:10:23 +01:00
cdc1ed3b83 * configure.ac: Remove old commented code 2016-11-08 13:18:42 +01:00
bf22cc0a40 * configure.ac: Do not check for munmap() 2016-11-07 16:07:26 +01:00
f26f23bcd3 * configure.ac: Understand 'Debian clang' and 'gcc-x.y' for 2016-11-03 09:51:25 +01:00
b049eb6d3a Fix gcc/clang warnings from the new manywarnings feature
* configure.ac: Suppress -Wunsuffixed-float-constants for gcc,
  add -Wno-disabled-macro-expansion to clang flags
* examples/getstream.c: Removed 'unused' attributes from argc and argv.
* include/wget/wget.h: Fix slot to int for bar functions.
* libwget/bar.c: Fix slot to int for bar functions, cast to int,
  change type of bitfield 'redraw' to unsigned.
* libwget/hsts.c (wget_hsts_new): Fix int to bitfield conversion.
* libwget/http.c: Cast printf %p format to (void *).
* src/wget.c: Cast printf %p format to (void *),
  remove ACTION_DONE from enum actions.
* src/wget_host.h: Fix double declaration of host_remove_job()
* tests/libtest.c (wget_test_check_filesystem): Fix type of 'rc'.
* tests/test-idn-robots.c: Fix comma to semikolon at end of line.
* tests/test.c (test_strcasecmp_ascii): Fix type of loop variable.
2016-11-02 22:19:41 +01:00
4c6d6179f2 Replace manywarnings module by our own code
* bootstrap.conf: Remove manywarnings, add warnings
* configure.ac: Replace manywarnings code

The new code works on recent gcc and clang with an overhead of
~100ms instead of ~9s here (without -C).
This is meant for developers only and is activated by either
--enable-gcc-warnings or by touching .manywarnings.
2016-11-02 16:51:49 +01:00
cb5f9a230f Check for gcrypt.h
* configure.ac: Check for gcrypt.h
* libwget/hashfile.c: Check for HAVE_GCRYPT_H
2016-10-17 21:05:23 +02:00
8f45be7d2b * configure.ac: Ignore the Stack Protector warnings 2016-10-10 15:47:11 +02:00
9568b0c87e Rename include/libwget.h to include/wget/wget.h+wgetver.h 2016-09-30 09:47:32 +02:00
cd83f7c24c * configure.ac: Enable support for disabling assertions 2016-09-26 16:56:03 +02:00
c835040f4a Fix fnmatch() on Solaris
* bootstrap.conf: Add fnmatch-gnu
* configure.ac: Add AC_GNU_SOURCE
2016-09-09 17:10:54 +02:00
0a1ed005c2 * configure.ac: Enable color diagnostics with ccache 2016-09-04 18:10:48 +02:00
b9fa331359 Add configure support for Thread Sanitizer as well
* configure.ac: Add configure option to enable Thread Sanitizer.
    Enabling this option currently causes all tests to fil due to
    various data races. Some of the races can be fixed, while others are
    false positives.
    [ci skip]
2016-07-28 19:18:27 +02:00
9b0cb80c26 Add configure option to enable compiler sanitizers
Compiler sanitization options allow the code to be instrumented at
    compile time. They add instructions to detect various behaviours at
    runtime. These options usually cause significant slowdown and will
    often cause the program to crash. Hence, do *not* use them on
    production systems. They are meant to be used only by the developers
    for testing purposes. Three sanitization options are added to the
    configure options in this commit:
      1. Undefined Behaviour Sanitizer (ubsan): Detect issues in the code
      that are undefined behaviour according to the C specification
      2. Address Sanitizer (ASan): Detect addressing issues and memory
      leaks at runtime. Slightly similar to Valgrind, but using compiler
      added instrumentation
      3. Memory Sanitizer (MSan): Detect uninitialized memory reads.

    The Address Sanitizer and Memory Sanitizer options are mutually
    exclusive, and hence a check for the same is added to the configure
    script.

    MSan additionally requires that all libraries be instrumented too.
    Without that, MSan is nearly unusable due to various false
    positives.

    * configure.ac: Add option to enable UBSan, ASan and MSan fsanitize
    options at compile time.
2016-07-23 20:38:57 +02:00
26171f73ab * configure.ac: Add parallel-tests and gnu to automake options 2016-07-12 11:16:15 +02:00
ef6bc41ba3 Use bootstrap
* bootstrap, bootstrap.conf: new files.
 * configure.ac: invoke AC_CONFIG_MACRO_DIR and
   AC_CONFIG_AUX_DIR.
2016-06-26 17:03:31 +02:00
d8d35fe2b0 Use gnutls_transport_[gs]et_int() in GnuTLS code if possible
* configure.ac: Check for gnutls_transport_get_int()
* libwget/ssl_gnutls.c: Use gnutls_transport_[gs]et_int() if possible

Avoid int <-> pointer conversions
2016-06-15 15:06:09 +02:00
c8ef9d6176 Use less warnings for gnulib compilation on --enable-gcc-warnings
* autogen.sh: Add option --makefile-name=gnulib.mk to gnulib-tool
* configure.ac: Add 'subdir-objects' to AM_INIT_AUTOMAKE,
  add macro 'gl_GCC_VERSION_IFELSE' from coreutils project,
  enable extra gcc warnings by default when running from Git repo,
  disable several warnings for gnulib compilation
* lib/Makefile.am: New file
2016-06-15 12:51:17 +02:00
a8d99227e8 Add gnulib module 'manywarnings'
* autogen.sh: Add module manywarnings
* configure.ac: Add ./configure option --enable-gcc-warnings to enable
 many warnings
* examples/Makefile.am: Add WERROR_CFLAGS and WARN_CFLAGS to AM_CFLAGS
* libwget/Makefile.am: Likewise
* src/Makefile.am: Likewise
* tests/Makefile.am: Likewise
2016-06-14 12:22:03 +02:00
1ee2b8b67b Fix build for systems without getuid()
* configure.ac: Check for getuid()
* libwget/io.c (wget_update_file): Check for HAVE_GETUID
2016-05-08 22:45:41 +02:00
c20b82935b Fix --enable-bzip2/--disable-bzip2
* configure.ac: Fix AC_ARG_WITH for bzip2
2016-05-08 22:44:20 +02:00
17e8be5c68 Remove libpthread check from configure.ac
* configure.ac: Remove check for libpthread
* include/libwget.h.in: Check HAVE_PTHREAD_H,
  Do not undefine gettext
* libwget/thread.c: Check HAVE_PTHREAD_H

This check is done by gnulib 'pthread' module.
2016-01-22 14:33:49 +01:00
f7ba3e5431 Use doxygen instead of gtk-doc
* Removed all gtk-doc files and references.
* Added doxygen files and rules
2016-01-17 20:29:58 +01:00
a19d366183 Remove vasprintf from configure.ac
* configure.ac: Remove vasprintf from AC_CHECK_FUNCS
2016-01-13 16:11:42 +01:00
c790d19ea3 Add gnulib modules memchr, memmove, memset, mkdir, strerror, strstr
* autogen.sh: Add gnulib modules memchr, memmove, memset, mkdir, strerror, strstr
* configure.ac: Remove checks for memchr, memmove, memset, mkdir,
  strerror, strstr, strchr, strrchr
2016-01-12 22:13:56 +01:00
f2c5bfa961 Add gnulib module inline
* autogen.sh: Add gnulib module inline
* configure.ac: Remove AC_C_INLINE
* libwget/hashmap.c: Replace inline by _GL_INLINE
* libwget/iri.c: Replace inline by _GL_INLINE
* libwget/ssl_gnutls.c: Replace inline by _GL_INLINE
* libwget/utils.c: Replace inline by _GL_INLINE
* libwget/xalloc.c: Replace inline by _GL_INLINE,
  include config.h
2016-01-12 17:35:39 +01:00
2ff0ba9852 Add gnulib modules calloc-posix, malloc-posix, realloc-posix
* autogen.sh: Add gnulib modules calloc-posix, malloc-posix, realloc-posix
* configure.ac: Remove two comment lines
* libwget/xalloc.c: Remove rpl_malloc() and rpl_realloc()
2016-01-12 17:17:24 +01:00
69d1b3392c Add gnulib module setlocale
* autogen.sh: Add gnulib module setlocale
* configure.ac: Remove searching for setlocale, locale.h, sys/time.h
* src/wget.c: Move #include <locale.h> (cosmetics)
* examples/Makefile.am: Add $(LIBTHREAD), @INTL_MACOSX_LIBS@ to LDADD
* libwget/Makefile.am: Add to $(LTLIBTHREAD), @INTL_MACOSX_LIBS@ LDADD
* src/Makefile.am: Add $(LIBTHREAD), @INTL_MACOSX_LIBS@ to LDADD
* tests/Makefile.am: Add $(LIBTHREAD), @INTL_MACOSX_LIBS@ to LDADD
2016-01-12 17:08:29 +01:00
33697e17df Add gnulib module langinfo
* autogen.sh: Add gnulib module langinfo
* configure.ac: Remove searching for stringprep.h and langinfo.h
* libwget/encoding.c: Remove conditional code
2016-01-12 16:31:29 +01:00
c6e0ba1dce Add gnulib module iconv
* autogen.sh: Add gnulib module iconv
* configure.ac: Remove AM_ICONV
* examples/Makefile.am: Add $(LIBICONV) to LDADD
* libwget/Makefile.am: Add $(LIBICONV) to LDADD
* src/Makefile.am: Add $(LIBICONV) to LDADD
* tests/Makefile.am: Add $(LIBICONV) to LDADD
2016-01-12 15:58:40 +01:00
dd9cb25fcc Cover network functions with gnulib modules
* autogen.sh: Add accept, bind, close, connect, getaddrinfo, getsockname,
  listen, netdb, netinet_in, open, read, send, sendto, servent, setsockopt,
  socket, sys_socket, write to modules
* configure.ac: Remove searching for ws2_32, libsocket, libnsl, netdb.h,
  netinet/in.h, sys/socket.h, socket.
  Add searching for netinet/tcp.h.
* examples/Makefile.am: Add additional libs.
* libwget/Makefile.am: Add additional libs.
* src/Makefile.am: Add additional libs.
* tests/Makefile.am: Add additional libs.
* libwget/http.c: Remove conditional code.
* libwget/net.c: Remove conditional code. Use c_isdgit().
* libwget/net.h: Remove conditional code.
2016-01-12 15:08:14 +01:00
79b26de783 Check if gcc __sync_fetch_and_add works with long long
* configure.ac: Check if gcc __sync_fetch_and_add works with long long
* src/wget.c (_fetch_and_add_longlong): Check WITH_SYNC_FETCH_AND_ADD_LONGLONG
2016-01-12 12:04:03 +01:00
e8fafdeb9f Add header file gnulib modules
* autogen.sh: Add gettext-h, inttypes, stdarg, stddef, stdint
* configure.ac: Remove check for inttypes.h, libintl.h, stddef.h
  Remove AC_TYPE_* checks
* include/libwget.h.in: Include gnulib gettext.h
* examples/Makefile.am: Fix AM_CPPFLAGS, add $(LIBINTL) to LDADD
* libwget/Makefile.am: Fix LDADD and test_linking_LDADD
* src/Makefile.am: Add $(LIBINTL) to wget2_LDADD
* tests/Makefile.am: Fix AM_CPPFLAGS and libtest_la_CPPFLAGS,
  add $(LIBINTL) to LDADD, test_LDADD and test_parse_html_LDADD
2016-01-12 10:18:09 +01:00
cffe5eb024 Remove detection of select() from configure.ac
* configure.ac: Remove detection of select()
* src/wget.c: Remove commented include directives
2016-01-11 22:37:54 +01:00