From b72f0baed67de7f434c409056c3da5bca10629c5 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Fri, 11 May 2018 08:15:46 +0100 Subject: [PATCH] Force GTK1 build to use -std=gnu89. Every time I do my standard re-test against all three major versions of GTK, I have to annoyingly remember that the GTK1 headers contain code that depends on the old gcc language standard, and manually add this flag on the configure command line. Time to put it where it belongs, in configure.ac so I don't have to remember it again. --- configure.ac | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index adb31915..f6d1ba5e 100644 --- a/configure.ac +++ b/configure.ac @@ -120,7 +120,10 @@ case "$gtk_version_desired:$gtk" in # manual check for gtk1 AC_PATH_PROG(GTK1_CONFIG, gtk-config, absent) if test "$GTK1_CONFIG" != "absent"; then - GTK_CFLAGS=`"$GTK1_CONFIG" --cflags` + # the gtk1 headers need -std=gnu89, which flips round the + # definitions of 'inline' and 'extern inline' to their old GNU + # semantics before C99 chose different ones + GTK_CFLAGS="`"$GTK1_CONFIG" --cflags` -std=gnu89" GTK_LIBS=`"$GTK1_CONFIG" --libs` gtk=1 fi