250125.2 · d8463c25491b6150d748155ac530a3205d072e37
Move closer to the standard autotools idiom. (#3187)
* Create `src/config.h` instead of passing everything on the compiler
command line.
* To reduce the magnitude of this change, add `--include src/config.h`
to CFLAGS instead of adding `#include "src/config.h"` at the top of
each source file. Not all compilers support this, but I don't think
we care about anything other than gcc and clang at this point.
* Rather than generate `src/config_opts.inc`, emit `JQ_CONFIG` directly
into `src/config.h`.
* Rather than generate `src/version.h`, define `JQ_VERSION` as an alias
for the standard `PACKAGE_VERSION`.
reading declarations
Changes to config/m4/find-func-no-libs2.m4. All files
config/m4/find-func-no-libs2.m4
@@ -42,7 +42,7 @@ case "$ac_res" in yes) eval "ac_cv_func_$1=yes" eval "LIB_$1="- AC_DEFINE_UNQUOTED($ac_tr_func)+ AC_DEFINE_UNQUOTED($ac_tr_func, 1, [Define if the $1 function is available.]) AC_MSG_RESULT([yes]) ;; no)@@ -53,8 +53,8 @@ case "$ac_res" in *) eval "ac_cv_func_$1=yes" eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes"- AC_DEFINE_UNQUOTED($ac_tr_func)- AC_DEFINE_UNQUOTED($ac_tr_lib)+ AC_DEFINE_UNQUOTED($ac_tr_func, 1, [Define if you have the $1 function.])+ AC_DEFINE_UNQUOTED($ac_tr_lib, 1, [Define if you have the $2 library.]) AC_MSG_RESULT([yes, in $ac_res]) ;; esac