xref: /openbsd-src/gnu/usr.bin/binutils-2.17/config/gxx-include-dir.m4 (revision 3d8817e467ea46cf4772788d6804dd293abfb01a)
1*3d8817e4Smioddnl Usage: TL_AC_GXX_INCLUDE_DIR
2*3d8817e4Smioddnl
3*3d8817e4Smioddnl Set $gxx_include_dir to the location of the installed C++ include
4*3d8817e4Smioddnl directory.  The value depends on $gcc_version and the configuration
5*3d8817e4Smioddnl options --with-gxx-include-dir and --enable-version-specific-runtime-libs.
6*3d8817e4Smioddnl
7*3d8817e4Smioddnl If you change the default here, you'll need to change the gcc and
8*3d8817e4Smioddnl libstdc++-v3 subdirectories too.
9*3d8817e4SmiodAC_DEFUN([TL_AC_GXX_INCLUDE_DIR],
10*3d8817e4Smiod[
11*3d8817e4Smiodcase "${with_gxx_include_dir}" in
12*3d8817e4Smiod  yes)
13*3d8817e4Smiod    AC_MSG_ERROR([--with-gxx-include-dir=[[dir]] requires a directory])
14*3d8817e4Smiod    ;;
15*3d8817e4Smiod  no | "")
16*3d8817e4Smiod    case "${enable_version_specific_runtime_libs}" in
17*3d8817e4Smiod      yes) gxx_include_dir='$(libsubdir)/include/c++' ;;
18*3d8817e4Smiod      *)
19*3d8817e4Smiod	libstdcxx_incdir='c++/$(gcc_version)'
20*3d8817e4Smiod	gxx_include_dir='$(prefix)/include/$(libstdcxx_incdir)' ;;
21*3d8817e4Smiod    esac ;;
22*3d8817e4Smiod  *) gxx_include_dir=${with_gxx_include_dir} ;;
23*3d8817e4Smiodesac
24*3d8817e4SmiodAC_SUBST(gxx_include_dir)
25*3d8817e4SmiodAC_SUBST(libstdcxx_incdir)
26*3d8817e4Smiod])
27