Fedict / eid-mw

eID Middleware (main repository)
GNU Lesser General Public License v3.0
202 stars 79 forks source link

fix typo in configure.ac causing generation of configure scripts with syntax errors #141

Closed PoroCYon closed 3 years ago

PoroCYon commented 3 years ago

Without this patch, I get this error:

./configure: line 16259: syntax error near unexpected token `ac_ext=c'
./configure: line 16259: `ac_ext=c'

Turns out, instead of performing the AX_CXX_COMPILE_STDCXX_11 things, it just put AX_CXX_COMPILE_STDCXX_11() verbatim in ./configure. The ac_ext=c is on the next line, and, as my shell would expect a {, it errors here.

This issue is present on at least version v5.0.22 and on master, I haven't tried older ones.

yoe commented 3 years ago

This is not a typo.

The AX_* macros in autoconf are available in the autoconf-archive, without which they will not be recognized as macros and copied into the configure.ac script verbatim.

It is true that if you add () to the end of a string, that then bourne shells will recognize the name as a function. The function will not exist, however, which is not an error in a bourne shell, but it will be a no-op, which may mean that your compiler is not detected, or that it is detected but used with the wrong C++ dialect (we require C++11 for the time being, mostly due to needing to support older Linux versions that don't have more recent C++ compilers yet).

The requirement for the autoconf-archive is documented in the README file, and I don't think there's much more we can do (but suggestions are welcome). So, closing this PR, but feel free to reopen if I've missed something.