hppa: Really fix g++.dg/modules/bad-mapper-1.C on hpux
[official-gcc.git] / libphobos / m4 / gcc_support.m4
blobcc1acb4a23034463716f063b5c8b443a09cc4eeb
2 # Contains macros to allow building libphobos as part of GCC.
3 # This includes macros to locate directories and do configure checks
4 # without an installed libdruntime.
8 # PHOBOS_ABS_SRCDIR
9 # -----------------
10 # Find absolute top level source directory and set phobos_cv_abs_srcdir
11 AC_DEFUN([PHOBOS_ABS_SRCDIR], [
12   dnl Not sure if 100% portable, but we need the absolute dir as the _LT_COMPILER_C_O
13   dnl test changes the directory
14   AC_CACHE_CHECK([[for absolute libphobos source path]],
15     [[phobos_cv_abs_srcdir]],
16     [[phobos_cv_abs_srcdir=`cd $srcdir && pwd`]])
17     AS_IF([[test -d "$phobos_cv_abs_srcdir"]],
18       [],
19       [AC_MSG_ERROR([[can't find absolute libphobos source path]])])
23 # WITH_LOCAL_DRUNTIME(CALL, EXTRAFLAGS)
24 # -------------------------------------
25 # Execute CALL with GDCFLAGS adjusted to use the local druntime includes.
26 # Flags contains extra arguments to append to GDCFLAGS (e.g. -nophoboslib).
27 AC_DEFUN([WITH_LOCAL_DRUNTIME], [
28   AC_REQUIRE([PHOBOS_ABS_SRCDIR])
29   gdc_save_DFLAGS=$GDCFLAGS
30   GDCFLAGS="-fno-druntime -nostdinc -I $phobos_cv_abs_srcdir/libdruntime $2 $GDCFLAGS"
31   $1
32   GDCFLAGS=$gdc_save_DFLAGS