[Users] [PATCH] configure: handle deprecated GTK option properly

Olaf Hering olaf at aepfle.de
Thu Mar 2 14:19:37 CET 2017


If --disable-deprecated is specified it will set GTK_CFLAGS.
Later the pkgconfig check for GTK_CFLAGS will be skipped because the variable
is already set. As a result essential CLFAGS from gtk+-2.0 will be missing in
global CFLAGS and compilation fails.

Store the additional CFLAGS in a separate variable, which is appended after
pkgconfig has filled GTK_CFLAGS.

Signed-off-by: Olaf Hering <olaf at aepfle.de>
---

Once that is fixed compile will fail anyway because GCompletion is deprecated,
but thats another story.

 configure.ac | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index e94641ec0..3da76ee35 100644
--- a/configure.ac
+++ b/configure.ac
@@ -296,7 +296,7 @@ AC_ARG_ENABLE(svg,
 
 AC_ARG_ENABLE(deprecated,
 		[  --disable-deprecated            Disable deprecated GTK functions],
-		[GTK_CFLAGS="$GTK_CFLAGS -DG_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"], [])
+		[GTK_DEPRECATED_CFLAGS="$GTK_CFLAGS -DG_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"], [])
 
 manualdir='${docdir}/manual'
 AC_ARG_WITH(manualdir,
@@ -579,6 +579,7 @@ if test x"$enable_gtk3" = x"yes"; then
 else
 	PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.16)
 fi
+GTK_CFLAGS="$GTK_CFLAGS $GTK_DEPRECATED_CFLAGS"
 AC_SUBST(GTK_CFLAGS)
 AC_SUBST(GTK_LIBS)
 



More information about the Users mailing list