History log of /curl/lib/Makefile.am (Results 1 – 25 of 255)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 60c3d044 06-Sep-2024 Viktor Szakats

autotools: add support for 'unity' builds, enable in CI

Implement the "unity" builds as known from CMake, but for autotools.
It's limited to `lib` and `src` (CMake also supports it in `t

autotools: add support for 'unity' builds, enable in CI

Implement the "unity" builds as known from CMake, but for autotools.
It's limited to `lib` and `src` (CMake also supports it in `tests`).

Enable with: `--enable-unity` (disabled by default)

Unity builds speed up builds significantly. Cygwin and Windows builds in
particular, but the effect is noticeable on most systems. It also allows
discovering unity issues with autotools, benefitting also CMake when
building the same combination. In CI it makes turnaround times quicker.

This closes build performance with CMake. autotools still lags behind
because it builds shared and static libcurl in two, separate passes.
CMake does it in one. Manpage compilation isn't batched, it is in CMake.
After unity and test bundle support the slowest parts of the build are
the configuration phase (which is effectively a tedious, non-parallel,
compilation and/or linking of 300+ tiny programs. The next bottleneck
is compiling individual examples and finally test servers (only slow
with autotools).

The autotools implementation is slightly less efficient than CMake,
because 3 sources are permanently excluded while in CMake this isn't
necessary and solved more efficiently while building libtests. There is
also no 'unity' support for tests, making them a less efficient also.

Enable it in CI for most `configure` jobs. Except in GHA/dist (though
it works fine there too), to use the default config there. Also skip for
the Linux AWC-LC job where it made builds time a few seconds longer
(reason undiscovered.)

Autotools test suite builds compared between master -> `--enable-unity`:
- GHA/Linux: 32s -> 12s
https://github.com/curl/curl/actions/runs/10705668823/job/29681617374
https://github.com/curl/curl/actions/runs/10742978889/job/29796766297
- GHA/macOS: 37s -> 10s
https://github.com/curl/curl/actions/runs/10705668813/job/29681632885
https://github.com/curl/curl/actions/runs/10742978699/job/29796768875
- GHA/FreeBSD: 15m25 -> 10m58 (full workflow time, ~qemu)
https://github.com/curl/curl/actions/runs/10705668811/job/29681607915
https://github.com/curl/curl/actions/runs/10742978937/job/29796766115
- GHA/Cygwin: 3m32 -> 1m21
https://github.com/curl/curl/actions/runs/10705668809/job/29681609965
https://github.com/curl/curl/actions/runs/10742978645/job/29796756933
- GHA/MSYS2: 2m42 -> 50s
https://github.com/curl/curl/actions/runs/10705668808/job/29681621166
https://github.com/curl/curl/actions/runs/10742978662/job/29799739289
- GHA/mingw-w64: 5m32 -> 1m23
https://github.com/curl/curl/actions/runs/10705668808/job/29681628787
https://github.com/curl/curl/actions/runs/10742978662/job/29799741568

Closes #14815

show more ...


# 0d6c8b75 09-Sep-2024 Daniel Stenberg

lib: enable strerror and strncpy checksrc warnings in subdirs

Closes #14834


# 0d1504b2 05-Sep-2024 Daniel Stenberg

libcurl.def: move from / into lib

It is meant for the library, it belongs in lib/

Closes #14796


# d222dbe7 09-Aug-2024 Viktor Szakats

build: tidy up internal macro names for `libcurl.pc`

Rename internal macros to match their `libcurl.pc` metadata counterpart.
Also apply these to the `curl-config.in` template.

build: tidy up internal macro names for `libcurl.pc`

Rename internal macros to match their `libcurl.pc` metadata counterpart.
Also apply these to the `curl-config.in` template.

- `CPPFLAG_CURL_STATICLIB` -> `LIBCURL_PC_CFLAGS`
- `LIBCURL_LIBS` -> `LIBCURL_PC_LIBS_PRIVATE`
- `LIBCURL_NO_SHARED` -> `LIBCURL_PC_LIBS`

Closes #14476

show more ...


# beb87118 08-Aug-2024 Viktor Szakats

dist: add missing `lib/optiontable.pl`

Closes #14467


# 59dc9f7e 20-May-2024 Viktor Szakats

build: untangle `CURLDEBUG` and `DEBUGBUILD` macros

`CURLDEBUG` is meant to enable memory tracking, but in a bunch of cases,
it was protecting debug features that were supposed to be gua

build: untangle `CURLDEBUG` and `DEBUGBUILD` macros

`CURLDEBUG` is meant to enable memory tracking, but in a bunch of cases,
it was protecting debug features that were supposed to be guarded with
`DEBUGBUILD`.

Replace these uses with `DEBUGBUILD`.

This leaves `CURLDEBUG` uses solely for its intended purpose: to enable
the memory tracking debug feature.

Also:
- autotools: rely on `DEBUGBUILD` to enable `checksrc`.
Instead of `CURLDEBUG`, which worked in most cases because debug
builds enable `CURLDEBUG` by default, but it's not accurate.
- include `lib/easyif.h` instead of keeping a copy of a declaration.
- add CI test jobs for the build issues discovered.

Ref: https://github.com/curl/curl/pull/13694#issuecomment-2120311894
Closes #13718

show more ...


# 9eafc115 08-Apr-2024 Daniel Stenberg

build: remove MacOSX-Framework script

I don't think this is much used these days.

Also remove the libcurl.plist file used (only) by this script

Closes #13313


# 444f64b3 13-Nov-2023 Viktor Szakats

autotools: avoid passing `LDFLAGS` twice to libcurl

autotools passes `LDFLAGS` automatically linker commands. curl's
`lib/Makefile.am` customizes libcurl linker flags. In that
custom

autotools: avoid passing `LDFLAGS` twice to libcurl

autotools passes `LDFLAGS` automatically linker commands. curl's
`lib/Makefile.am` customizes libcurl linker flags. In that
customization, it added `LDFLAGS` to the custom flags. This resulted in
passing `LDFLAGS` _twice_ to the `libtool` command.

Most of the time this is benign, but some `LDFLAGS` options can break
the build when passed twice. One such example is passing `.o` files,
e.g. `crt*.o` files necessary when customizing the C runtime, e.g. for
MUSL builds.

Passing them twice resulted in duplicate symbol errors:
```
libtool: link: clang-15 --target=aarch64-unknown-linux-musl [...] /usr/lib/aarch64-linux-musl/crt1.o [...] /usr/lib/aarch64-linux-musl/crt1.o [...]
ld.lld-15: error: duplicate symbol: _start
>>> defined at crt1.c
>>> /usr/lib/aarch64-linux-musl/crt1.o:(.text+0x0)
>>> defined at crt1.c
>>> /usr/lib/aarch64-linux-musl/crt1.o:(.text+0x0)
[...]
clang: error: linker command failed with exit code 1 (use -v to see invocation)
```

This behaviour came with commit 1a593191c2769a47b8c3e4d9715ec9f6dddf5e36
(2013-07-23) as a fix for bug https://curl.haxx.se/bug/view.cgi?id=1217.
The patch was a works-for-me hack that ended up merged in curl:
https://sourceforge.net/p/curl/bugs/1217/#06ef
With the root cause remaining unclear.

Perhaps the SUNPro 12 linker was sensitive to `-L` `-l` order, requiring
`-L` first? This would be unusual and suggests a bug in either the
linker or in `libtool`.

The curl build does pass the list of detected libs via its own
`LIBCURL_LIBS` variable, which ends up before `LDFLAGS` on the `libtool`
command line, but it's the job of `libtool` to ensure that even
a peculiar linker gets the options in the expected order. Also because
autotools passes `LDFLAGS` last, making it hardly possible to pass
anything after it.

Perhaps in the 10 years since this issue, this already got a fix
upstream.

This patch deletes `LDFLAGS` from our customized libcurl options,
leaving a single copy of them as passed by autotools automatically.

Reverts 1a593191c2769a47b8c3e4d9715ec9f6dddf5e36
Closes #12310

show more ...


# b365a34c 13-Nov-2023 Viktor Szakats

autotools: accept linker flags via `CURL_LDFLAGS_{LIB,BIN}`

To allow passing `LDFLAGS` specific to libcurl (`CURL_LDFLAGS_LIB`) and
curl tool (`CURL_LDFLAGS_BIN`).

This makes it

autotools: accept linker flags via `CURL_LDFLAGS_{LIB,BIN}`

To allow passing `LDFLAGS` specific to libcurl (`CURL_LDFLAGS_LIB`) and
curl tool (`CURL_LDFLAGS_BIN`).

This makes it possible to build libcurl and curl with a single
invocation with lib- and tool-specific custom linker flags.

Such flag can be enabling `.map` files, a `.def` file for libcurl DLL,
controlling static/shared, incl. requesting a static curl tool (with
`-static-libtool-libs`) while building both shared and static libcurl.

curl-for-win uses the above and some more.

These options are already supported in `Makefile.mk`. CMake has built-in
variables for this.

Closes #12312

show more ...


# 2bc1d775 02-Jan-2023 Daniel Stenberg

copyright: update all copyright lines and remove year ranges

- they are mostly pointless in all major jurisdictions
- many big corporations and projects already don't use them
- save

copyright: update all copyright lines and remove year ranges

- they are mostly pointless in all major jurisdictions
- many big corporations and projects already don't use them
- saves us from pointless churn
- git keeps history for us
- the year range is kept in COPYING

checksrc is updated to allow non-year using copyright statements

Closes #10205

show more ...


# 5de6848f 03-Dec-2022 Daniel Stenberg

cmake: set the soname on the shared library

Set SONAME and VERSION for platforms we think this works on. Remove
issue from KNOWN_BUGS.

Assisted-by: Jakub Zakrzewski

Clo

cmake: set the soname on the shared library

Set SONAME and VERSION for platforms we think this works on. Remove
issue from KNOWN_BUGS.

Assisted-by: Jakub Zakrzewski

Closes #10023

show more ...


# a8861b6c 22-Nov-2022 Viktor Szakats

Makefile.mk: portable Makefile.m32

Update bare GNU Make `Makefile.m32` to:

- Move objects into a subdirectory.
- Add support for MS-DOS. Tested with DJGPP.
- Add support for

Makefile.mk: portable Makefile.m32

Update bare GNU Make `Makefile.m32` to:

- Move objects into a subdirectory.
- Add support for MS-DOS. Tested with DJGPP.
- Add support for Watt-32 (on MS-DOS).
- Add support for AmigaOS.
- Rename `Makefile.m32` to `Makefile.mk`
- Replace `ARCH` with `TRIPLET`.
- Build `tool_hugehelp.c` proper (when tools are available).
- Drop MS-DOS compatibility macro `USE_ZLIB` (replaced by `HAVE_LIBZ`)
- Add support for `ZLIB_LIBS` to override `-lz`.
- Omit object files when building examples.
- Default `CC` to `gcc` once again, for convenience. (Caveat: compiler
name `cc` cannot be set now.)
- Set `-DCURL_NO_OLDIES` for examples, like autotools does.
- Delete `makefile.dj` files. Notice the configuration details and
defaults are not retained with the new method.
- Delete `makefile.amiga` files. A successful build needs a few custom
options. We're also not retaining all build details from the existing
Amiga make files.
- Rename `Makefile.m32` to `Makefile.mk` to reflect that they are not
Windows/MinGW32-specific anymore.
- Add support for new `CFG` options: `-map`, `-debug`, `-trackmem`
- Set `-DNDEBUG` by default.
- Allow using `-DOS=...` in all `lib/config-*.h` headers, syncing this
with `config-win32.h`.
- Look for zlib parts in `ZLIB_PATH/include` and `ZLIB_PATH/lib`
instead of bare `ZLIB_PATH`.

Note that existing build configurations for MS-DOS and AmigaOS likely
become incompatible with this change.

Example AmigaOS configuration:
```
export CROSSPREFIX=/opt/amiga/bin/m68k-amigaos-
export CC=gcc
export CPPFLAGS='-DHAVE_PROTO_BSDSOCKET_H'
export CFLAGS='-mcrt=clib2'
export LDFLAGS="${CFLAGS}"
export LIBS='-lnet -lm'
make -C lib -f Makefile.mk
make -C src -f Makefile.mk
```

Example MS-DOS configuration:
```
export CROSSPREFIX=/opt/djgpp/bin/i586-pc-msdosdjgpp-
export WATT_PATH=/opt/djgpp/net/watt
export ZLIB_PATH=/opt/djgpp
export OPENSSL_PATH=/opt/djgpp
export OPENSSL_LIBS='-lssl -lcrypt'
export CFG=-zlib-ssl
make -C lib -f Makefile.mk
make -C src -f Makefile.mk
```

Closes #9764

show more ...


# 3390ef0a 01-Nov-2022 Viktor Szakats

windows: fail early with a missing windres in autotools

`windres` is not always auto-detected by autotools when building for
Windows. When this happened, the build failed with a confusin

windows: fail early with a missing windres in autotools

`windres` is not always auto-detected by autotools when building for
Windows. When this happened, the build failed with a confusing error due
to the empty `RC` command:

```
/bin/bash ../libtool --tag=RC --mode=compile -I../include -DCURL_EMBED_MANIFEST -i curl.rc -o curl.o
[...]
Usage: /sandbox/curl/libtool [OPTION]... [MODE-ARG]...
Try 'libtool --help' for more information.
libtool: error: unrecognised option: '-I../include'
```

Improve this by verifying if `RC` is set, and fail with a clear error
otherwise.

Follow-up to 6de7322c03d5b4d91576a7d9fc893e03cc9d1057

Ref: https://curl.se/mail/lib-2022-10/0049.html
Reported-by: Thomas Glanzmann
Closes #9781

show more ...


# b7260c4f 27-Oct-2022 Viktor Szakats

windows: fix linking .rc to shared curl with autotools

`./configure --enable-shared --disable-static` fails when trying to link
a shared `curl.exe`, due to `libtool` magically changing t

windows: fix linking .rc to shared curl with autotools

`./configure --enable-shared --disable-static` fails when trying to link
a shared `curl.exe`, due to `libtool` magically changing the output
filename of `windres` to one that it doesn't find when linking:

```
/bin/sh ../libtool --tag=RC --mode=compile windres -I../../curl/include -DCURL_EMBED_MANIFEST -i ../../curl/src/curl.rc -o curl.o
libtool: compile: windres -I../../curl/include -DCURL_EMBED_MANIFEST -i ../../curl/src/curl.rc -o .libs/curl.o
[...]
CCLD curl.exe
clang: error: no such file or directory: 'curl.o'
```

Let's resolve this by skipping `libtool` and calling `windres` directly
when building `src` (aka `curl.exe`). Leave `lib` unchanged, as it does
need the `libtool` magic. This solution is compatible with building
a static `curl.exe`.

This build scenario is not CI-tested.

While here, delete an obsolete comment about a permanent `libtool`
warning that we've resolved earlier.

Regression from 6de7322c03d5b4d91576a7d9fc893e03cc9d1057

Reported-by: Christoph Reiter
Fixes #9803
Closes #9805

show more ...


# 6de7322c 18-Sep-2022 Viktor Szakats

windows: add .rc support to autotools builds

After this update autotools builds will compile and link `.rc` resources
to Windows executables. Bringing this feature on par with CMake and

windows: add .rc support to autotools builds

After this update autotools builds will compile and link `.rc` resources
to Windows executables. Bringing this feature on par with CMake and
Makefile.m32 builds. And also making it unnecessary to improvise these
steps manually, while monkey patching build files, e.g. [0].

You can customize the resource compiler via the `RC` envvar, and its
options via `RCFLAGS`.

This harmless warning may appear throughout the build, even though the
autotools manual documents [1] `RC` as a valid tag, and it fails when
omitting one:
`libtool: error: ignoring unknown tag RC`

[0] https://github.com/curl/curl-for-win/blob/535f19060d4b708f72e75dd849409ce50baa1b84/curl-autotools.sh#L376-L382
[1] https://www.gnu.org/software/libtool/manual/html_node/Tags.html

Closes #9521

show more ...


# ad9bc597 17-May-2022 max.mehl

copyright: make repository REUSE compliant

Add licensing and copyright information for all files in this repository. This
either happens in the file itself as a comment header or in the

copyright: make repository REUSE compliant

Add licensing and copyright information for all files in this repository. This
either happens in the file itself as a comment header or in the file
`.reuse/dep5`.

This commit also adds a Github workflow to check pull requests and adapts
copyright.pl to the changes.

Closes #8869

show more ...


# 8e22fc68 23-Mar-2022 Daniel Stenberg

scripts: move three scripts from lib/ to scripts/

Move checksrc.pl, firefox-db2pem.sh and mk-ca-bundle.pl since they don't
particularly belong in lib/

Also created an EXTRA_DIST

scripts: move three scripts from lib/ to scripts/

Move checksrc.pl, firefox-db2pem.sh and mk-ca-bundle.pl since they don't
particularly belong in lib/

Also created an EXTRA_DIST= in scripts/Makefile.am instead of specifying
those files in the root Makefile.am

Closes #8625

show more ...


# 2e1ef615 22-Mar-2022 Daniel Stenberg

test1135: sync with recent API updates

This test verifies that the order of functions in public headers remain
the same but hasn't been updated to care for recently added header
file

test1135: sync with recent API updates

This test verifies that the order of functions in public headers remain
the same but hasn't been updated to care for recently added header
files. The order is important for some few platforms - or VERSIONINFO
needs to updated.

This fix also updates VERSIONINFO to be sure.

Closes #8620

show more ...


# e87c53d7 09-Feb-2022 Jay Satiro

mk-ca-bundle.vbs: delete this script in favor of mk-ca-bundle.pl

mk-ca-bundle.vbs is a Windows-specific script for Mozilla certificate
extraction, similar to mk-ca-bundle.pl which runs o

mk-ca-bundle.vbs: delete this script in favor of mk-ca-bundle.pl

mk-ca-bundle.vbs is a Windows-specific script for Mozilla certificate
extraction, similar to mk-ca-bundle.pl which runs on any platform. The
vbs version has not been maintained while the perl version has been
maintained with improvements and security fixes. I don't think it's
worth the work to maintain both versions. Windows users should be able
to use mk-ca-bundle.pl without any problems, as long as they have perl.

Closes #8412

show more ...


# 93767237 08-Feb-2022 Daniel Stenberg

lib/Makefile: remove config-tpf.h from the dist

Follow-up from da15443dddea2bfb. Missed before because the 'distcheck'
CI job was not working as intended.

Reported-by: Marcel Ra

lib/Makefile: remove config-tpf.h from the dist

Follow-up from da15443dddea2bfb. Missed before because the 'distcheck'
CI job was not working as intended.

Reported-by: Marcel Raad
Bug: https://curl.se/mail/lib-2022-02/0070.html
Closes #8403

show more ...


# ff4bf6bf 07-Feb-2022 Daniel Stenberg

configure: remove support for "embedded ares"

In March 2010 (commit 4259d2df7dd) we removed the embedded 'ares'
directory from the curl source tree but we have since supported
especi

configure: remove support for "embedded ares"

In March 2010 (commit 4259d2df7dd) we removed the embedded 'ares'
directory from the curl source tree but we have since supported
especially detecting and using that build directory. The time has come
to remove that kludge and ask users to specify the c-ares dir correctly
with --enable-ares.

Closes #8397

show more ...


# 1bf3643f 31-Jan-2022 Daniel Stenberg

vxworks: drop support

No changes or fixes in vxworks related code since 2009 leads me to
believe that this doesn't work anymore.

Closes #8362


# 3b16575a 31-Jan-2022 Daniel Stenberg

netware: remove support

There are no current users and no Netware related changes done in the
code for over 13 years is a clear sign this is abandoned.

Closes #8358


# 4a461775 16-Sep-2021 Daniel Stenberg

dist: provide lib/.checksrc in the tarball

So that debug builds work (checksrc really)

Reported-by: Marcel Raad
Reported-by: tawmoto on github
Fixes #7733
Closes #7734


Revision tags: curl-7_76_1, curl-7_76_0, curl-7_75_0, curl-7_74_0
# 4d2f8006 04-Nov-2020 Daniel Stenberg

curl.se: new home

Closes #6172


1234567891011