! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
build: Incorrect use of AC_ARG_ENABLE(tests...) results in --disable-tests en...
Status:
RESOLVED: FIXED
Product:
Libxfce4ui
Component:
General

Comments

Description Michał Górny 2017-07-03 21:41:46 CEST
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)
Comment 1 Skunnyk editbugs 2017-11-27 23:17:35 CET
Created attachment 7457 
Fix incorrect use of AC_ARG_ENABLE(tests..)
Comment 2 Skunnyk editbugs 2017-11-27 23:18:26 CET
Thank you Michał !
Comment 3 Skunnyk editbugs 2017-11-30 18:56:14 CET
The wrong patch has been attached -_-
Comment 4 Git Bot editbugs 2017-11-30 18:59:52 CET
Romain B referenced this bugreport in commit 19f8aa608efdd35d79d074d21ecd488b2da425f3

Fix incorrect use of AC_ARG_ENABLE(tests..)

https://git.xfce.org/xfce/libxfce4ui/commit?id=19f8aa608efdd35d79d074d21ecd488b2da425f3
Comment 5 Eric Koegel editbugs 2017-12-07 08:37:08 CET
Marking resolved.

Bug #13703

Reported by:
Michał Górny
Reported on: 2017-07-03
Last modified on: 2017-12-07

People

Assignee:
Eric Koegel
CC List:
4 users

Version

Version:
4.13.3

Attachments

Additional information