summaryrefslogtreecommitdiff
path: root/config/gxx-include-dir.m4
diff options
context:
space:
mode:
authorRichard Sandiford <rsandifo@nildram.co.uk>2004-12-03 10:47:07 +0000
committerRichard Sandiford <rsandifo@nildram.co.uk>2004-12-03 10:47:07 +0000
commit188f45a1fbc0811b3581f58550bfd0073deb2e6f (patch)
tree6beaee701da5b1075645d6fe7cdfb5f101393f56 /config/gxx-include-dir.m4
parenta3ef41aa6def8e64b092915ae9612a3e7677b588 (diff)
downloadgdb-188f45a1fbc0811b3581f58550bfd0073deb2e6f.tar.gz
Introduce config/gxx-include-dir.m4.
Diffstat (limited to 'config/gxx-include-dir.m4')
-rw-r--r--config/gxx-include-dir.m426
1 files changed, 26 insertions, 0 deletions
diff --git a/config/gxx-include-dir.m4 b/config/gxx-include-dir.m4
new file mode 100644
index 00000000000..87a65adaa38
--- /dev/null
+++ b/config/gxx-include-dir.m4
@@ -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)
+])