Skip to content

Commit

Permalink
Fix build.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmuehlner committed Nov 16, 2023
1 parent c36794b commit 47931d5
Show file tree
Hide file tree
Showing 21 changed files with 47 additions and 27 deletions.
2 changes: 1 addition & 1 deletion README-unit-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 = \
Expand Down
5 changes: 4 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand All @@ -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@:>@])],
Expand All @@ -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

Expand Down Expand Up @@ -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])
Expand Down
4 changes: 0 additions & 4 deletions scripts/build-guac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 2 additions & 1 deletion src/common-ssh/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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@

Expand Down
3 changes: 2 additions & 1 deletion src/common-ssh/tests/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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@
Expand Down
3 changes: 2 additions & 1 deletion src/common/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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 = \
Expand Down
3 changes: 2 additions & 1 deletion src/common/tests/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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 = \
Expand Down
3 changes: 2 additions & 1 deletion src/guacd/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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@

Expand Down
3 changes: 2 additions & 1 deletion src/guacenc/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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@ \
Expand Down
3 changes: 2 additions & 1 deletion src/guaclog/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ guaclog_SOURCES = \
state.c

guaclog_CFLAGS = \
-Werror -Wexpansion-to-defined -Wall \
-Werror -Wall \
@CYGWIN_CFLAGS@ \
@LIBGUAC_INCLUDE@

guaclog_LDADD = \
Expand Down
3 changes: 2 additions & 1 deletion src/libguac/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
3 changes: 2 additions & 1 deletion src/libguac/tests/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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 = \
Expand Down
3 changes: 2 additions & 1 deletion src/protocols/kubernetes/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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@

Expand Down
3 changes: 2 additions & 1 deletion src/protocols/kubernetes/tests/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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@

Expand Down
9 changes: 6 additions & 3 deletions src/protocols/rdp/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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@ \
Expand Down Expand Up @@ -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@

Expand All @@ -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@ \
Expand Down
3 changes: 2 additions & 1 deletion src/protocols/rdp/tests/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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@

Expand Down
3 changes: 2 additions & 1 deletion src/protocols/ssh/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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@
Expand Down
3 changes: 2 additions & 1 deletion src/protocols/telnet/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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@

Expand Down
3 changes: 2 additions & 1 deletion src/protocols/vnc/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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@ \
Expand Down
5 changes: 3 additions & 2 deletions src/pulse/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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 = \
Expand Down
4 changes: 3 additions & 1 deletion src/terminal/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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@ \
Expand Down

0 comments on commit 47931d5

Please sign in to comment.