1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 03:40:34 +02:00
Commit graph

207 commits

Author SHA1 Message Date
Andy Wingo
ce9169804e Fix --disable-jit compilation
* 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.
2018-09-17 09:28:41 +02:00
Andy Wingo
07a787dc87 Remove -Wswitch-enum from compile flags
* 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.
2018-07-03 10:32:24 +02:00
Andy Wingo
2d84803884 Wire JIT availability check into Guile configure
* acinclude.m4 (GUILE_ENABLE_JIT): Add missing AC_CANONICAL_TARGET.
* configure.ac: Add check if JIT is available.
2018-07-02 10:47:15 +02:00
Andy Wingo
5e5afde06f Start to use C99 stdint in gen-scmconfig
* 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.
2018-06-21 08:08:58 +02:00
Andy Wingo
1234bb1850 Update license notices in all C files
Update to newest recommended license notices from the FSF.  Everything
stays LGPLv3+ except guile-readline which is GPLv3+.
2018-06-20 20:07:34 +02:00
Andy Wingo
791eb0c01a Remove (C) from copyright statements
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.
2018-06-20 19:17:06 +02:00
Andy Wingo
08fd826d0c Require C99 to build Guile
* configure.ac: Refactor check to require C99, not just try to get C99.
2018-06-17 21:54:59 +02:00
Andy Wingo
574f67d1b6 Add configure check for auxiliary stacks
* 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.
2018-06-17 13:41:03 +02:00
Andy Wingo
40df57a8a2 Restore libgc 7.2 compatibility
* 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.
2017-04-20 10:40:07 +02:00
Andy Wingo
18cac76be8 Add --with-bdw-gc and update README
* README: Update to 2.2.  Add instructions for FreeBSD based on notes
  from Matt Wette.
* configure.ac: Add --with-bdw-gc argument.
2017-04-19 16:19:05 +02:00
Ludovic Courtès
9098c216e1 build: Compress with lzip too.
* configure.ac: Add 'dist-lzip' Automake option.
2017-03-14 15:54:09 +01:00
Andy Wingo
c50c3a47b3 configure detects which set of prebuilt binaries to use
* 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.
2017-03-14 09:49:17 +01:00
Mike Gran
70cfabd7e8 Check for working profiling and virtual itimers
* configure.ac (HAVE_USABLE_GETITIMER_PROF, HAVE_USABLE_GETITIMER_VIRTUAL): new tests
* doc/ref/posix.texi (setitimer, getitimer): document provided? 'ITIMER_VIRTUAL and 'ITIMER_PROF
* doc/ref/statprof.texi (statprof): document ITIMER_PROF requirements
* libguile/scmsigs.c (scm_setitimer, scm_getitimer): document (provided? 'ITIMER_VIRTUAL) and (provided? 'ITIMER_PROF)
  (scm_init_scmsigs): add features ITIMER_VIRTUAL and ITIMER_PROF
* test-suite/tests/asyncs.test ("prevention via sigprof"): throw when unsupported
* test-suite/tests/signals.test: throw when not supported
* test-suite/tests/statprof.test: throw when not supported
2017-03-06 23:06:12 -08:00
Andy Wingo
6fff84d7d1 Revert "build: Compress with lzip too."
This reverts commit 89ce9fb31b.  It was
causing the hydra builds to fail.
2017-03-02 08:39:47 +01:00
Ludovic Courtès
58c028ebb9 build: Compress with lzip too.
* configure.ac: Add 'dist-lzip' Automake option.
2017-03-01 20:40:17 +01:00
Matt Wette
c4b0491e91 Fix make-polar signedness of zeros on macOS
* 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.
2017-02-21 22:09:01 +01:00
Andy Wingo
b0ccf4dd4a Refine check for when atomics are available.
* configure.ac:
* libguile/atomics-internal.h: Use HAVE_STDATOMIC_H to know when to use
  atomics.
2016-12-06 23:26:06 +01:00
Andy Wingo
7ff3d3834d Use readdir instead of readdir_r
* 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.
2016-12-06 23:02:28 +01:00
Andy Wingo
7b6b86f255 Ensure autoconf doesn't downgrade us to C99
* 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.
2016-11-27 20:56:59 +01:00
Andy Wingo
9996695f88 Require C99 to build Guile.
* 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.
2016-08-31 11:55:26 +02:00
Andy Wingo
a58bfb4ada Fix MinGW build error
* configure.ac: Fix for recent rename of win32-uname.c to posix-w32.c.
2016-07-25 11:44:22 +02:00
Andy Wingo
a9e726eda7 More robust setuid, setgid, etc detection
* 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.
2016-07-25 11:24:26 +02:00
Ludovic Courtès
147ba05dee build: Remove unneeded check for 'unsetenv'.
* configure.ac: Remove check for 'unsetenv', which is unneeded since we
use Gnulib's 'unsetenv'.
2016-07-25 11:22:38 +02:00
Andy Wingo
38f23e75a5 Add meta/build-env
* meta/build-env.in: New file which sets up an environment that does not
  inherit GUILE_LOAD_PATH / GUILE_LOAD_COMPILED_PATH (unless
  cross-compiling).
* doc/ref/Makefile.am (autoconf-macros.texi):
* libguile/Makefile.am (snarf2checkedtexi):
* module/Makefile.am (ice-9/psyntax-pp.go):
* test-suite/standalone/Makefile.am (GUILE_INSTALL_LOCALE):
* am/bootstrap.am (.scm.go):
* am/guilec (.scm.go): Use build-env.
* configure.ac: Create build-env.
2016-07-10 14:10:26 +02:00
Andy Wingo
6a5b44de68 Check for strtod_l before using it.
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.
2016-06-24 17:52:30 +02:00
Andy Wingo
bcc3c6b61b Detect too-old libunistring at configure-time.
* configure.ac: Detect too-old libunistring at configure-time.  Fixes
  #17399.
2016-06-21 15:38:00 +02:00
Ludovic Courtès
7c36145075 build: Remove libguile/mkstemp.c, redundant with Gnulib.
Fixes <http://bugs.gnu.org/21425>.
Reported by Kouhei Sutou <kou@cozmixng.org>.

* configure.ac: Remove 'AC_REPLACE_FUNCS' for 'mkstemp'.
* libguile/Makefile.am (EXTRA_libguile_@GUILE_EFFECTIVE_VERSION@_la_SOURCES):
  Remove mkstemp.c.
* libguile/mkstemp.c: Remove.
2016-05-22 19:50:35 +02:00
Natanael Copa
7413430fd7 i18n: Check for non-POSIX strtol_l.
* configure.ac: Check for strtol_l.
* libguile/i18n.c: Check HAVE_STRTOL_L before using strtol_l.
2016-05-22 19:29:17 +02:00
Andy Wingo
eccdeb6cc6 Distribute prebuilt bootstraps for common hosts
* 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.
2016-01-29 10:21:44 +01:00
Andy Wingo
5f4ac529e1 Use a bootstrapped -O0 compiler to compile the -O2 Guile
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.
2015-10-23 13:29:03 +00:00
Andy Wingo
12dfe6568c Merge commit '5fac1a7ada'
Conflicts:
	configure.ac
	doc/ref/libguile-parallel.texi
2015-01-22 13:30:25 +01:00
Andy Wingo
d5dffec4ff Merge commit 'a7bbba0583' 2015-01-22 13:04:11 +01:00
Ludovic Courtès
5fac1a7ada Add the 'guild' and 'guile' variables to 'guile-2.0.pc'.
* configure.ac: Remove meta/guile-2.0.pc and
  meta/guile-2.0-uninstalled.pc from 'AC_CONFIG_FILES'.
* meta/Makefile.am (substitute): New variable.
  (guile-2.0.pc, guile-2.0-uninstalled.pc): New targets.
  (guile-config, guild): Use $(substitute) instead of duplicated sed
  script.
  (CLEANFILES): Add the .pc files.
* meta/guile-2.0.pc.in (bindir, guild, guile): New variables.
* doc/ref/libguile-parallel.texi (Parallel Installations): Document the
  'guild' and 'guile' pkg-config variables.
2014-12-03 18:59:36 +01:00
Mark H Weaver
30c5982a95 i18n: Add HAVE_USELOCALE as a requirement for USE_GNU_LOCALE_API.
* configure.ac: Check for uselocale.
* libguile/i18n.c: Add HAVE_USELOCALE to the list of requirements
  before defining USE_GNU_LOCALE_API.
2014-10-14 20:36:19 -04:00
Mark H Weaver
856d318a9f Merge branch 'stable-2.0'
Conflicts:
	benchmark-suite/benchmarks/ports.bm
	libguile/async.h
	libguile/bytevectors.c
	libguile/foreign.c
	libguile/gsubr.c
	libguile/srfi-1.c
	libguile/vm-engine.h
	libguile/vm-i-scheme.c
	module/Makefile.am
	module/language/tree-il/analyze.scm
	module/language/tree-il/peval.scm
	module/scripts/compile.scm
	module/scripts/disassemble.scm
	test-suite/tests/asm-to-bytecode.test
	test-suite/tests/peval.test
	test-suite/tests/rdelim.test
2014-09-30 03:50:47 -04:00
Ludovic Courtès
f184e887a6 build: Support pthread builds without 'pthread_cancel' support (Android).
Reported by Sylvain Beucler <beuc@beuc.net>.

* configure.ac: Check for 'pthread_cancel'.
* libguile/threads.c (scm_cancel_thread): Conditionalize on
  !SCM_USE_PTHREAD_THREADS || defined HAVE_PTHREAD_CANCEL.
* test-suite/tests/threads.test (require-cancel-thread): New procedure.
  ("timed joining fails if timeout exceeded", "join-thread returns
  timeoutval on timeout", "cancel succeeds", "handler result passed to
  join", "can cancel self"): Use it.
2014-07-04 15:52:53 +02:00
Ludovic Courtès
8c75d3ae01 build: Use 'LT_LIB_M' to determine whether -lm is needed.
* configure.ac: Use 'LT_LIB_M' instead of 'AC_CHECK_LIB(m, cos)'.
  Suggested by Sylvain Beucler <beuc@beuc.net>.
2014-07-04 15:37:38 +02:00
Eli Zaretskii
317f6a2370 Unconditionally build and test the ice-9/popen module.
* module/Makefile.am (ICE_9_SOURCES): Add ice-9/popen.scm.
  (ICE_9_SOURCES) [BUILD_ICE_9_POPEN]: Remove conditional addition
  of ice-9/popen.scm.
  (SCRIPTS_SOURCES): Add scripts/autofrisk.scm and
  scripts/scan-api.scm unconditionally.
  (SCRIPTS_SOURCES) [BUILD_ICE_9_POPEN]: Remove conditional addition
  of scripts/autofrisk.scm and scripts/scan-api.scm.

* configure.ac: Remove the BUILD_ICE_9_POPEN condition.

* test-suite/tests/popen.test (if-supported): Don't test for 'fork
 feature being supported.
2014-07-03 19:20:00 +03:00
Mark H Weaver
475772ea57 Merge branch 'stable-2.0'
Conflicts:
	GUILE-VERSION
	NEWS
	guile-readline/ice-9/readline.scm
	libguile/async.c
	libguile/backtrace.c
	libguile/deprecated.h
	libguile/gc-malloc.c
	libguile/gdbint.c
	libguile/init.c
	libguile/ioext.c
	libguile/mallocs.c
	libguile/print.c
	libguile/rw.c
	libguile/scmsigs.c
	libguile/script.c
	libguile/simpos.c
	libguile/snarf.h
	libguile/strports.c
	libguile/threads.c
	libguile/vm-i-scheme.c
	libguile/vm-i-system.c
	module/srfi/srfi-18.scm
	test-suite/Makefile.am
	test-suite/standalone/test-num2integral.c
2014-04-25 02:06:01 -04:00
Ludovic Courtès
4a81f5b5d3 build: Honor program name transformation in 'guild'.
* configure.ac: Remove erroneous 'guile_program_name' substitute; see
  <https://lists.gnu.org/archive/html/autoconf/2014-04/msg00010.html>
  for details.  Remove 'meta/guild' config file.
* meta/Makefile.am (guild): New target.
  (CLEANFILES): Add 'guild'.
* meta/guild.in: Remove 'prefix' and 'exec_prefix' definitions; use
  @installed_guile@.
2014-04-24 11:55:27 +02:00
Ludovic Courtès
d80b6acf19 build: Honor program name transformation in 'guild'.
* configure.ac: Remove erroneous 'guile_program_name' substitute; see
  <https://lists.gnu.org/archive/html/autoconf/2014-04/msg00010.html>
  for details.  Remove 'meta/guild' config file.
* meta/Makefile.am (guild): New target.
  (CLEANFILES): Add 'guild'.
* meta/guild.in: Remove 'prefix' and 'exec_prefix' definitions; use
  @installed_guile@.
2014-04-24 11:51:19 +02:00
Ludovic Courtès
da7e43a6e0 build: Fix Gnulib compilation when $builddir != $srcdir.
* configure.ac: Add -I$top_srcdir_absolute to 'CPPFLAGS'.  Fixes
  out-of-source-tree compilation of lib/regex.c.  Reported at
  <https://lists.gnu.org/archive/html/guile-devel/2014-03/msg00022.html>.
2014-03-12 14:24:54 +01:00
Ludovic Courtès
8f7887d616 Provide glthread/lock.h implementation in terms of Guile threads.
Fixes <http://bugs.gnu.org/14404>.
Thanks to Paul Eggert <eggert@cs.ucla.edu> for the suggestion.

* m4/gnulib-cache.m4: Avoid 'lock' module.
* m4/lock.m4, m4/threadlib.m4, lib/glthread/threadlib.c,
  lib/glthread/lock.c: Remove.
* lib/glthread/lock.h: Rewrite in terms of libguile/threads.h.
* m4/gnulib-common.m4, m4/gnulib-comp.m4, lib/Makefile.am,
  lib/unistd.in.h, maint.mk : Update, from Gnulib v0.1-92-g546ff82.

* configure.ac (GNULIB_LOCK): Define 'GNULIB_LOCK'.  Define
  'USE_POSIX_THREADS' when building with pthread support.
* Makefile.am (noinst_HEADERS): New variable.
  (BUILT_SOURCES): Add libguile/scmconfig.h.
  (libguile/scmconfig.h): New target.
2014-03-12 00:02:01 +01:00
Mark H Weaver
de7aa61ac4 Improve compliance with C standards regarding signed integer shifts.
* configure.ac: Add -fwrapv when using GCC (or compatible), if
  supported.

* libguile/numbers.h (SCM_I_MAKINUM): Cast to scm_t_bits (unsigned)
  before shifting, to avoid undefined behavior.
2014-03-07 04:34:27 -05:00
Ludovic Courtès
8f5dbecb4b build: Bail out when 'PKG_CHECK_MODULES' is missing.
* configure.ac: Add 'm4_pattern_forbid' invocation.
2014-02-20 22:56:17 +01:00
Mark H Weaver
61989c7053 Merge branch 'stable-2.0'
Conflicts:
	libguile/pairs.c
	libguile/vm.c
	test-suite/tests/control.test
2013-12-12 23:44:46 -05:00
Tom Tromey
2bbdd2ce1c Fix computation of LIBLOBJS.
Fixes <http://bugs.gnu.org/14193>.

* configure.ac (LIBLOBJS): Add prefix to computed .lo file name so
  dependencies work properly.
2013-12-12 21:43:31 -05:00
Andy Wingo
03d1294977 Remove tests and shims for pre-7.2 bdw-gc.
* configure.ac: Remove checks for symbols present in bdw-gc 7.2.

* libguile/finalizers.c:
* libguile/gc-malloc.c:
* libguile/gc.c:
* libguile/guardians.c:
* libguile/scmsigs.c:
* libguile/threads.c: Remove shims.
2013-11-22 10:51:56 +01:00
Mark H Weaver
f6f4feb0a2 Merge remote-tracking branch 'origin/stable-2.0'
Conflicts:
	GUILE-VERSION
	libguile/array-map.c
	libguile/fports.h
	libguile/gc.h
	libguile/inline.h
	libguile/ports.c
	libguile/ports.h
	libguile/print.c
	libguile/r6rs-ports.c
	libguile/read.c
	test-suite/tests/00-socket.test
2013-04-14 02:48:33 -04:00
Ludovic Courtès
039300a1eb build: Tell gen-scmconfig' whether the system has struct timespec'.
* configure.ac: Reinstate `struct timespec' check removed in commit
  7e7c6f6a93, but define
  `HAVE_SYSTEM_STRUCT_TIMESPEC' instead of `HAVE_STRUCT_TIMESPEC'.
* libguile/gen-scmconfig.c (main): Change `HAVE_STRUCT_TIMESPEC' to
  `HAVE_SYSTEM_STRUCT_TIMESPEC'.
2013-04-10 01:39:02 +02:00