On 03/22/2018 04:51 PM, Jules Lamur wrote:
Hello !
I encounter a syntax error while executing the AX_LIB_POSTGRESQL macro:
./configure: line 16962: syntax error near unexpected token
`$POSTGRESQL_VERSION,ge,$postgresql_version_req,'
./configure: line 16962: `
AX_COMPARE_VERSION($POSTGRESQL_VERSION,ge,$postgresql_version_req,
You reached the autoconf list, not the autoconf-archive list; but the
AX_COMPARE_VERSION macro belongs to autoconf-archive.
At first glance, it looks like your configure.ac attempted to call the
AX_COMPARE_VERSION macro, but that you failed to provide any .m4 macro
in any of the include directories searched by autoconf to actually
expand that macro, so autoconf just blindly output the text from your
configure.ac into the shell script instead of expanding it as desired.
Usually, you should either copy the .m4 file containing the definition
of AX_COMPARE_VERSION into your project, or else set up a -I
/path/to/library where autoconf-archive macros reside, as part of your
autoconf invocation processing your configure.ac file.
Furthermore, you probably want to add:
m4_pattern_forbid([AX_])
to your configure.ac, so autoconf can flag up front that it failed to
expand the AX_COMPARE_VERSION macro as expected, rather than getting a
cryptic shell error later on during the execution of ./configure about
the syntax error at the point in the generated configure where the
attempted macro was not expanded.
I use this exact version of the script (which is the latest):
https://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=blob;f=m4/ax_lib_postgresql.m4;h=e05dd17b7c8686323dcfa384c4408762630ae70b;hb=06a4043bea3ff31f81529fa78e5921aeadc986b5
Unfortunately, I don't have enough knowledge about autoconf to debug the
issue, could someone help me to fix it?
It's probably a question to the autoconf-archive list on their
recommended practices for how to best install their .m4 files for use in
your configure.ac file.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
https://lists.gnu.org/mailman/listinfo/autoconf