Add dwarf2_per_objfile parameter to free_one_cached_comp_unit
[deliverable/binutils-gdb.git] / gdb / acx_configure_dir.m4
index 57a64a62f49a35c4ba13cfc192e8c6475ed11e98..7a65ffbf7ab740f7b079eb706298dc888d61ec9e 100644 (file)
@@ -1,12 +1,10 @@
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Free Software
-# Foundation, Inc.
+# Copyright (C) 1992-2020 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation gives
 # unlimited permission to copy and/or distribute it, with or without
 # modifications, as long as this notice is preserved.
 
-# ACX_CONFIGURE_DIR(SRC-DIR-NAME, BUILD-DIR-NAME)
+# ACX_CONFIGURE_DIR(SRC-DIR-NAME, BUILD-DIR-NAME, EXTRA-ARGS)
 # ---------------------------
 #
 # Configure a subdirectory.  This is an alternative to
 # Inputs:
 #   - SRC-DIR-NAME is the source directory, relative to $srcdir.
 #   - BUILD-DIR-NAME is `top-build -> build'
+#   - EXTRA-ARGS is an optional list of extra arguments to add
+#     at the end of the configure command.
 
 AC_DEFUN([ACX_CONFIGURE_DIR],
 [
   in_src=$1
   in_build=$2
+  in_extra_args=$3
 
   # Remove --cache-file, --srcdir, and --disable-option-checking arguments
   # so they do not pile up.
@@ -89,7 +90,12 @@ AC_DEFUN([ACX_CONFIGURE_DIR],
   _AS_ECHO([$ac_msg])
   AS_MKDIR_P(["$ac_dir"])
 
-  ac_srcdir=../$srcdir/$in_src
+  case $srcdir in
+  [[\\/]]* | ?:[[\\/]]* )
+    ac_srcdir=$srcdir/$in_src ;;
+  *) # Relative name.
+    ac_srcdir=../$srcdir/$in_src ;;
+  esac
 
   cd "$ac_dir"
 
@@ -102,6 +108,11 @@ AC_DEFUN([ACX_CONFIGURE_DIR],
     ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
   esac
 
+  if test -n "$in_extra_args"; then
+    # Add the extra args at the end.
+    ac_sub_configure_args="$ac_sub_configure_args $in_extra_args"
+  fi
+
   AC_MSG_NOTICE([running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir])
   # The eval makes quoting arguments work.
   eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
This page took 0.023585 seconds and 4 git commands to generate.