Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8310369

UTIL_ARG_WITH fails when arg is disabled

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 22
    • None
    • infrastructure
    • None
    • b03

    Description

      I've recently tried to use UTIL_ARG_WITH for new configure arguments in a project repository and discovered some issues. The project in question may or may not end up in mainline at some point in the future, but I think fixing these general issues in UTIL_ARG_WITH is worth it independent of my specific use case.

      For TYPE "directory" the check if the value is a valid directory is supposed to optionally check for files in the CHECK_FOR_FILES list. The default value of this list is ":" (due to autoconf peculiarities) but the check is performed if the value is non empty. This means that if you call UTIL_ARG_WITH with TYPE "directory" and no CHECK_FOR_FILES, it will always fail because there is no file ":" in the given directory.

      When an optional arg is defined, the validation check is still being performed when the arg has been disabled (--without-arg). This makes it impossible to disable something of for example TYPE "directory" as the directory check will fail. The current configure script in OpenJDK only has macro calls of type "string" and "literal" where this doesn't cause problems, because an empty string as value passes validation.

      Attachments

        Issue Links

          Activity

            People

              erikj Erik Joelsson
              erikj Erik Joelsson
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: