[sr #110573] AR_CONFIG_AUX_DIR(S) does not recognize shell vars nor absolute paths

Dominik Kummer <[email protected]>
Newsgroups gmane.comp.sysutils.autoconf.bugs
Message-ID <[email protected]>
URL:
  <https://savannah.gnu.org/support/?110573>

                 Summary: AR_CONFIG_AUX_DIR(S) does not recognize shell vars
nor absolute paths
                 Project: Autoconf
            Submitted by: domson
            Submitted on: Tue 30 Nov 2021 05:31:46 PM CET
                Category: None
                Priority: 5 - Normal
                Severity: 3 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
        Operating System: GNU/Linux

    _______________________________________________________

Details:

AR_CONFIG_AUX_DIR macro in general.m4 does seem to have insufficient regex,
and does therefore not correspond to its description which is

_# AC_CONFIG_AUX_DIR(DIR)
# ----------------------
# Find auxiliary scripts (e.g. install-sh, config.sub, config.guess)
# in DIR.  If DIR is a literal shell word and not an absolute path,
# it is interpreted relative to $srcdir; otherwise it is assumed to be
# usable as-is._

I experimented with a custom macro:


AC_DEFUN([MY_CONFIG_AUX_DIR],
  [m4_append_uniq([_AC_AUX_DIR_CANDIDATES],
    AS_LITERAL_WORD_IF([$1],
      [m4_bmatch([$1],
                 [^/.*],       [$1],      # added '.*' suffix
                 [^[a-z]:/], [$1],        # is that to match shell vars?
                            [${srcdir}/$1])],
      [$1]),
    [${PATH_SEPARATOR}])])







    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/support/?110573>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.