cybernoid / archivemount

A fuse filesystem for mounting archives in formats supported by libarchive.
Other
184 stars 19 forks source link

Add AM_PROG_CC_C_O macro to configure.ac #9

Closed ebertland closed 4 years ago

ebertland commented 4 years ago

This macro checks that the C compiler supports the -c and -o options together, which is needed to run autoreconf -i on a git clone.

This macro is needed only for automake <1.14, but add it for compatibility with older environments, such as CentOS 7.

ebertland commented 4 years ago

This is the error I get when trying to run autoreconf -i on CentOS 7:

$ autoreconf -i
configure.ac:4: installing './install-sh'
configure.ac:4: installing './missing'
automake: warnings are treated as errors
Makefile.am:2: warning: compiling 'archivemount.c' with per-target flags requires 'AM_PROG_CC_C_O' in 'configure.ac'
Makefile.am: installing './depcomp'
autoreconf: automake failed with exit status: 1

Here is a similar issue in another tool: https://github.com/scanmem/scanmem/issues/289

Another approach is to remove per-target CFLAGS as suggested here: https://bugs.freedesktop.org/show_bug.cgi?id=11302

I'm not sure exactly how to do that and I didn't trace this bug report to the corresponding commits in Xorg.

cybernoid commented 4 years ago

Seems to break nothing, accepted ;-)