8210150: Allow custom-hook.m4 to include files from CUSTOM_CONFIG_DIR
authorihse
Thu, 30 Aug 2018 08:15:10 +0200
changeset 51585 c25f6c562bf5
parent 51584 d395677d99f3
child 51586 eaa569eeb856
8210150: Allow custom-hook.m4 to include files from CUSTOM_CONFIG_DIR Reviewed-by: erikj
make/autoconf/configure
--- a/make/autoconf/configure	Wed Aug 29 20:13:53 2018 -0700
+++ b/make/autoconf/configure	Thu Aug 30 08:15:10 2018 +0200
@@ -122,14 +122,18 @@
   if test "x$CUSTOM_CONFIG_DIR" != x; then
     # Generate configure script with custom hooks compiled in.
     custom_patcher='sed -e "s|#CUSTOM_AUTOCONF_INCLUDE|m4_include([$custom_hook])|"'
+    custom_script_dir_include="-I$CUSTOM_CONFIG_DIR"
   else
     custom_patcher='cat'
+    custom_script_dir_include=""
   fi
 
   mkdir -p $build_support_dir
   # Call autoconf but replace the "magic" variable in configure.ac if requested.
+
   cat $conf_script_dir/configure.ac | eval $custom_patcher | \
-      ${AUTOCONF} -W all -I$conf_script_dir - > $generated_script
+      ${AUTOCONF} -W all $custom_script_dir_include -I$conf_script_dir - \
+      > $generated_script
   rm -rf autom4te.cache
 
   # Sanity check