[LTP] [PATCH] configure.ac: Fix --with* options

Joerg Vehlow lkml@jv-coder.de
Thu Nov 14 07:31:51 CET 2019


Hi Li,

> I think this patch makes sense. It follows the AC_ARG_WITH official 
> usage, and make use of the shell variable 'withval' is also a wise choice.
>
> Just a few queries below:
>
>
>
>      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]
>
>
> From the original intention, it likely to set yes as the default, so 
> maybe the [action-if-not-given] should as  [with_expect=yes]?
Maybe, but I did not want to change the current behavior here. This 
should be done in another patch.
>
>
>     -# 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.
>
>
> Why remove the judgment of bash/python here?
It simply does not work as intended. See last part of my patch description:
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.

I though removing it is better than leaving something that does nothing 
anyway
>
Jörg


More information about the ltp mailing list