On Wed, 16 Nov 2022 19:44:58 GMT, Magnus Ihse Bursie <i...@openjdk.org> wrote:

> > For one reason or another this particular flag simply refuses to work 
> > properly with UTIL_ARG_WITH, and after numerous attempts I'm completely 
> > lost as to how to make it function without crashing autoconf halfway 
> > through before the configure script is even generated
> 
> This sounds like the typical case that happens if you inadvertently write the 
> name of a macro ("function") that gets expanded. Like this:
> 
> ```
> AC_DEFUN([TEST_FOO],
> [
>    echo Debug: we are running in TEST_FOO
> ])
> ```
> 
> will fail to compile with a stack overflow, since the `TEST_FOO` in the debug 
> output will be recursively expanded with the function we're trying to expand. 
> (Been there, done that, has produced profanities over autoconf enough to 
> guarantee me a very hot place in the afterlife, before I figured that one 
> out...)
> 
> So check if you are trying to write a "keyword" where a substring matches 
> some other defined macro.

Scoured the following for any of the related issues you pointed out, can't seem 
to figure out what I'm overwriting or doing wrong though :(
(I'm only using the IF_GIVEN block for demonstration purposes, I'll change it 
to CHECK_VALUE later on, but see above for a problem I picked up while doing so)

UTIL_ARG_WITH(NAME: vendor-name, TYPE: string,
  RESULT: COMPANY_NAME,
  DEFAULT: $DEFAULT_COMPANY_NAME,
  DESC: [Set vendor name. Among others, used to set the 'java.vendor'
     and 'java.vm.vendor' system properties.],
  DEFAULT_DESC: [not specified],
  IF_GIVEN: [
    if test "x$COMPANY_NAME" = x; then
      AC_MSG_ERROR([--with-vendor-name must have a value])
    elif [ ! [[ $COMPANY_NAME =~ ^[[:print:]]*$ ]] ]; then
      AC_MSG_ERROR([--with-vendor-name contains non-printing characters: 
$COMPANY_NAME])
    fi
  ])   
  AC_SUBST(COMPANY_NAME)


Runnable configure script is not up to date
Generating runnable configure script at 
/d/Eclipse/Workspace/jdk/build/.configure-support/generated-configure.sh
Using autoconf at /usr/bin/autoconf [autoconf (GNU Autoconf) 2.71]

-------------

PR: https://git.openjdk.org/jdk/pull/11020

Reply via email to