Re: [LTP] [PATCH 2/2] Update AC_PROG_AR related comment

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


On 2023-01-10 4:25 AM, Richard Palethorpe wrote:
-# <= autoconf 2.61 doesn't have AC_PROG_AR, but 2.63 has it. Not sure about
-# 2.62.
+# autoconf >= v2.72a

This reads like we need the def for autoconf => v2.72a. How about
You're right.  I probably thought this is defined since v2.72a,
thus not needed.

Please don't use 'v2.72a' in any commentary or tests. That version doesn't exist yet and may never exist; if it does, it will be a short-lived beta test release of v2.72 that we don't want people to depend on. (Autoconf uses a very old version numbering convention in which beta tests for release X.Y are labeled X.Ya, X.Yb, X.Yc, etc.)

Officially, AC_PROG_AR will be available as of version 2.72, and that's what you should reference in commentary.

> Also it looks like that redefinition is not a problem thus
> not wrapping with m4_ifndef([AC_PROG_AR].

Autoconf will let you do that, but it's bad practice. What if version 2.73 makes AC_PROG_AR expand to something other than
AC_CHECK_TOOL(AR, ar, :) ? You'd be overwriting whatever bug fix that was.

I suggest something like

# AC_PROG_AR was added in autoconf 2.72.

> NOTE: missing 'ar' don't fail configure (isn't the check useless
> then?)

We don't know what you need `ar` for; it might not be appropriate to fail the build if it's missing. You can do

AS_IF([test x$AR = x:],
  [AC_MSG_FAILURE([no usable "ar" program detected])])

if you want to fail the build.


[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux