OSF/1 "cc -nodtk" does not support #include_next.
[gnulib.git] / build-aux / bootstrap
index eadf9f5..c028967 100755 (executable)
@@ -103,6 +103,8 @@ gnulib_extra_files="
        $build_aux/config.sub
        doc/INSTALL
 "
+# Additional gnulib-tool options to use.  Use "\newline" to break lines.
+gnulib_tool_option_extras=
 
 # Other locale categories that need message catalogs.
 EXTRA_LOCALE_CATEGORIES=
@@ -169,11 +171,15 @@ insert_sorted_if_absent() {
 }
 
 # Die if there is no AC_CONFIG_AUX_DIR($build_aux) line in configure.ac.
-grep '^[        ]*AC_CONFIG_AUX_DIR('$build_aux')' configure.ac >/dev/null ||
-  {
-    echo "$0: expected line not found in configure.ac. Add the following:" >&2
-    echo "  AC_CONFIG_AUX_DIR($build_aux)" >&2.
-  }
+found_aux_dir=no
+grep '^[        ]*AC_CONFIG_AUX_DIR(\['"$build_aux"'\])' configure.ac \
+    >/dev/null && found_aux_dir=yes
+grep '^[        ]*AC_CONFIG_AUX_DIR('"$build_aux"')' configure.ac \
+    >/dev/null && found_aux_dir=yes
+if test $found_aux_dir = no; then
+  echo "$0: expected line not found in configure.ac. Add the following:" >&2
+  echo "  AC_CONFIG_AUX_DIR([$build_aux])" >&2.
+fi
 
 # If $build_aux doesn't exist, create it now, otherwise some bits
 # below will malfunction.  If creating it, also mark it as ignored.
@@ -456,6 +462,7 @@ gnulib_tool_options="\
  --source-base $bt/lib/\
  --tests-base $bt/tests\
  --local-dir gl\
+$gnulib_tool_option_extras\
 "
 echo "$0: $gnulib_tool $gnulib_tool_options --import ..."
 $gnulib_tool $gnulib_tool_options --import $gnulib_modules &&