From: Daiki Ueno Date: Tue, 30 Jul 2024 00:19:28 +0000 (+0900) Subject: build: set CFLAGS as necessary X-Git-Tag: 3.8.7~8^2~4 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b80770d9998cde7561237d4bebd227fe2687d649;p=thirdparty%2Fgnutls.git build: set CFLAGS as necessary When header files of optional libraries are installed on a non-default locations, e.g., with homebrew, CFLAGS must be set so the compiler can find them at build time for the definition of data types and macros. Signed-off-by: Daiki Ueno --- diff --git a/lib/Makefile.am b/lib/Makefile.am index 0e89fdf184..b25ecab89d 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -92,9 +92,10 @@ COBJECTS = range.c record.c compress.c debug.c cipher.c gthreads.h handshake-tls if HAVE_ZLIB COBJECTS += dlwrap/zlib.c dlwrap/zlibfuncs.h dlwrap/zlib.h +AM_CPPFLAGS += $(ZLIB_CFLAGS) if ENABLE_DLOPEN -AM_CPPFLAGS += $(ZLIB_CFLAGS) -DGNUTLS_ZLIB_ENABLE_DLOPEN=1 +AM_CPPFLAGS += -DGNUTLS_ZLIB_ENABLE_DLOPEN=1 else thirdparty_libadd += $(ZLIB_LIBS) endif @@ -102,9 +103,10 @@ endif if HAVE_LIBZSTD COBJECTS += dlwrap/zstd.c dlwrap/zstdfuncs.h dlwrap/zstd.h +AM_CPPFLAGS += $(LIBZSTD_CFLAGS) if ENABLE_DLOPEN -AM_CPPFLAGS += $(LIBZSTD_CFLAGS) -DGNUTLS_ZSTD_ENABLE_DLOPEN=1 +AM_CPPFLAGS += -DGNUTLS_ZSTD_ENABLE_DLOPEN=1 else thirdparty_libadd += $(LIBZSTD_LIBS) endif @@ -113,10 +115,12 @@ endif if HAVE_LIBBROTLI COBJECTS += dlwrap/brotlienc.c dlwrap/brotliencfuncs.h dlwrap/brotlienc.h COBJECTS += dlwrap/brotlidec.c dlwrap/brotlidecfuncs.h dlwrap/brotlidec.h +AM_CPPFLAGS += $(LIBBROTLIENC_CFLAGS) +AM_CPPFLAGS += $(LIBBROTLIDEC_CFLAGS) if ENABLE_DLOPEN -AM_CPPFLAGS += $(LIBBROTLIENC_CFLAGS) -DGNUTLS_BROTLIENC_ENABLE_DLOPEN=1 -AM_CPPFLAGS += $(LIBBROTLIDEC_CFLAGS) -DGNUTLS_BROTLIDEC_ENABLE_DLOPEN=1 +AM_CPPFLAGS += -DGNUTLS_BROTLIENC_ENABLE_DLOPEN=1 +AM_CPPFLAGS += -DGNUTLS_BROTLIDEC_ENABLE_DLOPEN=1 else thirdparty_libadd += $(LIBBROTLIENC_LIBS) thirdparty_libadd += $(LIBBROTLIDEC_LIBS) @@ -125,9 +129,10 @@ endif if ENABLE_LIBOQS COBJECTS += dlwrap/oqs.c dlwrap/oqsfuncs.h dlwrap/oqs.h +AM_CPPFLAGS += $(LIBOQS_CFLAGS) if ENABLE_DLOPEN -AM_CPPFLAGS += $(LIBOQS_CFLAGS) -DGNUTLS_OQS_ENABLE_DLOPEN=1 +AM_CPPFLAGS += -DGNUTLS_OQS_ENABLE_DLOPEN=1 else thirdparty_libadd += $(LIBOQS_LIBS) endif diff --git a/src/Makefile.am b/src/Makefile.am index 6e58ead450..79f5639a8a 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -152,6 +152,7 @@ COMMON_LIBS += ../lib/minitasn1/libminitasn1.la ../gl/libgnu.la AM_CPPFLAGS += -I$(top_srcdir)/lib/minitasn1 else COMMON_LIBS += $(LIBTASN1_LIBS) +AM_CPPFLAGS += $(LIBTASN1_CFLAGS) endif diff --git a/tests/Makefile.am b/tests/Makefile.am index fa4689619a..0b743d6b8c 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -82,6 +82,7 @@ EXTRA_DIST = suppressions.valgrind eagain-common.h cert-common.h test-chains.h \ AM_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS) AM_CPPFLAGS = \ + $(LIBIDN2_CFLAGS) \ $(P11_KIT_CFLAGS) \ -I$(top_srcdir)/lib/includes \ -I$(top_builddir)/lib/includes \ @@ -106,6 +107,8 @@ dane_strcodes_LDADD = $(LDADD) ../libdane/libgnutls-dane.la if ENABLE_MINITASN1 AM_CPPFLAGS += -I$(srcdir)/../lib/minitasn1 +else +AM_CPPFLAGS += $(LIBTASN1_CFLAGS) endif noinst_LTLIBRARIES = libutils.la