Re: [PATCH 3/3] btrfs-progs: build: use m4_flatten instead of m4_chomp

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

 



On 4/29/18 6:13 AM, David Sterba wrote:
> On Fri, Apr 27, 2018 at 03:18:17PM -0400, Jeff Mahoney wrote:
>> On 4/27/18 2:56 PM, jeffm@xxxxxxxx wrote:
>>> From: Jeff Mahoney <jeffm@xxxxxxxx>
>>>
>>> Commit 2e1932e6a38 (btrfs-progs: build: simplify version tracking)
>>> started m4_chomp to strip the newlines from the version file.  m4_chomp
>>> was introduced in autoconf 2.64 but SLE11 ships with autoconf 2.63.
>>> For purposes of just stripping the newline, m4_flatten is sufficient.
>>
>> Scratch that.  The previous patch also requires autoconf 2.64.
> 
> I wanted to avoid shell tricks, but this should work everywhere:
> 
> m4_esyscmd([echo -n $(cat VERSION)])
> 

m4_flatten should work everywhere.  It's the AX_CHECK_COMPILE_FLAGS that
depends on autoconf 2.64.

I can fix the dependency, but it ends up looking like:

m4_version_prereq([2.64], [
    AX_CHECK_COMPILE_FLAG([-std=gnu90],[CSTD=-std=gnu90],[CSTD=-std=gnu89])
  ], [
    AX_GCC_VERSION([4], [5], [0], [CSTD=-std=gnu90],[CSTD=-std=gnu89])
  ])
AC_SUBST([CSTD])

AX_GCC_VERSION is deprecated, but works with earlier autoconf versions.
I'm not thrilled about it, but keying off the autoconf version and using
the newer way for newer versions means it'll be easier to drop it later
when we drop support for earlier autoconf.

Alternatively, I can just put this patch in the OBS project.

-Jeff

-- 
Jeff Mahoney
SUSE Labs

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux