Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
f0b649d
tests/NIT/Makefile.am: check-NIT-devel: minimize nut_version.h regene…
jimklimov May 19, 2026
edb53d6
clients/upsstats.c: ups_connect(): avoid potential NULL dereference i…
jimklimov May 20, 2026
664ca60
tests/NIT/nit.sh: check_NIT_certs_NSS(): fix the check for *.txt and …
jimklimov May 25, 2026
96267b8
configure.ac: if developer enables configure debug, only wipe DOCTEST…
jimklimov May 26, 2026
dd682c4
docs/config-prereqs.txt, docs/nut.dict: revise with FreeBSD 15 lesson…
jimklimov May 26, 2026
108ef7d
configure.ac: `unset CCACHE_DIR` if provided but empty
jimklimov May 27, 2026
2af7241
configure.ac: report the tested compiler location just before AC_PROG…
jimklimov May 27, 2026
b7d64eb
.github/pull_request_template.md: update with a section on Unicode ch…
jimklimov May 27, 2026
e87fe12
configure.ac, Makefile.am, docs/Makefile.am, tools/check-source-nonas…
jimklimov May 27, 2026
6235c3f
docs/developers.txt: add a chapter on ASCII vs Unicode
jimklimov May 27, 2026
eb5909f
drivers/libwinhid.h: replace Unicode long dashes with acsii `--` and …
jimklimov May 27, 2026
83e124f
docs/documentation.txt, docs/man/nut.txt: replace Unicode long dashes…
jimklimov May 27, 2026
a251317
drivers/socomec_jbus.c: clean up trailing whitespace
jimklimov May 27, 2026
e32fb3f
drivers/*.c: replace Unicode in comments with ASCII equivalents
jimklimov May 27, 2026
d3f8a5e
ci_build.sh: propose shell vs perl (faster?) implementations of norma…
jimklimov May 27, 2026
a403b3e
ci_build.sh: configure_nut(): report the PATH value ultimately used (…
jimklimov May 27, 2026
3a47134
ci_build.sh: normalize_path() before reporting it at start of actual …
jimklimov May 27, 2026
291d6c2
ci_build.sh: fix normalize_path_perl() syntax for hash length; avoid …
jimklimov May 28, 2026
b6112c8
tools/check-source-nonascii.pl: fix syntax for hash length
jimklimov May 28, 2026
612c701
configure.ac: ignore recent clang warning about unused-command-line-a…
jimklimov May 31, 2026
3b08899
Jenkinsfile-dynamatrix: introduce dynacfgPipeline.notifyHandlerAlert …
jimklimov Jun 1, 2026
fc89ff2
Jenkinsfile-dynamatrix: use new countStagesPerNode feature from the l…
jimklimov Jun 1, 2026
5d70d9f
docs/config-prereqs.txt: document JDK21+ as the requirement for NUT C…
jimklimov May 27, 2026
89c0ea2
configure.ac: pass -Wno-unused-command-line-argument also to CLANG LD…
jimklimov Jun 3, 2026
7c3b994
NEWS.adoc: update for FreeBSD and Jenkins bumps
jimklimov Jun 3, 2026
77decfc
configure.ac: revise LIBSSL_LIBS vs "-pthread" option (from NSS occas…
jimklimov Jun 5, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@
quality and content of the change, and is presumed to have the right to
post that code to be published further under the project's license terms.

- [ ] Especially with involvement of AI, including modern IDE coding aid,
please be sure to revise that proposed code and documentation changes
follow NUT code style guide -- this helps portability across the decades
worth of supported systems. Notably, avoid Unicode characters where ASCII
text is expected (C sources and headers, manual pages and other `acsiidoc`
inputs). Particularly AI is keen on adding `mdash` characters instead of
plain ASCII double-dash (which renders into the long dash where applicable).

- [ ] Please star NUT on GitHub, this helps with sponsorships! ;)

## Frequent "underwater rocks" for driver addition/update PRs
Expand Down
42 changes: 39 additions & 3 deletions Jenkinsfile-dynamatrix
Original file line number Diff line number Diff line change
Expand Up @@ -1355,10 +1355,46 @@ set | sort -n """
summary = dynamatrix.toStringStageCountDump()
} catch (Throwable t) {}

try {
// TRY: Implementation below requires https://plugins.jenkins.io/ircbot (+ setup)
if (summary == null || summary == "") {
ircNotify (notificationStrategy:'FAILURE_AND_FIXED')
} else {
ircNotify (notificationStrategy:'FAILURE_AND_FIXED', customMessage: summary)
}
} catch (Throwable t) {
echo "Failed to ircNotify() a notification: ${t}"
}
}

dynacfgPipeline.notifyHandlerAlert = { String msg ->
def summary = null
try {
summary = dynamatrix.toStringStageCountDump()
summary += "\n\n" + dynamatrix.toStringStageCountPerNodeDump()
} catch (Throwable t) {}

if (summary == null || summary == "") {
ircNotify (notificationStrategy:'FAILURE_AND_FIXED')
summary = "Got some alert about Jenkins-Dynamatrix run ${BUILD_URL}"
} else {
ircNotify (notificationStrategy:'FAILURE_AND_FIXED', customMessage: summary)
summary = "Got an alert about Jenkins-Dynamatrix run ${BUILD_URL} : ${summary}"
}
if (msg != null && msg != "") {
summary += "\n\n${msg}"
}

try {
// TRY: Implementation below requires https://plugins.jenkins.io/email-ext

// NOTE: If someone adapts this pipeline to their repository,
// be sure to change these settings (currently NUT-specific):
emailext (attachLog: false,
to: "nutci-alerts@networkupstools.org",
subject: "Alert from NUT CI farm job ${JOB_NAME} build ${BUILD_ID}",
body: summary
)
} catch (Throwable t) {
echo "Failed to emailext() a notification: ${t}"
}
}

Expand All @@ -1383,7 +1419,7 @@ def stageNameFunc_ShellcheckCustom(DynamatrixSingleBuildConfig dsbc) {
if ( env?.BRANCH_NAME ==~ /.*verbose.*/ )
{
dynamatrixGlobalState.enableDebugTrace = true
//dynamatrixGlobalState.enableDebugTraceResolver = true
//dynamatrixGlobalState.enableDebugTraceResolver = true
dynamatrixGlobalState.enableDebugErrors = true
dynamatrixGlobalState.enableDebugMilestones = true
dynamatrixGlobalState.enableDebugMilestonesDetails = true
Expand Down
17 changes: 17 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -1776,11 +1776,28 @@ git-realclean-check:
# separately from the probably slower/louder stages for test programs like
# check-NIT:
CHECK_FILES_QUICK_TARGETS = check-man

if WITH_SPELLCHECK
CHECK_FILES_QUICK_TARGETS += spellcheck-quick
endif WITH_SPELLCHECK

if HAVE_PERL
CHECK_FILES_QUICK_TARGETS += check-source-nonascii
endif HAVE_PERL

check-files-quick: $(CHECK_FILES_QUICK_TARGETS)

# Style check of sorts, except that some older systems may refuse to handle
# source files with wide/multi-byte characters (have yet to see complaints
# about single-byte non-ASCII). So far not listing C++ here as its tools are
# more modern (we mostly care about C++11 and newer).
check-source-nonascii:
@echo " CHECK-SOURCE-NONASCII **/*.c **/*.h"
@ @PERL@ $(top_srcdir)/tools/check-source-nonascii.pl $(top_srcdir)/*/*.c $(top_srcdir)/*/*.h $(top_srcdir)/*/*/*.c $(top_srcdir)/*/*/*.h

# TBD: clang-format, etc?
stylecheck: check-source-nonascii

# Autotools hook: run the quick checks before recursing for defaults:
check-recursive: check-files-quick

Expand Down
4 changes: 4 additions & 0 deletions NEWS.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,10 @@ https://github.com/networkupstools/nut/milestone/13
names not exposed with dynamic linking metadata (e.g. some Mozilla NSS
dependencies were not previously discovered and bundled). [issue #3420,
PRs #3429, #3432]
* Updated a NUT CI farm worker to FreeBSD 15 and updated the recipes and
documentation according to problems that were found along the way. [#3453]
* Jenkins used as the NUT CI farm core has bumped JDK requirements for its
controllers and build agents, `docs/config-prereqs.txt` revised.


Release notes for NUT 2.8.5 - what's new since 2.8.4
Expand Down
22 changes: 21 additions & 1 deletion ci_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,11 @@ fi
[ -n "$MAKE_FLAGS_VERBOSE" ] || MAKE_FLAGS_VERBOSE="VERBOSE=1 V=1 -s"
[ -n "$MAKE_FLAGS_CLEAN" ] || MAKE_FLAGS_CLEAN="${MAKE_FLAGS_QUIET}"

normalize_path() {
normalize_path_perl() {
perl -e 'my %PATH; while (<>) { foreach my $D (split(/[:\r\n]/, $_)) { if (length($D) > 0 && !defined($PATH{$D})) { $PATH{$D} = scalar keys %PATH; } } } ; my $joined = join ":", sort { $PATH{$a} <=> $PATH{$b} } keys %PATH; print "$joined";'
}

normalize_path_shell() {
# STDIN->STDOUT: strip duplicate "/" and extra ":" if present,
# leave first copy of duplicates in (preferred) place
sed -e 's,:::*,:,g' -e 's,^:*,,' -e 's,:*$,,' -e 's,///*,/,g' \
Expand All @@ -237,6 +241,19 @@ normalize_path() {
)
}

HAVE_PERL=false
if perl -e 1 2>/dev/null; then
HAVE_PERL=true
fi

normalize_path() {
if $HAVE_PERL ; then
normalize_path_perl "$@"
else
normalize_path_shell "$@"
fi
}

propose_CI_CCACHE_SYMLINKDIR() {
# This is where many symlinks like "gcc -> ../bin/ccache" reside:
echo \
Expand Down Expand Up @@ -1282,6 +1299,7 @@ configure_nut() {
while : ; do # Note the CI_SHELL_IS_FLAKY=true support below
echo "=== CONFIGURING NUT: $CONFIGURE_SCRIPT ${CONFIG_OPTS_STR}"
echo "=== CC='$CC' CXX='$CXX' CPP='$CPP'"
echo "=== PATH='$PATH'"

[ -z "${CI_SHELL_IS_FLAKY-}" ] || echo "=== CI_SHELL_IS_FLAKY='$CI_SHELL_IS_FLAKY'"
if [ x"${DO_USE_AUTOCONF_CACHE}" = xyes ] && [ -n "${CI_CACHE_NUT_HASHDIR_CFG_OPT}" ] && [ -s "${CI_CACHE_NUT_HASHDIR_CFG}/config.cache" ] ; then
Expand Down Expand Up @@ -1773,6 +1791,8 @@ export DO_CLEAN_AUTOCONF_CACHE_BEFORE

echo "Processing BUILD_TYPE='${BUILD_TYPE}' ..."

PATH="`echo \"${PATH}\" | normalize_path`"

ensure_CI_CCACHE_SYMLINKDIR_envvar
echo "Build host settings:"
set | ${EGREP} '^(PATH|[^ ]*CCACHE[^ ]*|CI_[^ ]*|OS_[^ ]*|CANBUILD_[^ ]*|NODE_LABELS|MAKE|C[^ ]*FLAGS|LDFLAGS|ARCH[^ ]*|BITS[^ ]*|CC|CXX|CPP|DO_[^ ]*|BUILD_[^ ]*|[^ ]*_TGT|INPLACE_RUNTIME)=' | sed 's,\(.\)$,\1 \\,' || true
Expand Down
2 changes: 1 addition & 1 deletion clients/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ if HAVE_WINDOWS
libnutclient_la_LDFLAGS += -no-undefined
endif HAVE_WINDOWS
if WITH_SSL_CXX
libnutclient_la_LIBADD += $(LIBSSL_LDFLAGS_RPATH) $(LIBSSL_LIBS)
libnutclient_la_LIBADD += $(LIBSSL_LDFLAGS_RPATH) $(LIBSSL_LIBS_CXX)
endif WITH_SSL_CXX
else !HAVE_CXX11
EXTRA_DIST += nutclient.h nutclient.cpp
Expand Down
7 changes: 5 additions & 2 deletions clients/upsstats.c
Original file line number Diff line number Diff line change
Expand Up @@ -536,10 +536,13 @@ static void ups_connect(void)
}

if (currups && upscli_connect(&ups, hostname, port, UPSCLI_CONN_TRYSSL) < 0)
fprintf(stderr, "UPS [%s]: can't connect to server: %s\n", currups->sys, upscli_strerror(&ups));
fprintf(stderr, "UPS [%s]: can't connect to server: %s\n",
currups ? NUT_STRARG(currups->sys) : "<currups=null>",
upscli_strerror(&ups));

lastups = currups;
upsdebug_call_finished2(": pick first device on newly connected data server [%s]", NUT_STRARG(currups->sys));
upsdebug_call_finished2(": pick first device on newly connected data server [%s]",
currups ? NUT_STRARG(currups->sys) : "<currups=null>");
}

static void do_hostlink(void)
Expand Down
84 changes: 77 additions & 7 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,19 @@ AC_MSG_RESULT([${CONFIG_FLAGS}])
AC_DEFINE_UNQUOTED([CONFIG_FLAGS],["${CONFIG_FLAGS}"],[Flags passed to configure script])
AC_SUBST(CONFIG_FLAGS)

dnl Some versions of ccache take poorly to an exported empty CCACHE_DIR etc.
dnl ccache: error: CCACHE_DIR must not be the empty string
dnl and this breaks "checking for C compiler version" in a standard step below
AS_IF([set | ${EGREP} '^CCACHE_DIR(=|=""|='"''"')$'], [
AC_MSG_NOTICE([Unsetting a provided but empty CCACHE_DIR environment variable])
AS_UNSET([CCACHE_DIR])
])

AS_IF([set | ${EGREP} '^CCACHE_PATH(=|=""|='"''"')$'], [
AC_MSG_NOTICE([Resetting a provided but empty CCACHE_PATH environment variable to current PATH])
CCACHE_PATH="${PATH}"
])

AC_CHECK_PROGS([MKTEMP], [mktemp], [])
AS_IF([test x"${MKTEMP}" = x], [
dnl # Have a simple (unsafe, unfeatured) fallback implementation:
Expand Down Expand Up @@ -260,7 +273,14 @@ dnl But OpenBSD 6.5 requires autoconf-2.65 and automake-1.13 or newer...
AS_IF([test x"${nut_enable_configure_debug}" = xyes], [
AC_MSG_NOTICE([(CONFIGURE-DEVEL-DEBUG) CFLAGS_BEFORE_ACPROG="${CFLAGS-}"])
AC_MSG_NOTICE([(CONFIGURE-DEVEL-DEBUG) CXXFLAGS_BEFORE_ACPROG="${CXXFLAGS-}"])
dnl Find and report the location of attempted compiler
dnl (maybe wrapped with something like ccache, distcc, etc.)
AC_MSG_NOTICE([(CONFIGURE-DEVEL-DEBUG) PATH='${PATH}'])
AC_MSG_NOTICE([(CONFIGURE-DEVEL-DEBUG) CCACHE_PATH='${CCACHE_PATH}'])
AC_MSG_NOTICE([(CONFIGURE-DEVEL-DEBUG) Compiler location: CC: '${CC}' => '`command -v ${CC}`'])
AC_MSG_NOTICE([(CONFIGURE-DEVEL-DEBUG) Compiler location: CXX: '${CXX}' => '`command -v ${CXX}`'])
])

AC_MSG_CHECKING(for autoconf macro to enable system extensions)
m4_version_prereq(2.61, [
AC_MSG_RESULT(yes)
Expand All @@ -278,6 +298,9 @@ dnl Macro AC_PROG_CC_C99 is obsolete; use AC_PROG_CC
dnl Note that NUT does not support building with C89 anyway
dnl AC_PROG_CC_C99
dnl Needed for per-target flags
dnl NOTE: The AM macro below wraps its AC name-sake to perform
dnl additional tricks needed for automake. There seems to not be
dnl a CXX variant of that however, or at least not ubiquitoisly.
AM_PROG_CC_C_O
AC_PROG_CPP
AC_PROG_CXX
Expand Down Expand Up @@ -2297,6 +2320,22 @@ printf("%ld ", GetAdaptersInfo(buf, &bufsz))
AC_SUBST([NETLIBS_GETADDRS])
AC_CACHE_VAL([nut_cv_var_NETLIBS_GETADDRS], [nut_cv_var_NETLIBS_GETADDRS="${NETLIBS_GETADDRS}"])

dnl ----------------------------------------------------------------------
dnl Simple check that it exists and can be executed
AC_PATH_PROGS([PERL], perl, [none])
AS_IF([test x"${PERL}" != xnone], [
AC_MSG_CHECKING([whether PERL interpreter is basically usable: '${PERL}'])
AS_IF([${PERL} -e 1 >/dev/null], [
AC_MSG_RESULT([yes])
], [
AC_MSG_RESULT([no])
PERL=none
])
])

AC_SUBST([PERL])
AM_CONDITIONAL([HAVE_PERL], [test x"$PERL" != xnone])

dnl ----------------------------------------------------------------------
dnl First remember if caller wants a custom Python package location?
NUT_ARG_WITH([python-modules-dir], [install the PyNUT module files under specified path for default Python interpreter (auto for its reported site-packages location, if not with UI app)], [auto])
Expand Down Expand Up @@ -4263,14 +4302,18 @@ dnl not fail if we have no tools to generate it (so add to SKIP list).

esac
done
rm -rf "${DOCTESTDIR}"

AS_IF([test x"${nut_enable_configure_debug}" = xyes], [
AC_MSG_NOTICE([(CONFIGURE-DEVEL-DEBUG) DOC_BUILD_LIST: '${DOC_BUILD_LIST}'])
AC_MSG_NOTICE([(CONFIGURE-DEVEL-DEBUG) DOC_CANNOTBUILD_LIST: '${DOC_CANNOTBUILD_LIST}'])
AC_MSG_NOTICE([(CONFIGURE-DEVEL-DEBUG) DOC_SKIPBUILD_LIST: '${DOC_SKIPBUILD_LIST}'])
AC_MSG_NOTICE([(CONFIGURE-DEVEL-DEBUG) DOC_INSTALL_DISTED_MANS: '${DOC_INSTALL_DISTED_MANS}'])
AC_MSG_NOTICE([(CONFIGURE-DEVEL-DEBUG) DOC_INSTALL_SELECTED_MANS: '${DOC_INSTALL_SELECTED_MANS}'])
AC_MSG_NOTICE([(CONFIGURE-DEVEL-DEBUG) This script's DOCTESTDIR: '${DOCTESTDIR}'])
],[
dnl If we are debugging, and doc generation fails, we want the directory
dnl else remove it later (after confirming success) below
rm -rf "${DOCTESTDIR}"
])

case "${nut_with_doc}" in
Expand Down Expand Up @@ -4315,6 +4358,11 @@ AM_CONDITIONAL(WITH_PDF_NONASCII_TITLES, [test x"$can_build_doc_pdf_nonascii_tit
NUT_REPORT_FEATURE([would build specific documentation format(s)], [${nut_with_doc}], [${DOC_BUILD_LIST} ${DOC_INSTALL_SELECTED_MANS}],
[WITH_DOCS], [Define to enable overall documentation generation], [-])

AS_IF([test x"${nut_enable_configure_debug}" = xyes], [
dnl Delayed clean-up after success of desired doc types:
rm -rf "${DOCTESTDIR}"
])

# To cater for less portable make's, precalculate the target list
# for "make check" in "docs/" here...
DOC_CHECK_LIST=""
Expand Down Expand Up @@ -6627,18 +6675,24 @@ dnl # -Wno-c11-extensions -- clang-21 on Ubuntu 26.04 at least complains a lot
dnl # about system headers (string.h, cdefs.h, etc.) using __glibc_const_generic
dnl # -Wno-used-but-marked-unused -- openssl and clang do not always agree...
dnl # -Wno-thread-safety-negative -- clang bug, it seems (https://reviews.llvm.org/D84604)
dnl # -Wno-unused-command-line-argument -- avoid the likes of (clang++)
dnl # error: argument unused during compilation: '-pthread'
dnl # (apparently in FreeBSD 15 builds something gets into the wrong *FLAGS,
dnl # maybe via pkg-config... or it was just the first one to notice and yell)
AS_CASE(["${nut_enable_warnings}"],
[all], [
CFLAGS="${CFLAGS} -Wall"
CXXFLAGS="${CXXFLAGS} -Wall"
],
[clang-hard], [
CFLAGS="${CFLAGS} -ferror-limit=0 -Wno-system-headers -Wno-missing-include-dirs -Wall -Wextra -Weverything -Wno-disabled-macro-expansion -Wno-unused-macros -Wno-reserved-id-macro -Wno-padded -Wno-documentation -fcomment-block-commands=retval -Wno-documentation-unknown-command -Wno-cast-qual -Wno-c11-extensions -pedantic -Wno-fuse-ld-path -Wno-unsafe-buffer-usage -Wno-thread-safety-negative"
CXXFLAGS="${CXXFLAGS} -ferror-limit=0 -Wno-system-headers -Wno-missing-include-dirs -Wall -Wextra -Weverything -Wno-disabled-macro-expansion -Wno-unused-macros -Wno-reserved-id-macro -Wno-padded -Wno-documentation -fcomment-block-commands=retval -Wno-documentation-unknown-command -Wno-cast-qual -Wno-c++98-compat-pedantic -Wno-c++98-compat -Wno-exit-time-destructors -Wno-fuse-ld-path -Wno-unsafe-buffer-usage -Wno-thread-safety-negative"
CFLAGS="${CFLAGS} -ferror-limit=0 -Wno-system-headers -Wno-missing-include-dirs -Wall -Wextra -Weverything -Wno-disabled-macro-expansion -Wno-unused-macros -Wno-reserved-id-macro -Wno-padded -Wno-documentation -fcomment-block-commands=retval -Wno-documentation-unknown-command -Wno-cast-qual -Wno-c11-extensions -pedantic -Wno-fuse-ld-path -Wno-unsafe-buffer-usage -Wno-thread-safety-negative -Wno-unused-command-line-argument"
CXXFLAGS="${CXXFLAGS} -ferror-limit=0 -Wno-system-headers -Wno-missing-include-dirs -Wall -Wextra -Weverything -Wno-disabled-macro-expansion -Wno-unused-macros -Wno-reserved-id-macro -Wno-padded -Wno-documentation -fcomment-block-commands=retval -Wno-documentation-unknown-command -Wno-cast-qual -Wno-c++98-compat-pedantic -Wno-c++98-compat -Wno-exit-time-destructors -Wno-fuse-ld-path -Wno-unsafe-buffer-usage -Wno-thread-safety-negative -Wno-unused-command-line-argument"
LDFLAGS="${LDFLAGS} -Wno-unused-command-line-argument"
],
[clang-medium], [
CFLAGS="${CFLAGS} -ferror-limit=0 -Wno-system-headers -Wno-missing-include-dirs -Wall -Wextra -Weverything -Wno-disabled-macro-expansion -Wno-unused-macros -Wno-reserved-id-macro -Wno-padded -Wno-documentation -fcomment-block-commands=retval -Wno-documentation-unknown-command -Wno-cast-qual -Wno-c11-extensions -pedantic -Wno-fuse-ld-path -Wno-unsafe-buffer-usage -Wno-float-conversion -Wno-double-promotion -Wno-implicit-float-conversion -Wno-conversion -Wno-incompatible-pointer-types-discards-qualifiers -Wno-incompatible-function-pointer-types-strict -Wno-nullable-to-nonnull-conversion -Wno-used-but-marked-unused -Wno-thread-safety-negative"
CXXFLAGS="${CXXFLAGS} -ferror-limit=0 -Wno-system-headers -Wno-missing-include-dirs -Wall -Wextra -Weverything -Wno-disabled-macro-expansion -Wno-unused-macros -Wno-reserved-id-macro -Wno-padded -Wno-documentation -fcomment-block-commands=retval -Wno-documentation-unknown-command -Wno-cast-qual -Wno-c++98-compat-pedantic -Wno-c++98-compat -Wno-exit-time-destructors -Wno-global-constructors -Wno-fuse-ld-path -Wno-unsafe-buffer-usage -Wno-nullable-to-nonnull-conversion -Wno-used-but-marked-unused -Wno-thread-safety-negative"
CFLAGS="${CFLAGS} -ferror-limit=0 -Wno-system-headers -Wno-missing-include-dirs -Wall -Wextra -Weverything -Wno-disabled-macro-expansion -Wno-unused-macros -Wno-reserved-id-macro -Wno-padded -Wno-documentation -fcomment-block-commands=retval -Wno-documentation-unknown-command -Wno-cast-qual -Wno-c11-extensions -pedantic -Wno-fuse-ld-path -Wno-unsafe-buffer-usage -Wno-float-conversion -Wno-double-promotion -Wno-implicit-float-conversion -Wno-conversion -Wno-incompatible-pointer-types-discards-qualifiers -Wno-incompatible-function-pointer-types-strict -Wno-nullable-to-nonnull-conversion -Wno-used-but-marked-unused -Wno-thread-safety-negative -Wno-unused-command-line-argument"
CXXFLAGS="${CXXFLAGS} -ferror-limit=0 -Wno-system-headers -Wno-missing-include-dirs -Wall -Wextra -Weverything -Wno-disabled-macro-expansion -Wno-unused-macros -Wno-reserved-id-macro -Wno-padded -Wno-documentation -fcomment-block-commands=retval -Wno-documentation-unknown-command -Wno-cast-qual -Wno-c++98-compat-pedantic -Wno-c++98-compat -Wno-exit-time-destructors -Wno-global-constructors -Wno-fuse-ld-path -Wno-unsafe-buffer-usage -Wno-nullable-to-nonnull-conversion -Wno-used-but-marked-unused -Wno-thread-safety-negative -Wno-unused-command-line-argument"
LDFLAGS="${LDFLAGS} -Wno-unused-command-line-argument"
],
[clang-minimal], [
CFLAGS="${CFLAGS} -ferror-limit=0 -Wall -Wextra -Wno-documentation -Wno-documentation-unknown-command -fcomment-block-commands=retval"
Expand Down Expand Up @@ -7028,8 +7082,9 @@ AC_ARG_VAR(CCACHE_DIR)
AC_ARG_VAR(CCACHE_PATH)

dnl Some versions of ccache take poorly to an exported empty CCACHE_DIR etc.
dnl Avoid exporting them if not set at the configure time (assuming ci_build.sh
dnl integration or user's shell profile sets them persistently)
dnl ccache: error: CCACHE_DIR must not be the empty string
dnl Avoid exporting them if NOT set at the configure time (assuming ci_build.sh
dnl integration or user's shell profile sets them persistently... or empty)
AS_IF([test x"${CCACHE_NAMESPACE-}" = x], [NUT_AM_EXPORT_CCACHE_NAMESPACE="#"], [NUT_AM_EXPORT_CCACHE_NAMESPACE=""])
AC_SUBST(NUT_AM_EXPORT_CCACHE_NAMESPACE)
AS_IF([test x"${CCACHE_BASEDIR-}" = x], [NUT_AM_EXPORT_CCACHE_BASEDIR="#"], [NUT_AM_EXPORT_CCACHE_BASEDIR=""])
Expand Down Expand Up @@ -7268,6 +7323,21 @@ AC_SUBST(LIBSSL_CXXFLAGS)
NUT_REPORT_FEATURE([enable SSL support in C++ client library], [${nut_with_ssl_cxx}], [${nut_ssl_lib}],
[WITH_SSL_CXX], [Define to enable SSL in libnutclient])

dnl At least FreeBSD clang complains about NSS builds with
dnl error: argument unused during compilation: '-pthread'
dnl which pops up in LDFLAGS/LIBS and is kept as "compiler"
dnl flag when calling the linker.
dnl Does not hurt plain C builds though.
LIBSSL_LIBS_CXX="${LIBSSL_LIBS}"
AS_IF([test "$nut_with_ssl_cxx" = "yes"],
[AS_CASE([$LIBSSL_LIBS_CXX],
[*" -pthread "*|"-pthread "*|*" -pthread"|-pthread], [
AC_MSG_NOTICE([Remove -pthread from LIBSSL_LIBS for C++ builds])
LIBSSL_LIBS_CXX="`echo \"${LIBSSL_LIBS}\" | sed 's, *-pthread *, ,'`"
])
])
AC_SUBST(LIBSSL_LIBS_CXX)

AC_DEFINE_UNQUOTED([EXEEXT], ["${EXEEXT}"], [Platform-specific extension for binary program files (may be empty where not required)])
AC_SUBST(EXEEXT)

Expand Down
Loading
Loading