configure with single-dash arguments

Issue #345 resolved
Dan Bonachea created an issue

autoconf configure scripts accept configure -help and configure -version with a single-dash - and recognize it as equivalent to the double dash -- option. This may be an undocumented behavior, but some users might still expect it.

Our configure script fails to recognize these and runs configure with these as opaque options.

We should fix the regex for at least these to make the double-dash optional, and investigate whether the same applies to other --with and --enable options

Comments (4)

  1. Paul Hargrove

    I have confirmed using gcc-9.3.0's sources that single-dash options "just work":

    • -prefix=/tmp results in the expected setting in Makefile
    • -without-mpc results in link failures corresponding to a lack of libmpc
    • -disable-lto removes lto from "The following languages will be built: ...."

    Additionally, --h and --V are not accepted as equivalents for -h and -V.

  2. Paul Hargrove

    configure: permit single-dash options

    This commit uses bash "extglob" patterns to accept single- and double-dash prefixes on all multi-character configure options. Single-letter options -V and -h are not accepted with two dashes. These changes bring the behavior of UPC++'s configure script into agreement with that displayed by ones built by GNU Autoconf 2.69.

    Resolves issue 345: "configure with single-dash arguments"

    → <<cset 6262f8808d1e>>

  3. Log in to comment