re PR ada/88191 (ada bootstrap failure on alpha-linux-gnu ("SIGSYS" not declared...
[official-gcc.git] / libphobos / m4 / gcc_support.m4
blob0903ed4b45febc2eed17e9aac62caed12b34c83b
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-moduleinfo -nostdinc -I $phobos_cv_abs_srcdir/libdruntime $2 $GDCFLAGS"
31   $1
32   GDCFLAGS=$gdc_save_DFLAGS