helpAutoconf - 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
 
Category:  None Priority:  5 - Normal
Severity:  3 - Normal Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open Operating System:  GNU/Linux
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       

 

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 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.

     

     

     

     

    No changes have been made to this item

    Back to the top


    Powered by Savane 3.9