gcc/libphobos/m4/druntime.m4
Iain Buclaw bbb0de4a4a libphobos: Remove --enable-druntime-gc configure option.
This is yet another old option that would have been somewhat useful back
before the D front-end implementation was able to support compiling
without the Druntime library.

Now however, -fno-druntime makes the gcstub package redundant, so the
option has been removed, along with the package itself.

libphobos/ChangeLog:

	* configure: Regenerate.
	* libdruntime/Makefile.am (ALL_DRUNTIME_INSTALL_DSOURCES): Remove
	DRUNTIME_DSOURCES_GC and DRUNTIME_DSOURCES_GCSTUB.
	(DRUNTIME_DSOURCES): Add gc/*.d sources.
	(DRUNTIME_DSOURCES_GC): Remove.
	(DRUNTIME_DSOURCES_GCSTUB): Remove.
	* libdruntime/Makefile.in: Regenerate.
	* libdruntime/gcstub/gc.d: Remove.
	* m4/druntime.m4 (DRUNTIME_GC): Remove.
2020-04-09 17:07:43 +02:00

119 lines
3.6 KiB
Plaintext

#
# Contains some unsorted druntime utility macros.
#
# DRUNTIME_WERROR
# ---------------
# Check to see if -Werror is enabled.
AC_DEFUN([DRUNTIME_WERROR],
[
AC_ARG_ENABLE(werror, [AS_HELP_STRING([--enable-werror],
[turns on -Werror @<:@default=no@:>@])])
WERROR_FLAG=""
if test "x$enable_werror" = "xyes"; then
WERROR_FLAG="-Werror"
fi
])
# DRUNTIME_CONFIGURE
# ------------------
# Substitute absolute paths for srcdir and builddir.
AC_DEFUN([DRUNTIME_CONFIGURE],
[
# These need to be absolute paths, yet at the same time need to
# canonicalize only relative paths, because then amd will not unmount
# drives. Thus the use of PWDCMD: set it to 'pawd' or 'amq -w' if using amd.
libphobos_builddir=`${PWDCMD-pwd}`
case $srcdir in
[\\/$]* | ?:[\\/]*) libphobos_srcdir=${srcdir} ;;
*) libphobos_srcdir=`cd "$srcdir" && ${PWDCMD-pwd} || echo "$srcdir"` ;;
esac
AC_SUBST(libphobos_builddir)
AC_SUBST(libphobos_srcdir)
])
# DRUNTIME_MULTILIB
# -----------------
# Prepare the multilib_arg variable
AC_DEFUN([DRUNTIME_MULTILIB],
[
if test ${multilib} = yes; then
multilib_arg="--enable-multilib"
else
multilib_arg=
fi
])
# DRUNTIME_INSTALL_DIRECTORIES
# ----------------------------
# Setup various install directories for headers.
# Add the cross-host option and substitute the libphobos_toolexecdir
# libphobos_toolexeclibdir and gdc_include_dir variables.
AC_DEFUN([DRUNTIME_INSTALL_DIRECTORIES],
[
AC_REQUIRE([AC_PROG_GDC])
AC_MSG_CHECKING([D GCC version])
gcc_version=`eval $get_gcc_base_ver $srcdir/../gcc/BASE-VER`
AC_MSG_RESULT($gcc_version)
AC_SUBST(gcc_version)
AC_ARG_WITH([cross-host],
AC_HELP_STRING([--with-cross-host=HOST],
[configuring with a cross compiler]))
libphobos_toolexecdir=no
libphobos_toolexeclibdir=no
AC_MSG_CHECKING([for --enable-version-specific-runtime-libs])
AC_ARG_ENABLE([version-specific-runtime-libs],
AC_HELP_STRING([--enable-version-specific-runtime-libs],
[Specify that runtime libraries should be installed in a compiler-specific directory]),
[case "$enableval" in
yes) version_specific_libs=yes ;;
no) version_specific_libs=no ;;
*) AC_MSG_ERROR([Unknown argument to enable/disable version-specific libs]);;
esac],
[version_specific_libs=no])
AC_MSG_RESULT($version_specific_libs)
GCC_WITH_TOOLEXECLIBDIR
# Version-specific runtime libs processing.
if test $version_specific_libs = yes; then
libphobos_toolexecdir='${libdir}/gcc/${host_alias}'
libphobos_toolexeclibdir='${toolexecdir}/${gcc_version}$(MULTISUBDIR)'
else
# Calculate libphobos_toolexecdir, libphobos_toolexeclibdir
# Install a library built with a cross compiler in tooldir, not libdir.
if test -n "$with_cross_host" && test x"$with_cross_host" != x"no"; then
libphobos_toolexecdir='${exec_prefix}/${host_alias}'
case ${with_toolexeclibdir} in
no)
libphobos_toolexeclibdir='${toolexecdir}/lib'
;;
*)
libphobos_toolexeclibdir=${with_toolexeclibdir}
;;
esac
else
libphobos_toolexecdir='${libdir}/gcc/${host_alias}'
libphobos_toolexeclibdir='${libdir}'
fi
multi_os_directory=`$GDC -print-multi-os-directory`
case $multi_os_directory in
.) ;; # Avoid trailing /.
*) libphobos_toolexeclibdir=${libphobos_toolexeclibdir}/${multi_os_directory} ;;
esac
fi
AC_SUBST(libphobos_toolexecdir)
AC_SUBST(libphobos_toolexeclibdir)
# Default case for install directory for D sources files.
gdc_include_dir='$(libdir)/gcc/${target_alias}/${gcc_version}/include/d'
AC_SUBST(gdc_include_dir)
])