1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-05 00:55:04 -05:00
Commit Graph

297 Commits

Author SHA1 Message Date
Chris Young
1e853653d2
configure: add --with-amissl
AmiSSL is an Amiga native library which provides a wrapper over OpenSSL.
It also requires all programs using it to use bsdsocket.library
directly, rather than accessing socket functions through clib, which
libcurl was not necessarily doing previously. Configure will now check
for the headers and ensure they are included if found.

Closes #3677
2019-03-15 10:22:42 +01:00
Daniel Stenberg
11974ac859
configure: remove the unused fdopen macro
and the two remaining #ifdefs for it

Closes #3600
2019-02-22 22:38:33 +01:00
Daniel Stenberg
179311ec37
configure: rewrite --enable-code-coverage
The previously used ax_code_coverage.m4 is not license compatible and
must not be used.

Reported-by: William A. Rowe Jr
Fixes #3497
Closes #3499
2019-01-26 00:29:50 +01:00
Daniel Stenberg
26d7f0094a
curl-compilers.m4: check for __ibmxl__ to detect xlclang
Follow-up to 2fa0d57e2e. The __xlc__ symbol is only defined there if a
particular flag is used for legacy macros.

Fixes #3474
Closes #3479
2019-01-16 08:53:56 +01:00
Daniel Stenberg
2fa0d57e2e
curl-compilers.m4: detect xlclang
Since it isn't totally clang compatible, we detect this IBM clang
front-end and if detected, avoids some clang specific magic.

Reported-by: Kees Dekker
Fixes #3474
Closes #3476
2019-01-15 16:18:45 +01:00
Daniel Gustafsson
2fcc4367be configure: Fix typo in comment 2018-11-21 12:24:41 +01:00
Daniel Stenberg
5616c1df28
configure: s/AC_RUN_IFELSE/CURL_RUN_IFELSE
fix a few leftovers

Fixes #3006
Closes #3049
2018-09-26 18:51:34 +02:00
Viktor Szakats
b801b453af whitespace fixes
- replace tabs with spaces where possible
- remove line ending spaces
- remove double/triple newlines at EOF
- fix a non-UTF-8 character
- cleanup a few indentations/line continuations
  in manual examples

Closes https://github.com/curl/curl/pull/3037
2018-09-23 22:24:02 +00:00
Marcel Raad
014ed7c22f
Enable more GCC warnings
This enables the following additional warnings:
-Wold-style-definition
-Warray-bounds=2 instead of the default 1
-Wformat=2, but only for GCC 4.8+ as Wno-format-nonliteral is not
 respected for older versions
-Wunused-const-variable, which enables level 2 instead of the default 1
-Warray-bounds also in debug mode through -ftree-vrp
-Wnull-dereference also in debug mode through
 -fdelete-null-pointer-checks

Closes https://github.com/curl/curl/pull/2747
2018-08-21 18:53:46 +02:00
Marcel Raad
15ed9f87e3
curl-compilers: enable -Wimplicit-fallthrough=4 for GCC
This enables level 4 instead of the default level 3, which of the
currently used comments only allows /* FALLTHROUGH */ to silence the
warning.

Closes https://github.com/curl/curl/pull/2747
2018-08-21 18:53:45 +02:00
Marcel Raad
60776a0515
curl-compilers: enable -Wbad-function-cast on GCC
This warning used to be enabled only for clang as it's a bit stricter
on GCC. Silence the remaining occurrences and enable it on GCC too.

Closes https://github.com/curl/curl/pull/2747
2018-08-21 18:53:45 +02:00
Daniel Stenberg
687965f206
curl-confopts.m4: fix typo from ed224f23d5
Fixes my local configure to detect a custom installed c-ares without
pkgconfig.
2018-06-15 17:14:05 +02:00
Daniel Stenberg
ed224f23d5
configure: use pkg-config for c-ares detection
First check if there's c-ares information given as pkg-config info and use
that as first preference.

Reported-by: pszemus on github
Fixes #2203
Closes #2658
2018-06-14 23:05:29 +02:00
Daniel Stenberg
679fa59ed8
configure: add missing m4/ax_compile_check_sizeof.m4
follow-up to mistake in 6876ccf90b
2018-05-22 08:37:10 +02:00
Daniel Stenberg
302d537423
configure: replace AC_TRY_RUN with CURL_RUN_IFELSE
... and export LD_LIBRARY_PATH properly. This is a follow-up from
2d4c215.

Fixes #2586
Reported-by: Bernhard Walle
2018-05-21 19:55:51 +02:00
Frank Gevaerts
7663a7c284
configure: put CURLDEBUG and DEBUGBUILD in lib/curl_config.h
They are removed from the compiler flags.

This ensures that make dependency tracking will force a rebuild whenever
configure --enable-debug or --enable-curldebug changes.

Closes #2548
2018-05-04 22:30:28 +02:00
Daniel Stenberg
2d4c2152c9
configure: keep LD_LIBRARY_PATH changes local
... only set it when we actually have to run tests to reduce its impact
on for example build commands etc.

Fixes #2490
Closes #2492

Reported-by: Dmitry Mikhirev
2018-04-16 20:32:17 +02:00
Eric Gallager
a19fefb070
build: add picky compiler warning flags for gcc 6 and 7 2018-04-07 11:18:58 +02:00
Viktor Szakats
05826081eb curl-openssl.m4: fix spelling [ci skip] 2018-03-12 18:18:39 +00:00
Jay Satiro
1b27fcfcf7 curl-openssl.m4: Fix version check for OpenSSL 1.1.1
- Add OpenSSL 1.1.1 to the header/library version lists.

- Detect OpenSSL 1.1.1 library using its function ERR_clear_last_mark,
  which was added in that version.

Prior to this change an erroneous header/library mismatch was caused by
lack of OpenSSL 1.1.1 detection. I tested using openssl-1.1.1-pre1.
2018-02-24 03:18:15 -05:00
Daniel Stenberg
b7db284266
configure: set PATH_SEPARATOR to colon for PATH w/o separator
The logic tries to figure out what the path separator in the $PATH
variable is, but if there's only one directory in the $PATH it
fails. This change make configure *guess* on colon instead of erroring
out, simply because that is probably the more common character.

PATH_SEPARATOR can always be set by the user to override the guessing.

(tricky bug to reproduce, as in my case for example the configure script
requires binaries in more than one directory so passing in a PATH with a
single dir fails.)

Reported-by: Earnestly on github
Fixes #2202
Closes #2265
2018-01-30 00:01:18 +01:00
Daniel Stenberg
f8548e84ad
configure: use -Wno-varargs on clang 3.9[.X] debug builds
... to avoid a clang bug
2017-09-08 23:16:16 +02:00
Daniel Stenberg
b5cc7dd360
m4/curl-compilers.m4: use proper quotes around string, not backticks
... when setting clang version to assume 3.7

Caused a lot of "integer expression expected" warnings by configure.
2017-08-16 00:05:11 +02:00
Jakub Zakrzewski
3cb4bb6b5f curl-confopts.m4: fix --disable-threaded-resolver
Closes https://github.com/curl/curl/issues/1784
2017-08-15 13:24:03 -04:00
Daniel Stenberg
d86e9182e4
configure: use the threaded resolver backend by default if possible
Closes #1647
2017-08-10 15:07:43 +02:00
Marcel Raad
18eac3df1b
ax_code_coverage.m4: update to latest version
This updates the script to aad5ad5fedb306b39f901a899b7bd305b66c418d
from August 01, 2017. Notably, this removes the lconv version whitelist.

Closes https://github.com/curl/curl/pull/1716
2017-08-08 08:43:26 +02:00
Marcel Raad
deadb2348f
curl-compilers.m4: disable warning spam with Cygwin's clang
When building with Cygwin or MinGW, libtool uses a wrapper executable
instead of a wrapper script [1], which is written in C and throws
missing-variable-declarations warnings. Don't enable these warnings on
Cygwin and MinGW in order to avoid warnings for every executable built,
which spams the test suite output when using Cygwin's clang.

[1] https://www.gnu.org/software/libtool/manual/html_node/Wrapper-executables.html

Closes https://github.com/curl/curl/pull/1665
2017-07-10 10:16:29 +02:00
Marcel Raad
e5d6aa8d61
curl-compilers.m4: fix unknown-warning-option on Apple clang
Since 5598b0bd63, clang -v is used to
detect the clang version. The version number was expected to come after
the word "version". For Apple clang, this doesn't work as it has its
own versioning scheme.
The version number is now first searched after the string
"based on LLVM". This works for Apple clang before version 7, and also
for e.g. Ubuntu's clang up to version 3.7. If it's not found and the
version string contains "Apple LLVM version", clang version 3.7 is
assumed, which is the version that comes with Xcode 7. Otherwise, the
version number is still expected after the word "version", which works
for very old Apple clang versions.

Ref: https://trac.macports.org/wiki/XcodeVersionInfo
Fixes https://github.com/curl/curl/issues/1606
Closes https://github.com/curl/curl/pull/1607
2017-06-24 11:10:38 +02:00
Marcel Raad
5bdf835c0b
curl-compilers.m4: enable comma clang warning
It usually warns when using commas instead of semicolons or other
operators by accident.

Closes https://github.com/curl/curl/pull/1578
2017-06-16 22:32:13 +02:00
Marcel Raad
32ec3063df
curl-compilers.m4: enable missing-variable-declarations clang warning
It usually warns when forgetting to declare TU-local variables static.

Closes https://github.com/curl/curl/pull/1578
2017-06-16 22:32:05 +02:00
Marcel Raad
b5c5909f30
curl-compilers.m4: enable double-promotion warning
Enable -Wdouble-promotion for both GCC and clang. It warns on implicit
promotion from float to double.

Closes https://github.com/curl/curl/pull/1578
2017-06-16 22:31:57 +02:00
Marcel Raad
783ce023a5
curl-compilers.m4: enable vla warning for clang
Previously, that warning was only implicitly active in C90 mode.
Enable it unconditionally as already done for GCC.

Closes https://github.com/curl/curl/pull/1578
2017-06-16 22:31:48 +02:00
Daniel Stenberg
f6e0f4556e build: provide easy code coverage measuring
Closes #1528
2017-06-02 13:15:06 +02:00
Marcel Raad
5e796c5e94
curl-compilers.m4: escape square brackets in regex
Otherwise, they are removed in the final configure file.
Also changed sed to "$SED" like in most other calls in this file.
2017-06-01 17:47:37 +02:00
Marcel Raad
5598b0bd63
curl-compilers.m4: fix compiler_num for clang
"clang -dumpversion" always returns "4.2.1", the GCC version that clang
was initially compatible to. Use "clang -v" instead, which returns the
actual clang version.

Fixes https://github.com/curl/curl/issues/1522
Closes https://github.com/curl/curl/pull/1523
2017-06-01 08:48:05 +02:00
Marcel Raad
314a7fa3ce
curl-compilers.m4: enable -Wshift-sign-overflow for clang
clang 2.9+ supports -Wshift-sign-overflow, which warns about undefined
behavior on signed left shifts when shifting by too many places.

Ref: https://github.com/curl/curl/issues/1516
Closes https://github.com/curl/curl/pull/1517
2017-05-31 10:06:53 +02:00
Jay Satiro
338f427a24 configure: stop prepending to LDFLAGS, CPPFLAGS
- Change prepends to appends because user's LDFLAGS and CPPFLAGS should
  always come first so they're searched before ours.

Bug: https://github.com/curl/curl/issues/1420
Reported-by: Helmut K. C. Tessarek
2017-04-25 03:25:41 -04:00
Marcel Raad
71d2d37005
curl-compilers.m4: accept -Og and -Ofast GCC flags
-Og, introduced in GCC 4.8, optimizes for debugging experience.
-Ofast, introduced in GCC 4.7, builds on -O3 and enables further
optimizations breaking strict standards compliance.
When specified in CFLAGS, these were always overridden by -O0 or -O2.
Fix this by adding them to flags_opt_all.

Ref: https://gcc.gnu.org/onlinedocs/gcc-4.8.0/gcc/Optimize-Options.html
Ref: https://github.com/curl/curl/pull/1404#issuecomment-296401570
Closes https://github.com/curl/curl/pull/1440
2017-04-24 10:56:56 +02:00
Marcel Raad
9168e2470d
curl-compilers.m4: turn implicit function declarations into errors
This adds -Werror-implicit-function-declaration for GCC 2.95+ so that
these errors are visible at the point where they occur instead of only
at link time.
Implicit function declarations are illegal in C99 and C++ anyway, and
the same warning has been turned into an error for ICC in commit
3072c5b8a1.

Ref: https://gcc.gnu.org/onlinedocs/gcc-2.95.2/gcc_2.html#SEC8
Ref: https://curl.haxx.se/mail/lib-2017-04/0001.html
Closes https://github.com/curl/curl/pull/1419
2017-04-15 21:17:56 +02:00
klemens
f7df67cff0 spelling fixes
Closes #1356
2017-03-26 23:56:23 +02:00
Jay Satiro
5f139d6b6f configure: fix for --enable-pthreads
Better handle options conflicts that can occur if --enable-pthreads.

Bug: https://github.com/curl/curl/pull/1295
Reported-by: Marc-Antoine Perennou
2017-03-02 02:43:10 -05:00
Daniel Stenberg
27302abb94 s/cURL/curl
We're mostly saying just "curl" in lower case these days so here's a big
cleanup to adapt to this reality. A few instances are left as the
project could still formally be considered called cURL.
2016-11-07 10:36:23 +01:00
Daniel Stenberg
a34c7ce754 configure/CURL_CHECK_FUNC_POLL: disable poll completely on mac
... so that the same libcurl build easier can run on any version.

Follow-up to issue #1057
2016-10-18 23:03:27 +02:00
Daniel Stenberg
9297ca49f5 configure: detect the broken poll() in macOS 10.12
Fixes #1057
2016-10-11 11:05:06 +02:00
Kamil Dudka
b2dcf0347f curl-compilers.m4: improve detection of GCC's -fvisibility= flag
Some builds of GCC produce output on both stdout and stderr when --help
--verbose is used.  The 2>&1 redirection caused them to be arbitrarily
interleaved with each other because of stream buffering.  Consequently,
grep failed to match the fvisibility= string in the mixed output, even
though the string was present in GCC's standard output.

This led to silently disabling symbol hiding in some builds of curl.
2016-06-21 12:58:24 +02:00
Irfan Adilovic
d9f3b365a3 configure: ac_cv_ -> curl_cv_ for write-only vars
These configure vars are modified in a curl-specific way but never
evaluated or loaded from cache, even though they are designated as
_cv_. We could either implement proper AC_CACHE_CHECKs for them, or
remove them completely.

Fixes #603 as ac_cv_func_gethostbyname is no longer clobbered, and
AC_CHECK_FUNC(gethostbyname...) will no longer spuriously succeed after
the first configure run with caching.

`ac_cv_func_strcasecmp` is curious, see #770.

`eval "ac_cv_func_$func=yes"` can still cause problems as it works in
tandem with AC_CHECK_FUNCS and then potentially modifies its result. It
would be best to rewrite this test to use a new CURL_CHECK_FUNCS macro,
which works the same as AC_CHECK_FUNCS but relies on caching the values
of curl_cv_func_* variables, without modifiying ac_cv_func_*.
2016-04-21 23:08:28 +02:00
Irfan Adilovic
4b639dbc74 configure: ac_cv_ -> curl_cv_ for r/w vars
These configure vars are modified in a curl-specific way and modified by
the configure process, but are never loaded from cache, even though they
are designated as _cv_. We should implement proper AC_CACHE_CHECKs for
them eventually.
2016-04-21 23:08:28 +02:00
Irfan Adilovic
14c8b45528 configure: ac_cv_ -> curl_cv_ for all cached vars
This was automated by:

sed -b -i -f <(ack -A1 AC_CACHE_CHECK | \
               ack -o 'ac_cv_.*?\b' | \
               sort -u | xargs -n1 bash -c \
                    'echo "s/$0/curl_cv_${0#ac_cv_}/g"') \
    $(git ls-files)

This only changed the prefix for 16 variables actually checked with
AC_CACHE_CHECK.
2016-04-21 23:08:28 +02:00
Dan Fandrich
093f9cd38d URLs: Change more haxx.se URLs from http: to https: 2016-02-03 01:45:21 +01:00
Daniel Stenberg
4af40b3646 URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00