This suggests moving the conditional that determines if mini-gmp is used
into scmconfig.h.
* configure.ac: replace PKG_CHECK_MODULES for gmp with AC_LIB_HAVE_LINKFLAGS
Remove ENABLE_MINI_GMP define. Also don't run mpz_inits test for
--enable-mini-gmp.
* libguile/gen-scmconfig.c (main) [ENABLE_MINI_GMP]: replace ENABLE_MINI_GMP
with SCM_I_GSC_ENABLE_MINI_GMP
* libguile/bytevectors.c [ENABLE_MINI_GMP]: replace ENABLE_MINI_GMP
with SCM_ENABLE_MINI_GMP
* libguile/init.c [ENABLE_MINI_GMP]: replace ENABLE_MINI_GMP
with SCM_ENABLE_MINI_GMP
* libguile/numbers.c: include scm.h
[SCM_ENABLE_MINI_GMP]: provide mpz_inits and mpz_clears
[ENABLE_MINI_GMP]: prefer SCM_ENABLE_MINI_GMP to ENABLE_MINI_GMP
* libguile/numbers.h: include scm.h
* libguile/random.c [ENABLE_MINI_GMP]: replace ENABLE_MINI_GMP
with SCM_ENABLE_MINI_GMP
* libguile/socket.c [ENABLE_MINI_GMP]: replace ENABLE_MINI_GMP
with SCM_ENABLE_MINI_GMP
* NEWS: Update.
* am/bootstrap.am (SOURCES):
* module/Makefile.am (SOURCES): Add system/foreign-library.scm.
* configure.ac: Replace ltdl check with -ldl check.
* libguile/dynl.c: Rewrite to just expose core dlopen / dlsym / etc to a
helper Scheme module.
(scm_dynamic_link, scm_dynamic_pointer, scm_dynamic_function)
(scm_dynamic_object_p, scm_dynamic_call): Rewrite in terms of (system
foreign-library).
* libguile/extensions.c (load_extension): Avoid scm_dynamic_call.
* module/system/foreign-library.scm: New file.
* module/oop/goops.scm (<dynamic-object>): Hackily export
<foreign-library> instead of a class here.
* doc/ref/api-foreign.texi (Foreign Function Interface): Rewrite to only
document the new interfaces. Eventually we will deprecate
dynamic-link and friends.
* doc/ref/guile.texi (API Reference): Move Foreign Objects after Foreign
Function Interface. Seems there should be some closer relationship
but this will do for now.
* doc/ref/tour.texi (Putting Extensions into Modules):
* doc/ref/libguile-parallel.texi (Parallel Installations): Update for
rename of Modules and Extensions to Foreign Extensions.
* libguile/deprecated.h:
* libguile/deprecated.c (scm_dynamic_unlink): Deprecate.
* libguile/guile.c: Remove ltdl include.
* test-suite/tests/foreign.test: Update tests to use new API, and update
error expectations.
* configure.ac (AC_CHECK_FUNCS): add mkdtemp! test
* doc/ref/posix.texi: document mkdtemp!
* libguile/filesys.c (scm_mkdtemp_x): new function
* libguile/filesys.h: new declaration for scm_mkdtemp_x
* test-suite/tests/filesys.test: add tests for mkdtemp!
Adapted from a patch by Rob Browning.
The newlib C library (used in Cygwin) has alternative names for
nl_langinfo GNU extensions
* configure.ac (_NL_NUMERIC_GROUPING): new test
* libguile/i18n.c (INT_CURR_SYMBOL, MON_DECIMAL_POINT, MON_THOUSANDS_SEP)
(MON_GROUPING, POSITIVE_SIGN, NEGATIVE_SIGN, GROUPING, INT_FRAC_DIGITS)
(FRAC_DIGITS, P_CS_PRECEDES, P_SEP_BY_SPACE, N_CS_PRECEDES, N_SEP_BY_SPACE)
(P_SIGN_POSN, N_SIGN_POSN, INT_P_CS_PRECEDES, INT_P_SEP_BY_SPACE)
(INT_N_CS_PRECEDES, INT_N_SEP_BY_SPACE, INT_P_SIGN_POSN, INT_N_SIGN_POSN)
[HAVE_DECL__NL_NUMERIC_GROUPING]: map to newlib C constants, when present
The newlib C library (used in Cygwin) has alternative names for
nl_langinfo GNU extensions
* configure.ac (_NL_NUMERIC_GROUPING): new test
* libguile/i18n.c (INT_CURR_SYMBOL, MON_DECIMAL_POINT, MON_THOUSANDS_SEP)
(MON_GROUPING, POSITIVE_SIGN, NEGATIVE_SIGN, GROUPING, INT_FRAC_DIGITS)
(FRAC_DIGITS, P_CS_PRECEDES, P_SEP_BY_SPACE, N_CS_PRECEDES, N_SEP_BY_SPACE)
(P_SIGN_POSN, N_SIGN_POSN, INT_P_CS_PRECEDES, INT_P_SEP_BY_SPACE)
(INT_N_CS_PRECEDES, INT_N_SEP_BY_SPACE, INT_P_SIGN_POSN, INT_N_SIGN_POSN)
[HAVE_DECL__NL_NUMERIC_GROUPING]: map to newlib C constants, when present
* libguile/jit.c: Wrap the whole thing in ENABLE_JIT.
* libguile/threads.c (on_thread_exit):
* libguile/vm.c (scm_call_n):
* libguile/init.c (scm_i_init_guile):
* libguile/vm-engine.c (VM_NAME): Wrap calls into jit.c with ENABLE_JIT.
* configure.ac: Move up AC_CANONICAL_TARGET, as autoconf was complaining
about it coming after AC_ARG_PROGRAM.
* acinclude.m4 (GUILE_ENABLE_JIT): Fix to honor --enable-jit arg.
* configure.ac (POTENTIAL_GCC_CFLAGS): Remove -Wswitch-enum, which
requires that switch statements mention all enumerated values, even if
there is a default clause. Note that -Wall enables -Wswitch, which is
the same except it's silent if there's a default clause. The reason
is that lightning has a number of switches like this.
* module/ice-9/command-line.scm (version-etc): Change #:copyright-year
to 2018.
* doc/ref/guile.texi: Add 2017 and 2018 to the copyright years.
* configure.ac (GUILE_CONFIGURE_COPYRIGHT): Add 2018.
* configure.ac: Remove checks for stdint.h; we require C99 so it must be
there; and in any case for our purposes we use gnulib, so it will be
there. No need to check for inttypes.h. No need to check for what
type maps to e.g. uint32_t either.
* libguile/deprecated.h (SCM_HAVE_T_INT64, SCM_HAVE_T_UINT64): Deprecate
these, as they are always 1.
(SCM_HAVE_ARRAYS): Likewise deprecate; it's always 1.
* libguile/gen-scmconfig.c: Always include stdint.h and stddef.h, and
make it so that scmconfig.h also includes these. Use C99 types.
* libguile/gen-scmconfig.h.in: Remove configure-substed vars that are no
longer defined.
As the FSF advises, 'There is no legal significance to using the
three-character sequence “(C)”, but it does no harm.' It does take up
space though! For that reason, we remove it here from our C files.
* configure.ac: Add a check for struct GC_stack_base.reg_base, which is
a proxy for checking for the only aspect of ia64 that we care about.
* libguile/gen-scmconfig.c:
* libguile/gen-scmconfig.h.in: Arrange to define
SCM_HAVE_AUXILIARY_STACK.
* configure.ac: Check for GC_is_heap_ptr, added after libgc 7.2.
* libguile/pairs.h (GC_is_heap_ptr): Define a shim for GC_is_heap_ptr,
inside BUILDING_LIBGUILE so as not to expose it to users.
* configure.ac: Use detected endianness and word size to automatically
select which set of prebuilt binaries to use.
* meta/build-env.in (top_builddir):
* meta/uninstalled-env.in (top_builddir): Update to use
SCM_PREBUILT_BINARIES for prebuilt entry in GUILE_LOAD_COMPILED_PATH.
* prebuilt/32-bit-big-endian:
* prebuilt/32-bit-little-endian:
* prebuilt/64-bit-little-endian: New links.
* prebuilt/x86_64-pc-linux-gnu: Remove this link now that it's unneeded.
* configure.ac: Check for __sincos.
* libguile/numbers.c (scm_c_make_polar): Fall back to __sincos if
possible. Fixes zero signedness of make-polar on macOS.
* libguile/filesys.c:
* configure.ac: Remove readdir_r / readdir64_r checks and usage.
glibc's impls are thread-safe, the _r variants are squirrely and now
deprecated in glibc, and it is expected that POSIX will mandate that
readdir{,64} be thread-safe already. See
https://sourceware.org/ml/libc-alpha/2016-02/msg00093.html.
* configure.ac: Add -std=gnu11 if the compiler is GCC (or clang). This
prevents AC_PROG_CC_C99 from downgrading us by adding -std=gnu99.
Fixes regression whereby we were always using the fallback
implementation of atomics.
* configure.ac: Require C99 or later. Emacs does, therefore so can
we. Note that by default GCC compiles in "gnu11" mode these days, and
this declaration doesn't change that.
* configure.ac: Check for getuid, getgid, setuid, and setgid.
* libguile/posix.c (scm_getuid, scm_getgid, scm_setuid, scm_setgid):
Only provide Scheme functions if the OS provides these facilities.
(scm_geteuid, scm_getegid, scm_seteuid, scm_setegid): Provide if the
host has getuid, getgid, etc, instead of being in a MinGW guard.
Based on a patch by Andy Stormont <astormont@racktopsystems.com>.
* configure.ac: Check for strtod_l.
* libguile/i18n.c (scm_locale_string_to_integer): Fix style.
(scm_locale_string_to_inexact): Check for strtod_l.
* am/bootstrap.am: New file, factored out of bootstrap/Makefile.am.
* bootstrap/Makefile.am: Use bootstrap.am.
* prebuilt/Makefile.am:
* prebuilt/i686-pc-linux-gnu/Makefile.am:
* prebuilt/mips-unknown-linux-gnu/Makefile.am:
* prebuilt/x86_64-unknown-linux-gnu/Makefile.am: New files.
* configure.ac: Output the prebuilt/ makefiles.
* Makefile.am: Descend into prebuilt/ when making dist.
* meta/uninstalled-env.in: Arrange to put prebuilt/ in the beginning of
the GUILE_LOAD_COMPILED_PATH. Also fix a case where bootstrap/ wasn't
being correctly added to the load path.
This reduces total build time to around 30 minutes or so.
* Makefile.am (SUBDIRS): Visit bootstrap/ before module/.
* bootstrap/Makefile.am: New file.
* configure.ac: Generate bootstrap/Makefile.
* meta/uninstalled-env.in (top_builddir): Add bootstrap/ to the
GUILE_LOAD_COMPILED_PATH.
* module/Makefile.am: Simplify to just sort files in alphabetical order;
since bootstrap/ was already compiled, we don't need to try to
optimize compilation order. Although the compiler will get faster as
more of the compiler itself is optimized, this isn't a significant
enough effect to worry about.