[Xfce-bugs] [Bug 13703] New: build: Incorrect use of AC_ARG_ENABLE(tests...) results in --disable-tests enabling tests

bugzilla-daemon at xfce.org bugzilla-daemon at xfce.org
Mon Jul 3 21:41:46 CEST 2017


https://bugzilla.xfce.org/show_bug.cgi?id=13703

            Bug ID: 13703
           Summary: build: Incorrect use of AC_ARG_ENABLE(tests...)
                    results in --disable-tests enabling tests
    Classification: Xfce Core
           Product: Libxfce4ui
           Version: 4.13.3
          Hardware: Other
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: Medium
         Component: General
          Assignee: nick at xfce.org
          Reporter: mgorny at gentoo.org
                CC: hjudt at xfce.org, xfce-bugs at xfce.org
  Target Milestone: 4.14

AC_ARG_ENABLE has the following usage:

  AC_ARG_ENABLE (feature, help-string, action-if-given, action-if-not-given)

The third argument is evaluated whenever the option is used in any form (i.e.
both for --enable and --disable), and the fourth otherwise.

  AC_ARG_ENABLE(tests,
    [AS_HELP_STRING([--enable-tests],[enable validation test framework
@<:@default=@<:@disabled@:>@@:>@])],
    enable_tests=yes, enable_tests=no)

means that tests will be enabled whenever --enable-tests or --disable-tests is
used, and disabled only if the option is not used at all.

You probably want to use the following instead:

  AC_ARG_ENABLE(tests,
    [AS_HELP_STRING([--enable-tests],[enable validation test framework
@<:@default=@<:@disabled@:>@@:>@])],
    enable_tests=$withval, enable_tests=no)

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Xfce-bugs mailing list