Skip to content

configure.ac: use AC_PROG_AR#4418

Open
lanodan wants to merge 1 commit into
universal-ctags:masterfrom
lanodan:ac_prog_ar
Open

configure.ac: use AC_PROG_AR#4418
lanodan wants to merge 1 commit into
universal-ctags:masterfrom
lanodan:ac_prog_ar

Conversation

@lanodan
Copy link
Copy Markdown

@lanodan lanodan commented Apr 28, 2026

This way AR is properly queried for including when cross-compiling
where a more graceful fallback than "ar" is needed.

@masatake
Copy link
Copy Markdown
Member

masatake commented May 2, 2026

Many checks failed.

@leleliu008
Copy link
Copy Markdown
Member

@lanodan You may want to use AM_PROG_AR rather than AC_PROG_AR, AC_PROG_AR was introduced in autoconf-2.72

This way AR is properly queried for including when cross-compiling
where a more graceful fallback than "ar" is needed.
@codecov
Copy link
Copy Markdown

codecov Bot commented May 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.98%. Comparing base (0498b59) to head (a64287c).
⚠️ Report is 11 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4418   +/-   ##
=======================================
  Coverage   85.98%   85.98%           
=======================================
  Files         255      255           
  Lines       63884    63885    +1     
=======================================
+ Hits        54931    54932    +1     
  Misses       8953     8953           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@masatake masatake requested a review from leleliu008 May 12, 2026 03:58
@leleliu008
Copy link
Copy Markdown
Member

I think this would be better:

diff --git a/configure.ac b/configure.ac
index 1ed5359e0..29e45f992 100644
--- a/configure.ac
+++ b/configure.ac
@@ -265,9 +265,14 @@ AC_C_INLINE
 #  Typically, this is immediately after AC_PROG_CC, ...
 gl_EARLY
 
+# AC_PROG_AR was introduced in autoconf-2.72
+# AM_PROG_AR was introduced in automake-1.12.0
+# https://lists.gnu.org/archive/html/automake/2012-05/msg00014.html
+m4_ifdef([AC_PROG_AR], [AC_PROG_AR], [m4_ifdef([AM_PROG_AR], [AM_PROG_AR])])
+AC_ARG_VAR([AR], [ar command or path])
 AC_ARG_VAR(RANLIB,[ranlib command or path])
 AC_PROG_RANLIB
-PRETTY_ARG_VAR([AR], [ar command or path], [ar])
+
 AC_C_BIGENDIAN
 
 if test "$cross_compiling" = "yes"; then

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants