From: Joerg Vehlow <lkml@jv-coder.de>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] configure.ac: Fix --with* options
Date: Wed, 13 Nov 2019 11:41:49 +0100 [thread overview]
Message-ID: <20191113104149.42407-1-lkml@jv-coder.de> (raw)
From: Joerg Vehlow <joerg.vehlow@aox-tech.de>
The usage of AC_ARG_WITH was wrong. This resulted in unexpected configuration.
E.g --without-bash set with_bash=yes and --with-nume set with_numa=no.
This is fixed by using "$withval" in the action-if-given. Also all AC_ARG_WITH
are unified now (all use alos action-if-not-given)
The "default=" help text did not make sense for same options.
e.g. for --with expect was "default=yes", but it defaults to no.
The "default=" strings are dropped, because defaultness is indicated by
either "--with-<option>" or "--without-<option>" as done by other projects,
that use autoconf.
Defining AC_ARG_WITH within an if to express dependencies does not work.
./configure --with-realtime-testsuite set with_realtime_testsuite=yes,
even if with_bash=no or with_python=no. The check is removed completely.
Signed-off-by: Joerg Vehlow <joerg.vehlow@aox-tech.de>
---
configure.ac | 46 ++++++++++++++++++++++++----------------------
1 file changed, 24 insertions(+), 22 deletions(-)
diff --git a/configure.ac b/configure.ac
index 62c5a0bb4..4b7c6d57c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -108,8 +108,9 @@ AC_CHECK_FUNCS([ \
# Expect
AC_ARG_WITH([bash],
[AC_HELP_STRING([--with-bash],
- [have the Bourne Again SHell interpreter (default=no)])],
- [with_bash=yes],
+ [have the Bourne Again Shell interpreter])],
+ [with_bash=$withval],
+ [with_bash=no]
)
if test "x$with_bash" = xyes; then
AC_SUBST([WITH_BASH],["yes"])
@@ -119,8 +120,8 @@ fi
AC_ARG_WITH([expect],
[AC_HELP_STRING([--with-expect],
- [have the Tcl/expect library (default=yes)])],
- [with_expect=yes],
+ [have the Tcl/expect library])],
+ [with_expect=$withval],
[with_expect=no]
)
if test "x$with_expect" = xyes; then
@@ -132,16 +133,16 @@ fi
# Numa
AC_ARG_WITH([numa],
AC_HELP_STRING([--without-numa],
- [without numa support (default=no)]),
- [with_numa=no],
+ [without numa support]),
+ [with_numa=$withval],
[with_numa=yes]
)
# Perl
AC_ARG_WITH([perl],
[AC_HELP_STRING([--with-perl],
- [have a perl interpreter (default=yes)])],
- [with_perl=yes],
+ [have a perl interpreter])],
+ [with_perl=$withval],
[with_perl=no]
)
if test "x$with_perl" = xyes; then
@@ -153,8 +154,8 @@ fi
# Python
AC_ARG_WITH([python],
[AC_HELP_STRING([--with-python],
- [have a python interpreter (default=yes)])],
- [with_python=yes],
+ [have a python interpreter])],
+ [with_python=$withval],
[with_python=no]
)
if test "x$with_python" = xyes; then
@@ -166,8 +167,8 @@ fi
# TI RPC
AC_ARG_WITH([tirpc],
AC_HELP_STRING([--without-tirpc],
- [without libtirpc support (default=no)]),
- [with_tirpc=no],
+ [without libtirpc support]),
+ [with_tirpc=$withval],
[with_tirpc=yes]
)
# END tools knobs
@@ -176,8 +177,9 @@ AC_ARG_WITH([tirpc],
AC_ARG_WITH([open-posix-testsuite],
[AC_HELP_STRING([--with-open-posix-testsuite],
- [compile and install the open posix testsuite (default=no)])],
- [with_open_posix_testsuite=$withval]
+ [compile and install the open posix testsuite])],
+ [with_open_posix_testsuite=$withval],
+ [with_open_posix_testsuite=no]
)
if test "x$with_open_posix_testsuite" = xyes; then
AC_SUBST([WITH_OPEN_POSIX_TESTSUITE],["yes"])
@@ -185,14 +187,14 @@ else
AC_SUBST([WITH_OPEN_POSIX_TESTSUITE],["no"])
fi
-# testcases/realtime requires bash and python.
-if test "x$with_bash" = xyes && test "x$with_python" = xyes; then
- AC_ARG_WITH([realtime-testsuite],
- [AC_HELP_STRING([--with-realtime-testsuite],
- [compile and install the realtime testsuite (default=no)])],
- [with_realtime_testsuite=yes]
- )
-fi
+# TODO: testcases/realtime requires bash and python.
+AC_ARG_WITH([realtime-testsuite],
+ [AC_HELP_STRING([--with-realtime-testsuite],
+ [compile and install the realtime testsuite])],
+ [with_realtime_testsuite=$withval],
+ [with_realtime_testsuite=no]
+)
+
if test "x$with_realtime_testsuite" = xyes; then
AC_SUBST([WITH_REALTIME_TESTSUITE],["yes"])
# Run configure on testcases/realtime as well.
--
2.20.1
next reply other threads:[~2019-11-13 10:41 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-13 10:41 Joerg Vehlow [this message]
2019-11-13 16:02 ` [LTP] [PATCH] configure.ac: Fix --with* options Petr Vorel
2019-11-14 3:24 ` Li Wang
2019-11-14 6:31 ` Joerg Vehlow
2019-11-14 7:59 ` Li Wang
2019-11-14 8:09 ` Joerg Vehlow
2019-11-14 8:36 ` Li Wang
2019-11-18 6:16 ` Petr Vorel
2019-11-18 6:38 ` Li Wang
2019-11-18 6:40 ` Joerg Vehlow
2019-11-18 8:59 ` Petr Vorel
2019-11-18 20:41 ` Petr Vorel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191113104149.42407-1-lkml@jv-coder.de \
--to=lkml@jv-coder.de \
--cc=ltp@lists.linux.it \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox