1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-11 22:31:12 +02:00

Add the `%host-type' global variable.

* configure.ac: Define `HOST_TYPE'.

* libguile/load.c (sys_host_type): New variable.

* doc/ref/api-options.texi (Build Config): Document `%host-type'.
This commit is contained in:
Ludovic Courtès 2009-09-18 11:40:03 +02:00
parent 5b87844575
commit d7a2207326
3 changed files with 16 additions and 1 deletions

View file

@ -86,6 +86,9 @@ AM_CONDITIONAL(HAVE_MAKEINFO, test "$have_makeinfo" = yes)
AM_PATH_LISPDIR
AC_DEFINE_UNQUOTED([HOST_TYPE], ["$host"],
[Define to the host's GNU triplet.])
#--------------------------------------------------------------------
#
# User options (after above tests that may set default CFLAGS etc.)

View file

@ -1,6 +1,6 @@
@c -*-texinfo-*-
@c This is part of the GNU Guile Reference Manual.
@c Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2008
@c Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2008, 2009
@c Free Software Foundation, Inc.
@c See the file guile.texi for copying conditions.
@ -178,6 +178,14 @@ libguile/libpath.h, which is completely generated, so deleting this file
before a build guarantees up-to-date values for that build.
@end defvar
@cindex GNU triplet
@cindex canonical host type
@defvar %host-type
The canonical host type (GNU triplet) of the host Guile was configured
for, e.g., @code{"x86_64-unknown-linux-gnu"} (@pxref{Canonicalizing,,,
autoconf, The GNU Autoconf Manual}).
@end defvar
@node Feature Tracking
@subsection Feature Tracking

View file

@ -778,6 +778,10 @@ scm_c_primitive_load_path (const char *filename)
/* Information about the build environment. */
SCM_VARIABLE_INIT (sys_host_type, "%host-type",
scm_from_locale_string (HOST_TYPE));
/* Initialize the scheme variable %guile-build-info, based on data
provided by the Makefile, via libpath.h. */
static void