From 47931d517b36ff7675f31daa5c7489d7c3adce47 Mon Sep 17 00:00:00 2001 From: James Muehlner Date: Thu, 16 Nov 2023 18:58:03 +0000 Subject: [PATCH] Fix build. --- README-unit-testing.md | 2 +- configure.ac | 5 ++++- scripts/build-guac.sh | 4 ---- src/common-ssh/Makefile.am | 3 ++- src/common-ssh/tests/Makefile.am | 3 ++- src/common/Makefile.am | 3 ++- src/common/tests/Makefile.am | 3 ++- src/guacd/Makefile.am | 3 ++- src/guacenc/Makefile.am | 3 ++- src/guaclog/Makefile.am | 3 ++- src/libguac/Makefile.am | 3 ++- src/libguac/tests/Makefile.am | 3 ++- src/protocols/kubernetes/Makefile.am | 3 ++- src/protocols/kubernetes/tests/Makefile.am | 3 ++- src/protocols/rdp/Makefile.am | 9 ++++++--- src/protocols/rdp/tests/Makefile.am | 3 ++- src/protocols/ssh/Makefile.am | 3 ++- src/protocols/telnet/Makefile.am | 3 ++- src/protocols/vnc/Makefile.am | 3 ++- src/pulse/Makefile.am | 5 +++-- src/terminal/Makefile.am | 4 +++- 21 files changed, 47 insertions(+), 27 deletions(-) diff --git a/README-unit-testing.md b/README-unit-testing.md index e76c42070..8b4e77687 100644 --- a/README-unit-testing.md +++ b/README-unit-testing.md @@ -46,7 +46,7 @@ modified to contain a sections like the following: ...all source files... test_myproj_CFLAGS = \ - -Werror -Wexpansion-to-defined -Wall -pedantic \ + -Werror -Wall -pedantic \ ...other flags... test_myproj_LDADD = \ diff --git a/configure.ac b/configure.ac index 1a211e550..3b6d7e6f8 100644 --- a/configure.ac +++ b/configure.ac @@ -20,7 +20,7 @@ AC_PREREQ([2.61]) AC_INIT([guacamole-server], [1.5.3]) AC_CONFIG_AUX_DIR([build-aux]) -AM_INIT_AUTOMAKE([-Wall -Werror -Wexpansion-to-defined foreign subdir-objects]) +AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects]) AM_SILENT_RULES([yes]) LT_PREREQ([2.2]) @@ -42,6 +42,7 @@ AC_CHECK_HEADERS([fcntl.h stdlib.h string.h sys/socket.h time.h sys/time.h syslo # Cygwin build CYWGIN_LDFLAGS= +CYGWIN_CFLAGS= AC_ARG_WITH([cygwin], [AS_HELP_STRING([--with-cygwin], [use Cygwin to build under Windows @<:@default=no@:>@])], @@ -52,6 +53,7 @@ AM_CONDITIONAL([CYGWIN_BUILD], [test "x${with_cygwin}" = "xyes"]) if test "x$with_cygwin" = "xyes" then CYWGIN_LDFLAGS=-no-undefined + CYGWIN_CFLAGS=-Wno-error=expansion-to-defined AC_DEFINE([CYGWIN_BUILD],,[Build against Cygwin on Windows]) fi @@ -154,6 +156,7 @@ AC_SUBST(PTHREAD_LIBS) AC_SUBST(UUID_LIBS) AC_SUBST(CUNIT_LIBS) AC_SUBST(CYWGIN_LDFLAGS) +AC_SUBST(CYGWIN_CFLAGS) # Library functions AC_CHECK_FUNCS([clock_gettime gettimeofday memmove memset select strdup nanosleep]) diff --git a/scripts/build-guac.sh b/scripts/build-guac.sh index c917aa521..65175660d 100644 --- a/scripts/build-guac.sh +++ b/scripts/build-guac.sh @@ -3,10 +3,6 @@ cd guacamole-server -echo looking for it... -find . -name 'Makefile.am' -echo looked for it... - export PKG_CONFIG_PATH="/quasi-msys2/root/ucrt64/lib/pkgconfig/" export LDFLAGS="-L/quasi-msys2/root/ucrt64/bin/" export CFLAGS="-I/quasi-msys2/root/ucrt64/include/ -I/usr/x86_64-w64-mingw32/include" diff --git a/src/common-ssh/Makefile.am b/src/common-ssh/Makefile.am index a15c85d4a..19a0333ad 100644 --- a/src/common-ssh/Makefile.am +++ b/src/common-ssh/Makefile.am @@ -44,7 +44,8 @@ noinst_HEADERS = \ common-ssh/user.h libguac_common_ssh_la_CFLAGS = \ - -Werror -Wexpansion-to-defined -Wall -pedantic \ + -Werror -Wall -pedantic \ + @CYGWIN_CFLAGS@ \ @COMMON_INCLUDE@ \ @LIBGUAC_INCLUDE@ diff --git a/src/common-ssh/tests/Makefile.am b/src/common-ssh/tests/Makefile.am index 58a89aa03..b5d330bf4 100644 --- a/src/common-ssh/tests/Makefile.am +++ b/src/common-ssh/tests/Makefile.am @@ -37,7 +37,8 @@ test_common_ssh_SOURCES = \ sftp/normalize_path.c test_common_ssh_CFLAGS = \ - -Werror -Wexpansion-to-defined -Wall -pedantic \ + -Werror -Wall -pedantic \ + @CYGWIN_CFLAGS@ \ @COMMON_INCLUDE@ \ @COMMON_SSH_INCLUDE@ \ @LIBGUAC_INCLUDE@ diff --git a/src/common/Makefile.am b/src/common/Makefile.am index f5be53671..6baa4aea8 100644 --- a/src/common/Makefile.am +++ b/src/common/Makefile.am @@ -63,7 +63,8 @@ libguac_common_la_SOURCES = \ surface.c libguac_common_la_CFLAGS = \ - -Werror -Wexpansion-to-defined -Wall -pedantic \ + -Werror -Wall -pedantic \ + @CYGWIN_CFLAGS@ \ @LIBGUAC_INCLUDE@ libguac_common_la_LIBADD = \ diff --git a/src/common/tests/Makefile.am b/src/common/tests/Makefile.am index fca720ec6..049397a45 100644 --- a/src/common/tests/Makefile.am +++ b/src/common/tests/Makefile.am @@ -49,7 +49,8 @@ test_common_SOURCES = \ string/split.c test_common_CFLAGS = \ - -Werror -Wexpansion-to-defined -Wall -pedantic \ + -Werror -Wall -pedantic \ + @CYGWIN_CFLAGS@ \ @COMMON_INCLUDE@ test_common_LDADD = \ diff --git a/src/guacd/Makefile.am b/src/guacd/Makefile.am index e9ba09450..c1ea25810 100644 --- a/src/guacd/Makefile.am +++ b/src/guacd/Makefile.am @@ -60,7 +60,8 @@ guacd_SOURCES += move-pipe.c endif guacd_CFLAGS = \ - -Werror -Wexpansion-to-defined -Wall -pedantic \ + -Werror -Wall -pedantic \ + @CYGWIN_CFLAGS@ \ @COMMON_INCLUDE@ \ @LIBGUAC_INCLUDE@ diff --git a/src/guacenc/Makefile.am b/src/guacenc/Makefile.am index eefb5e5f6..34c0e6798 100644 --- a/src/guacenc/Makefile.am +++ b/src/guacenc/Makefile.am @@ -88,7 +88,8 @@ noinst_HEADERS += webp.h endif guacenc_CFLAGS = \ - -Werror -Wexpansion-to-defined -Wall \ + -Werror -Wall \ + @CYGWIN_CFLAGS@ \ @AVCODEC_CFLAGS@ \ @AVFORMAT_CFLAGS@ \ @AVUTIL_CFLAGS@ \ diff --git a/src/guaclog/Makefile.am b/src/guaclog/Makefile.am index 1c73fde1d..8cc9a7222 100644 --- a/src/guaclog/Makefile.am +++ b/src/guaclog/Makefile.am @@ -48,7 +48,8 @@ guaclog_SOURCES = \ state.c guaclog_CFLAGS = \ - -Werror -Wexpansion-to-defined -Wall \ + -Werror -Wall \ + @CYGWIN_CFLAGS@ \ @LIBGUAC_INCLUDE@ guaclog_LDADD = \ diff --git a/src/libguac/Makefile.am b/src/libguac/Makefile.am index 12ae1a069..08f21d8ac 100644 --- a/src/libguac/Makefile.am +++ b/src/libguac/Makefile.am @@ -148,7 +148,8 @@ libguacinc_HEADERS += guacamole/wait-handle.h endif libguac_la_CFLAGS = \ - -Werror -Wexpansion-to-defined -Wall -pedantic + @CYGWIN_CFLAGS@ \ + -Werror -Wall -pedantic libguac_la_LDFLAGS = \ -version-info 22:0:1 \ diff --git a/src/libguac/tests/Makefile.am b/src/libguac/tests/Makefile.am index e4d03da12..68943da90 100644 --- a/src/libguac/tests/Makefile.am +++ b/src/libguac/tests/Makefile.am @@ -56,7 +56,8 @@ test_libguac_SOURCES = \ test_libguac_CFLAGS = \ - -Werror -Wexpansion-to-defined -Wall -pedantic \ + -Werror -Wall -pedantic \ + @CYGWIN_CFLAGS@ \ @LIBGUAC_INCLUDE@ test_libguac_LDADD = \ diff --git a/src/protocols/kubernetes/Makefile.am b/src/protocols/kubernetes/Makefile.am index b72d2ff5a..5b51d58cf 100644 --- a/src/protocols/kubernetes/Makefile.am +++ b/src/protocols/kubernetes/Makefile.am @@ -56,7 +56,8 @@ noinst_HEADERS = \ user.h libguac_client_kubernetes_la_CFLAGS = \ - -Werror -Wexpansion-to-defined -Wall -Iinclude \ + -Werror -Wall -Iinclude \ + @CYGWIN_CFLAGS@ \ @LIBGUAC_INCLUDE@ \ @TERMINAL_INCLUDE@ diff --git a/src/protocols/kubernetes/tests/Makefile.am b/src/protocols/kubernetes/tests/Makefile.am index 4aa882ed7..1d1a8f443 100644 --- a/src/protocols/kubernetes/tests/Makefile.am +++ b/src/protocols/kubernetes/tests/Makefile.am @@ -38,7 +38,8 @@ test_kubernetes_SOURCES = \ url/escape.c test_kubernetes_CFLAGS = \ - -Werror -Wexpansion-to-defined -Wall -pedantic \ + -Werror -Wall -pedantic \ + @CYGWIN_CFLAGS@ \ @LIBGUAC_CLIENT_KUBERNETES_INCLUDE@ \ @LIBGUAC_INCLUDE@ diff --git a/src/protocols/rdp/Makefile.am b/src/protocols/rdp/Makefile.am index caedeac34..6fcab1f4d 100644 --- a/src/protocols/rdp/Makefile.am +++ b/src/protocols/rdp/Makefile.am @@ -134,7 +134,8 @@ noinst_HEADERS = \ user.h libguac_client_rdp_la_CFLAGS = \ - -Werror -Wexpansion-to-defined -Wall -Iinclude \ + -Werror -Wall -Iinclude \ + @CYGWIN_CFLAGS@ \ @COMMON_INCLUDE@ \ @COMMON_SSH_INCLUDE@ \ @LIBGUAC_INCLUDE@ \ @@ -169,7 +170,8 @@ libguac_common_svc_client_la_SOURCES = \ plugins/guac-common-svc/guac-common-svc.c libguac_common_svc_client_la_CFLAGS = \ - -Werror -Wexpansion-to-defined -Wall -Iinclude \ + -Werror -Wall -Iinclude \ + @CYGWIN_CFLAGS@ \ @LIBGUAC_INCLUDE@ \ @RDP_CFLAGS@ @@ -192,7 +194,8 @@ libguacai_client_la_SOURCES = \ plugins/ptr-string.c libguacai_client_la_CFLAGS = \ - -Werror -Wexpansion-to-defined -Wall -Iinclude \ + -Werror -Wall -Iinclude \ + @CYGWIN_CFLAGS@ \ @COMMON_INCLUDE@ \ @COMMON_SSH_INCLUDE@ \ @LIBGUAC_INCLUDE@ \ diff --git a/src/protocols/rdp/tests/Makefile.am b/src/protocols/rdp/tests/Makefile.am index 40dcb8777..41206a1e5 100644 --- a/src/protocols/rdp/tests/Makefile.am +++ b/src/protocols/rdp/tests/Makefile.am @@ -38,7 +38,8 @@ test_rdp_SOURCES = \ fs/normalize_path.c test_rdp_CFLAGS = \ - -Werror -Wexpansion-to-defined -Wall -pedantic \ + -Werror -Wall -pedantic \ + @CYGWIN_CFLAGS@ \ @LIBGUAC_CLIENT_RDP_INCLUDE@ \ @LIBGUAC_INCLUDE@ diff --git a/src/protocols/ssh/Makefile.am b/src/protocols/ssh/Makefile.am index 07eae84df..27aebcc4d 100644 --- a/src/protocols/ssh/Makefile.am +++ b/src/protocols/ssh/Makefile.am @@ -59,7 +59,8 @@ noinst_HEADERS += ssh_agent.h endif libguac_client_ssh_la_CFLAGS = \ - -Werror -Wexpansion-to-defined -Wall -Iinclude \ + -Werror -Wall -Iinclude \ + @CYGWIN_CFLAGS@ \ @COMMON_SSH_INCLUDE@ \ @LIBGUAC_INCLUDE@ \ @TERMINAL_INCLUDE@ diff --git a/src/protocols/telnet/Makefile.am b/src/protocols/telnet/Makefile.am index 06b20fb9a..9c3283496 100644 --- a/src/protocols/telnet/Makefile.am +++ b/src/protocols/telnet/Makefile.am @@ -49,7 +49,8 @@ noinst_HEADERS = \ user.h libguac_client_telnet_la_CFLAGS = \ - -Werror -Wexpansion-to-defined -Wall -Iinclude \ + -Werror -Wall -Iinclude \ + @CYGWIN_CFLAGS@ \ @LIBGUAC_INCLUDE@ \ @TERMINAL_INCLUDE@ diff --git a/src/protocols/vnc/Makefile.am b/src/protocols/vnc/Makefile.am index c7a307fac..517de2b5c 100644 --- a/src/protocols/vnc/Makefile.am +++ b/src/protocols/vnc/Makefile.am @@ -55,7 +55,8 @@ noinst_HEADERS = \ vnc.h libguac_client_vnc_la_CFLAGS = \ - -Werror -Wexpansion-to-defined -Wall -pedantic -Iinclude \ + -Werror -Wall -pedantic -Iinclude \ + @CYGWIN_CFLAGS@ \ @COMMON_INCLUDE@ \ @COMMON_SSH_INCLUDE@ \ @LIBGUAC_INCLUDE@ \ diff --git a/src/pulse/Makefile.am b/src/pulse/Makefile.am index ca97fa824..0a9b066cd 100644 --- a/src/pulse/Makefile.am +++ b/src/pulse/Makefile.am @@ -34,8 +34,9 @@ noinst_HEADERS = \ libguac_pulse_la_SOURCES = \ pulse.c -libguac_pulse_la_CFLAGS = \ - -Werror -Wexpansion-to-defined -Wall -pedantic \ +libguac_pulse_la_CFLAGS = \ + -Werror -Wall -pedantic \ + @CYGWIN_CFLAGS@ \ @LIBGUAC_INCLUDE@ libguac_pulse_la_LIBADD = \ diff --git a/src/terminal/Makefile.am b/src/terminal/Makefile.am index a60085f34..23d23d732 100644 --- a/src/terminal/Makefile.am +++ b/src/terminal/Makefile.am @@ -66,7 +66,9 @@ libguac_terminal_la_SOURCES = \ xparsecolor.c libguac_terminal_la_CFLAGS = \ - -Werror -Wexpansion-to-defined -Wall \ + -Werror -Wall \ + @CYGWIN_CFLAGS@ \ + @CYGWIN_CFLAGS@ \ @COMMON_INCLUDE@ \ @LIBGUAC_INCLUDE@ \ @PANGO_CFLAGS@ \