public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Richard Sandiford <rsandifo@redhat.com>
To: gcc-patches@gcc.gnu.org
Cc: java-patches@gcc.gnu.org, libstdc++@gcc.gnu.org,
	binutils@sources.redhat.com, gdb-patches@sources.redhat.com
Subject: Add config/gxx-include-dir.m4 (patch 3/4 for PR 7305)
Date: Thu, 25 Nov 2004 20:54:00 -0000	[thread overview]
Message-ID: <87act5ejl0.fsf@redhat.com> (raw)
In-Reply-To: <87is7tejx4.fsf@redhat.com> (Richard Sandiford's message of "Thu, 25 Nov 2004 20:46:31 +0000")

Following up from: http://gcc.gnu.org/ml/gcc-patches/2004-11/msg02185.
this patch adds a new config/gxx-include-dir.m4 autoconf fragment
and uses it in the top-level configure script.

Bootstrapped & regression tested on i686-pc-linux-gnu in combination
with patches 1 and 2.  I also checked the same things as before.
OK to install?

Richard


	* configure.in: Include config/gxx-include-dir.m4.  Use
	TL_AC_GXX_INCLUDE_DIR.  Remove some now-redundant AC_SUBSTs.
	* configure: Regenerate.

config/
	* gxx-include-dir.m4: New file.

--- configure.in.2	Thu Nov 25 15:36:35 2004
+++ configure.in	Thu Nov 25 17:02:39 2004
@@ -20,6 +20,7 @@
 
 sinclude(config/acx.m4)
 sinclude(config/gcc-version.m4)
+sinclude(config/gxx-include-dir.m4)
 
 AC_INIT(move-if-change)
 AC_PREREQ(2.13)
@@ -1961,22 +1962,7 @@ fi
 target_configargs="--cache-file=./config.cache --host=${target_alias} --build=${build_alias} ${target_configargs}"
 
 # provide a proper gxx_include_dir.
-# Note, if you change the default, make sure to fix both here and in
-# the gcc and libstdc++-v3 subdirectories.
-# Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
-case "${with_gxx_include_dir}" in
-  yes)
-    AC_MSG_ERROR([--with-gxx-include-dir=[[dir]] requires a directory])
-    ;;
-  no | "")
-    case "${enable_version_specific_runtime_libs}" in
-      yes) gxx_include_dir='${libsubdir}/include/c++' ;;
-      *)
-	libstdcxx_incdir=c++/${gcc_version}
-        gxx_include_dir='${prefix}/include/'${libstdcxx_incdir} ;;
-    esac ;;
-  *) gxx_include_dir=${with_gxx_include_dir} ;;
-esac
+TL_AC_GXX_INCLUDE_DIR
 
 FLAGS_FOR_TARGET=
 case " $target_configdirs " in
@@ -2154,8 +2140,6 @@ AC_SUBST(gcc_version)
 AC_SUBST(tooldir)
 AC_SUBST(build_tooldir)
 AC_SUBST(GDB_TK)
-AC_SUBST(gxx_include_dir)
-AC_SUBST(libstdcxx_incdir)
 
 # Build module lists & subconfigure args.
 AC_SUBST(build_configargs)
diff -u /dev/null config/gxx-include-dir.m4
--- /dev/null	Fri Apr 23 00:21:55 2004
+++ config/gxx-include-dir.m4	Thu Nov 25 17:02:22 2004
@@ -0,0 +1,26 @@
+dnl Usage: TL_AC_GXX_INCLUDE_DIR
+dnl
+dnl Set $gxx_include_dir to the location of the installed C++ include
+dnl directory.  The value depends on $gcc_version and the configuration
+dnl options --with-gxx-include-dir and --enable-version-specific-runtime-libs.
+dnl
+dnl If you change the default here, you'll need to change the gcc and
+dnl libstdc++-v3 subdirectories too.
+AC_DEFUN([TL_AC_GXX_INCLUDE_DIR],
+[
+case "${with_gxx_include_dir}" in
+  yes)
+    AC_MSG_ERROR([--with-gxx-include-dir=[[dir]] requires a directory])
+    ;;
+  no | "")
+    case "${enable_version_specific_runtime_libs}" in
+      yes) gxx_include_dir='${libsubdir}/include/c++' ;;
+      *)
+	libstdcxx_incdir=c++/${gcc_version}
+	gxx_include_dir='${prefix}/include/'${libstdcxx_incdir} ;;
+    esac ;;
+  *) gxx_include_dir=${with_gxx_include_dir} ;;
+esac
+AC_SUBST(gxx_include_dir)
+AC_SUBST(libstdcxx_incdir)
+])

  parent reply	other threads:[~2004-11-25 20:54 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-25 20:47 Factor configure-time gcc version checks (patch 1/4 " Richard Sandiford
2004-11-25 20:50 ` Remove config.if (patch 2/4 " Richard Sandiford
2004-12-02 20:07   ` Alexandre Oliva
2004-11-25 20:54 ` Richard Sandiford [this message]
2004-12-02 20:07   ` Add config/gxx-include-dir.m4 (patch 3/4 " Alexandre Oliva
2004-12-03 10:55     ` Richard Sandiford
2004-11-25 21:05 ` Factor configure-time gcc version checks (patch 1/4 " Zack Weinberg
2004-11-25 21:28   ` Joseph S. Myers
2004-11-26 21:48     ` Zack Weinberg
2004-11-26  9:06   ` Richard Sandiford
2004-11-26 10:37 ` Andrew Haley
2004-12-01 23:08 ` DJ Delorie
2004-12-02 11:22   ` Richard Sandiford
2004-12-02 14:15 ` Richard Sandiford

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87act5ejl0.fsf@redhat.com \
    --to=rsandifo@redhat.com \
    --cc=binutils@sources.redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gdb-patches@sources.redhat.com \
    --cc=java-patches@gcc.gnu.org \
    --cc=libstdc++@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).