autotools: simplify configuration in tests, examples

- GHA/windows: make a mingw autotools build static only.
- GHA/windows: fix a CI script issue with the build above.
- src: fix to pass `LIBCURL_PC_LIBS_PRIVATE` instead of `LINKFLAGS`.
  This makes the libs propagate to tunits, making the local hack there
  unnecessary. `LINKFLAGS` had this single use in the repo, and it was
  empty in local tests.
- tests: drop passing redundant `LIBCURL_PC_LDFLAGS_PRIVATE`.
- tests: drop redundant target name from config variables.
- examples, tests/client: drop `LIBDIR` temp variables with single uses.
- examples, tests: formatting to sync `Makefile.am` scripts with each
  other.

Closes #17661
This commit is contained in:
Viktor Szakats 2025-06-18 10:33:15 +02:00
parent af309fb17b
commit ea782134e5
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
8 changed files with 19 additions and 39 deletions

View file

@ -36,23 +36,20 @@ EXTRA_DIST = README.md Makefile.example CMakeLists.txt \
AM_CPPFLAGS = -I$(top_srcdir)/include
LIBDIR = $(top_builddir)/lib
# Avoid libcurl obsolete stuff
AM_CPPFLAGS += -DCURL_NO_OLDIES
if USE_CPPFLAG_CURL_STATICLIB
AM_CPPFLAGS += -DCURL_STATICLIB
endif
if DOING_NATIVE_WINDOWS
AM_CPPFLAGS += -DWIN32_LEAN_AND_MEAN
endif
# Avoid libcurl obsolete stuff
AM_CPPFLAGS += -DCURL_NO_OLDIES
# Prevent LIBS from being used for all link targets
LIBS = $(BLANK_AT_MAKETIME)
# Dependencies
LDADD = $(LIBDIR)/libcurl.la @LIBCURL_PC_LIBS_PRIVATE@
LDADD = $(top_builddir)/lib/libcurl.la
# This might hold -Werror
CFLAGS += @CURL_CFLAG_EXTRAS@