Skip to content

Commit 4c67d67

Browse files
committed
configure: Fix and simplify GTK3 detection
Quote the package name "gtk+-3.0" when passing it to the PKG_CHECK_MODULES() to avoid issues. Also simplify setting BUILD_GUI using AM_CONDITIONAL(). Signed-off-by: Damien Le Moal <[email protected]>
1 parent 0c7eda7 commit 4c67d67

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

configure.ac

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,9 @@ AC_ARG_ENABLE([gui],
7373
[Disable build of GUI tools (gzbc and gzviewer) [default=no]]))
7474
AS_IF([test "x$enable_gui" != "xno"],
7575
[m4_ifdef([PKG_CHECK_MODULES],
76-
[PKG_CHECK_MODULES([GTK], [gtk+-3.0], [HAVE_GTK3=1], [HAVE_GTK3=0])],
77-
[HAVE_GTK3=0])
78-
AM_CONDITIONAL([BUILD_GUI], [test "$HAVE_GTK3" -eq 1])],
79-
[AM_CONDITIONAL([BUILD_GUI], false)])
76+
[PKG_CHECK_MODULES([GTK], ["gtk+-3.0"], [HAVE_GTK=1], [HAVE_GTK=0])],
77+
[HAVE_GTK=0])])
78+
AM_CONDITIONAL([BUILD_GUI], [test "$HAVE_GTK" -eq 1])
8079

8180
# Build test suite
8281
AC_ARG_WITH([test],

0 commit comments

Comments
 (0)