Project

General

Profile

Actions

Bug #880

closed

automake: --without-gtk2 doesn't work

Added by Colin McCabe about 13 years ago. Updated about 13 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Regression:
Severity:
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

./configure --without-gtk2 ...

later:

...
configure: error: --with-gtk2 was given, but test for gtkmm failed
...

The cause of this is that we are not checking $withval in our AC_ARG_WITH statements. The general form of AC_ARG_WITH is like this:

AC_ARG_WITH (package, help-string, [action-if-given], [action-if-not-given])

However, WITH can be given, but as "no"! No means no, and our configure.ac still needs to learn that, apparently.

Actions #1

Updated by Anonymous about 13 years ago

  • Status changed from New to Closed
commit 289318777c912f6c1bf057309e281472da4a3517
Author: Tommi Virtanen <tommi.virtanen@dreamhost.com>
Date:   2011-03-11 14:46:22 -0800

    autoconf: Fix typo that made --without-gtk2 not work.

    Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>

diff --git a/configure.ac b/configure.ac
index 3a933f6..c5c84ee 100644
--- a/configure.ac
+++ b/configure.ac
@@ -282,7 +282,7 @@ AC_ARG_WITH([gtk2],
         [],
         [with_gtk2=check])
 have_gtk2=no
-AS_IF([test "with_gtk2" != "xno"],
+AS_IF([test "x$with_gtk2" != "xno"],
         [PKG_CHECK_MODULES(GTKMM, [gtkmm-2.4 >= 1.0.0],
                 [have_gtk2=yes
                AC_DEFINE([HAVE_GTK2], [1], [we have gtk2])
Actions

Also available in: Atom PDF