8218413: make reconfigure ignores configure-time AUTOCONF environment variable
Reviewed-by: erikj, martin
--- a/make/Init.gmk Tue Feb 12 14:23:49 2019 +0100
+++ b/make/Init.gmk Tue Feb 12 15:31:40 2019 +0100
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -277,7 +277,7 @@
else
$(ECHO) "Re-running configure using default settings"
endif
- ( cd $(OUTPUTDIR) && PATH="$(ORIGINAL_PATH)" \
+ ( cd $(OUTPUTDIR) && PATH="$(ORIGINAL_PATH)" AUTOCONF="$(AUTOCONF)" \
CUSTOM_ROOT="$(CUSTOM_ROOT)" \
CUSTOM_CONFIG_DIR="$(CUSTOM_CONFIG_DIR)" \
$(BASH) $(TOPDIR)/configure $(CONFIGURE_COMMAND_LINE) )
--- a/make/autoconf/basics.m4 Tue Feb 12 14:23:49 2019 +0100
+++ b/make/autoconf/basics.m4 Tue Feb 12 15:31:40 2019 +0100
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -406,6 +406,8 @@
[
# Save the original command line. This is passed to us by the wrapper configure script.
AC_SUBST(CONFIGURE_COMMAND_LINE)
+ # AUTOCONF might be set in the environment by the user. Preserve for "make reconfigure".
+ AC_SUBST(AUTOCONF)
# Save the path variable before it gets changed
ORIGINAL_PATH="$PATH"
AC_SUBST(ORIGINAL_PATH)
--- a/make/autoconf/spec.gmk.in Tue Feb 12 14:23:49 2019 +0100
+++ b/make/autoconf/spec.gmk.in Tue Feb 12 15:31:40 2019 +0100
@@ -36,6 +36,9 @@
# A self-referential reference to this file.
SPEC:=@SPEC@
+# Path to autoconf if overriden by the user, to be used by "make reconfigure"
+AUTOCONF := @AUTOCONF@
+
# SPACE and COMMA are defined in MakeBase.gmk, but they are also used in
# some definitions here, and are needed if MakeBase.gmk is not included before
# this file.