mainAutoconf - Support: sr #110573, AR_CONFIG_AUX_DIR(S) does not...

 
 

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

Submitter:  Dominik Kummer <domson>
Submitted:  Tue 30 Nov 2021 04:31:46 PM UTC
   
 
Priority:  * 1 - Blocked Severity:  2 - Minor
Status:  Need Info Privacy:  Public
Assigned to:  None Open/Closed:  Open
Operating System:  GNU/Linux
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 08 Dec 2023 01:47:32 AM UTC, comment #2: 

We regret the delay in responding to this report.

Your suggested changes do not make sense to me.  There should be no behavioral difference between


m4_bmatch([$1], [^/.*], [...])


and


m4_bmatch([$1], [^/], [...])


because m4_bmatch does not require the pattern to match the entire string.  And anything that could match \$\{?[A-Za-z] should have been sent to the other branch of the AS_LITERAL_WORD_IF.

Could you please provide some examples of uses of AC_CONFIG_AUX_DIR that do not work correctly for you with the code in 2.71?  As many as you have.

Zack Weinberg <zackw>
Group administrator
Tue 30 Nov 2021 04:40:08 PM UTC, comment #1: 

This could work btw


AC_DEFUN([AR_CONFIG_AUX_DIR],
  [m4_append_uniq([_AC_AUX_DIR_CANDIDATES],
    AS_LITERAL_WORD_IF([$1],
      [m4_bmatch([$1],
                 [^/.*],       [$1],
                 [\$\{?[A-Za-z]], [$1],
                            [${srcdir}/$1])],
      [$1]),
    [${PATH_SEPARATOR}])])


Dominik Kummer <domson>
Tue 30 Nov 2021 04:31:46 PM UTC, original submission:  

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}])])



Dominik Kummer <domson>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by zackw (Posted a comment)
  • -email is unavailable- added by domson (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-12-08 zackw Priority5 - Unprioritized 1 - Blocked
    2023-12-08 zackw Severity3 - Normal 2 - Minor
        StatusNone Need Info

    Back to the top

    Powered by Savane 3.14-3b9d.
    Corresponding source code