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

219 commits

Author SHA1 Message Date
Mike Gran
8c451ec2dd Replace libltdl with gmodule-2.0 in build
* configure.ac: remove ltdl
  (GMODULE_CFLAGS, GMODULE_LIBS): new
* libguile/Makefile.am: remove ltdl flags and libs, add gmodule
* libguile/dynl.c: remove ltdl.h, add gmodule.h
2020-03-24 12:13:54 -07:00
Matt Wette
b62d849d36 Deprecate 'tmpnam' and add '--disable-tmpnam' configure option.
* configure.ac: Add '--disable-tmpnam'.
* libguile/posix.c (tmpnam): Conditionalize on 'SCM_ENABLE_DEPRECATED'
and 'ENABLE_TMPNAM'.  Call 'scm_c_issue_deprecation_warning'.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2020-03-22 18:00:06 +01:00
Andy Wingo
a0fdb4efc1 Fix version computation for v3.0
* configure.ac: Fix git-version-gen invocation.
2020-01-15 21:34:21 +01:00
Andy Wingo
28318cba9c Remove "vm" tests
These tests are no longer useful.

* configure.ac:
* test-suite/Makefile.am: Remove mentions.
* test-suite/vm/Makefile.am:
* test-suite/vm/run-vm-tests.scm:
* test-suite/vm/t-basic-contructs.scm:
* test-suite/vm/t-call-cc.scm:
* test-suite/vm/t-catch.scm:
* test-suite/vm/t-closure.scm:
* test-suite/vm/t-closure2.scm:
* test-suite/vm/t-closure3.scm:
* test-suite/vm/t-closure4.scm:
* test-suite/vm/t-do-loop.scm:
* test-suite/vm/t-global-bindings.scm:
* test-suite/vm/t-literal-integers.scm:
* test-suite/vm/t-macros.scm:
* test-suite/vm/t-macros2.scm:
* test-suite/vm/t-map.scm:
* test-suite/vm/t-match.scm:
* test-suite/vm/t-mutual-toplevel-defines.scm:
* test-suite/vm/t-or.scm:
* test-suite/vm/t-proc-with-setter.scm:
* test-suite/vm/t-quasiquote.scm:
* test-suite/vm/t-records.scm:
* test-suite/vm/t-values.scm: Remove.
2019-09-27 22:57:38 +02:00
Andy Wingo
145ff63e9d Merge from stable-2.2 2019-08-02 15:36:26 +02:00
Ludovic Courtès
a69b567d97 build: Do not record LDFLAGS in .pc file.
Fixes <https://bugs.gnu.org/36339>.
Reported by Cyprien Nicolas <cyprien@nicolas.tf>.

* configure.ac (GUILE_LIBS): Remove $LDFLAGS.
2019-07-07 15:07:44 +02:00
Michael Gran
69bc964d7b Handle newlib C library's langinfo constant names
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
2019-05-23 17:32:08 +02:00
Andy Wingo
83b086e40e Remove -Wdeclaration-after-statement
* configure.ac (HOST_CC): Now that we have C99, there's no need to warn
  on mixed statements and declarations.
2019-04-03 19:37:31 +02:00
Michael Gran
92105d13ad Handle newlib C library's langinfo constant names
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
2019-02-23 16:33:50 -08:00
Andy Wingo
2b4999b8bb Bump prerelease version numbering to 2.9.x
* GUILE-VERSION (GUILE_MINOR_VERSION): Bump to 9.
* NEWS: Update expected version numbers.
* configure.ac: Update pattern.
2018-10-10 10:11:26 +02:00
Andy Wingo
9505263fda Configure uses 2.3.x tags for version
* configure.ac: Only pick 2.3.x tags for the version.  Will need to bump
  when we do 3.0.
2018-09-20 11:42:08 +02:00
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
Ludovic Courtès
be1e6e6ab0 Update copyright years in '--version' and the manual.
* 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.
2018-07-01 23:33:26 +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