X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gdb%2Facx_configure_dir.m4;h=7a65ffbf7ab740f7b079eb706298dc888d61ec9e;hb=581bea2c99751391fc49d104d5eacb85bfb63c96;hp=57a64a62f49a35c4ba13cfc192e8c6475ed11e98;hpb=c971b7fa72c48b07e3199b76f8d79f3a71c65124;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/acx_configure_dir.m4 b/gdb/acx_configure_dir.m4 index 57a64a62f4..7a65ffbf7a 100644 --- a/gdb/acx_configure_dir.m4 +++ b/gdb/acx_configure_dir.m4 @@ -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 @@ -18,11 +16,14 @@ # 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 \