-
Notifications
You must be signed in to change notification settings - Fork 378
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Autoconf 2.71 #3804
Autoconf 2.71 #3804
Conversation
91f19f9
to
3dcdb13
Compare
FTR: Apologies for the force-push noise, I had messed up my local repo for a moment. |
I saw this on an older system:
So maybe I misread the documentation? |
So it seems we need to keep |
2ccdd72
to
e65a9d9
Compare
Again back to draft status. I am not so sure about the |
varnish.m4
Outdated
@@ -145,15 +145,17 @@ AC_DEFUN([_VARNISH_VMOD_LDFLAGS], [ | |||
# _VARNISH_VMOD_CONFIG | |||
# -------------------- | |||
AC_DEFUN([_VARNISH_VMOD_CONFIG], [ | |||
dnl Check the VMOD toolchain | |||
AC_USE_SYSTEM_EXTENSIONS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dridi could I please ask for your advice / opinion about this aspect?
To avoid issues with API headers accidentally making use of GNU/POSIX extensions, I would think that we should also, by default, enable them for vmods.
Yet with a sane vmod configure.ac
like the one from a certain development kit, this will lead to the following warnings:
configure.ac:22: warning: AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS
aclocal.m4:9533: _VARNISH_VMOD_CONFIG is expanded from...
aclocal.m4:9579: _VARNISH_VMOD is expanded from...
aclocal.m4:9763: VARNISH_VMODS is expanded from...
configure.ac:22: the top level
configure.ac:22: warning: AC_LINK_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS
aclocal.m4:9533: _VARNISH_VMOD_CONFIG is expanded from...
aclocal.m4:9579: _VARNISH_VMOD is expanded from...
aclocal.m4:9763: VARNISH_VMODS is expanded from...
configure.ac:22: the top level
configure.ac:22: warning: AC_CHECK_INCLUDES_DEFAULT was called before AC_USE_SYSTEM_EXTENSIONS
aclocal.m4:9533: _VARNISH_VMOD_CONFIG is expanded from...
aclocal.m4:9579: _VARNISH_VMOD is expanded from...
aclocal.m4:9763: VARNISH_VMODS is expanded from...
configure.ac:22: the top level
In turn, those can be avoided by the following change to call the VARNISH_*
macros before any compiler/linker related macros
diff --git a/configure.ac b/configure.ac
index 178f2e9..2d9e75c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6,10 +6,6 @@ AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE([1.12 -Wall -Werror foreign parallel-tests])
AM_SILENT_RULES([yes])
-AM_PROG_AR
-
-LT_PREREQ([2.2.6])
-LT_INIT([dlopen disable-static])
AC_ARG_WITH([rst2man],
AS_HELP_STRING(
@@ -21,6 +17,11 @@ AC_ARG_WITH([rst2man],
VARNISH_PREREQ([6.0.0])
VARNISH_VMODS([test])
+AM_PROG_AR
+
+LT_PREREQ([2.2.6])
+LT_INIT([dlopen disable-static])
+
AC_CONFIG_FILES([
Makefile
src/Makefile
but I am not sure if this is the best option.
In I don't think we can should call For c99 detection we should probably do something like: # Check for c99, remove the unset case when AC_PREREQ >= 2.70
ac_prog_cc_stdc=unset
AC_PROG_CC
AS_CASE([$ac_prog_cc_stdc],
[no|c89], [AC_MSG_ERROR([Support for c99 or later is required])],
[unset], [AC_PROG_CC_C99]) Just calling Regarding the autoconf archive, I think we are still better off bundling only the things we care about. |
Working in tandem with varnishcache/varnish-cache#3804 We should add AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) to varnish.m4. With this change, vcdk generated configure scripts will emit these warnings: configure.ac:22: warning: AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS aclocal.m4:445: _VARNISH_VMOD_CONFIG is expanded from... aclocal.m4:491: _VARNISH_VMOD is expanded from... aclocal.m4:675: VARNISH_VMODS is expanded from... configure.ac:22: the top level configure.ac:22: warning: AC_LINK_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS aclocal.m4:445: _VARNISH_VMOD_CONFIG is expanded from... aclocal.m4:491: _VARNISH_VMOD is expanded from... aclocal.m4:675: VARNISH_VMODS is expanded from... configure.ac:22: the top level configure.ac:22: warning: AC_CHECK_INCLUDES_DEFAULT was called before AC_USE_SYSTEM_EXTENSIONS aclocal.m4:445: _VARNISH_VMOD_CONFIG is expanded from... aclocal.m4:491: _VARNISH_VMOD is expanded from... aclocal.m4:675: VARNISH_VMODS is expanded from... configure.ac:22: the top level We thus move the respective macros until after implied expansion of _VARNISH_VMOD_CONFIG.
re @dridi
I have force-pushed the branch accordingly after testing with autoconf 2.71 and 2.69 |
19b0489
to
4359863
Compare
a28d3ab
to
b238845
Compare
b238845
to
68eb28f
Compare
Friendly ping to @dridi |
2ace568
to
19b19d1
Compare
07c6669
to
004facd
Compare
468477b
to
ffd4754
Compare
374df0c
to
9947fe2
Compare
de6f65b
to
7aad55b
Compare
9b1dc99
to
07a7b6e
Compare
b657681
to
68a4fc5
Compare
... except for ax_with_curses.m4 which requires PKG_CHECK_EXISTS which, apparently, cci does not have should we consider again to not have them and rather require autoconf-archive be installed?
this is required for autoconf 2.71, but I have kept the required version at 2.69 and tested that the changes are compatible. Most of the changes come from autoupdate, with this change: AC_PROG_CC_STDC is obsolete, but older autoconf versions do not set the highest possible c standard. So we keep AC_PROG_CC_C99 because we actually require c99, while AC_PROG_CC_STDC could fall back to c89 For varnish.m4, we should apply the same canonical settings as for varnishd itself
68a4fc5
to
471f988
Compare
The first commit just pulls in macros from autoconf-archive 2.71
The second commit renovated
configure.ac
for compatibility with both 2.71 and 2.69, which is kept the minimum in order to not cause too much of a stir.