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

335 commits

Author SHA1 Message Date
Ludovic Courtès
b3da54d181 Placate a number of `syntax-check' verifications.
- "filesystem" -> "file system"
  - remove doubled words
  - use EXIT_* macros instead of literal numbers
  - update `syntax-check' exclusion files
2012-01-05 23:38:10 +01:00
Andy Wingo
9957641b60 add a site dir to %load-compiled-path
* libguile/Makefile.am (libpath.h): Define SCM_SITE_CCACHE_DIR.  Defined
  as site-ccache/ instead of site/ccache/ to indicate that we don't expect
  further subdirectories, and also to avoid confusion about whether
  extensions/ is a site-specific or not.

* libguile/load.c (scm_init_load_path): Add SCM_SITE_CCACHE_DIR to the
  default load-compiled path.
2011-07-21 10:36:13 +02:00
Andy Wingo
95643853d7 remove win32-dirent.[ch]
* libguile/win32-dirent.c:
* libguile/win32-dirent.h: Remove these files.  MinGW has opendir and
  readdir support, I hear.

* configure.ac:
* libguile/filesys.c:
* libguile/Makefile.am: Adapt.
2011-06-17 00:20:56 +02:00
Andy Wingo
3d458a81c6 gnulib update
Added pipe2 and open modules, to get O_CLOEXEC.

* libguile/Makefile.am (guile_filter_doc_snarfage$(EXEEXT)): Add gnulib
  here, in the native build case, for rpl_fflush if needed.

foo
2011-06-16 19:47:25 +02:00
Andy Wingo
b8b0659879 rename guile-tools' to guild'
* configure.ac: Look for ln -s.  Write out `guild' instead of
  `guile-tools'.

* meta/Makefile.am (install-data-hook): Link the installed `guild' to
  the backward-compatible `guile-tools' name.
  (bin_SCRIPTS, EXTRA_DIST): Fix up for guild change.

* meta/guild.in: Moved here from `guile-tools.in'.

* doc/ref/Makefile.am (autoconf-macros.texi):
* doc/ref/api-evaluation.texi (Compilation):
* doc/ref/autoconf.texi (Autofrisk, Using Autofrisk):
* doc/ref/mod-getopt-long.texi (getopt-long Reference):
* doc/ref/tools.texi (Miscellaneous Tools, Executable Modules): Minimal
  doc update.

* .gitignore:
* am/guilec (.scm.go):
* libguile/Makefile.am (snarf2checkedtexi):
* module/Makefile.am (ice-9/psyntax-pp.go): Update makefiles, etc.

* module/scripts/README:
* module/scripts/lint.scm:
* module/scripts/list.scm: Update commentaries.
2011-05-31 22:01:47 +02:00
Andy Wingo
a04e57498c gen-scmconfig cross-compilation fix
* libguile/Makefile.am (gen-scmconfig.$(OBJEXT)): Fix
  cross-compilation.  Thanks to Volker Grabsch for the report!
2011-05-20 12:26:53 +02:00
Andy Wingo
e3b8bce8f4 build support for detecting clock_gettime, with -lrt if needed
* acinclude.m4 (gl_CLOCK_TIME):
* configure.ac: Locally include gl_CLOCK_TIME.  To be fixed properly
  when gnulib updates their license to reflect the actual BSD state of
  things.
* libguile/Makefile.am (libguile_@GUILE_EFFECTIVE_VERSION@_la_LDFLAGS):
  Add -lrt for clock_gettime, if needed.
* meta/guile-2.0-uninstalled.pc.in:
* meta/guile-2.0.pc.in: Likewise, in Libs.private.
2011-05-04 20:19:11 +02:00
Andy Wingo
ad378da975 check for iconveh values at configure-time
* configure.ac: Check for the iconveh values here, instead of relying on
  gen-scmconfig to know them.  That doesn't work in general because
  gen-scmconfig runs on the build machine, not the target machine.

* libguile/Makefile.am (gen-scmconfig.$(OBJEXT)): Revert rule to the
  revision before 533d8212.

* libguile/gen-scmconfig.h.in (SCM_I_GSC_ICONVEH_ERROR):
  (SCM_I_GSC_ICONVEH_QUESTION_MARK):
  (SCM_I_GSC_ICONVEH_ESCAPE_SEQUENCE):
* libguile/gen-scmconfig.c: Use configure-time substitutions to set
  SCM_ICONVEH_ERROR_HANDLER et al.
2011-04-28 22:39:20 +02:00
Ludovic Courtès
ee037cee3e Build `filesys.x'.
* libguile/Makefile.am (DOT_X_FILES): Add `filesys.x'.
2011-04-15 09:09:30 +02:00
Ludovic Courtès
073167ef7b Allow compilation with `--disable-posix'.
Reported by Dmitry Dzhus <dima@dzhus.org>.

* configure.ac: Remove `AC_LIBOBJ([filesys])'.  Document
  `--disable-posix' as omitting non-essential POSIX interfaces.

* libguile/Makefile.am (libguile_@GUILE_EFFECTIVE_VERSION@_la_SOURCES):
  Add `filesys.c'.
  (DOT_DOC_FILES): Add `filesys.doc'.
  (EXTRA_libguile_@GUILE_EFFECTIVE_VERSION@_la_SOURCES): Remove
  `filesys.c'.

* libguile/posix.c (scm_mkstemp, scm_access): Move to `filesys.c'.
  (scm_init_posix): Move `R_OK' etc. to `filesys.c'.

* libguile/filesys.c (scm_chown, scm_chmod, scm_umask, scm_open_fdes,
  scm_open, scm_close, scm_close_fdes, scm_link, scm_tc16_dir,
  scm_directory_stream_p, scm_opendir, scm_readdir, scm_rewinddir,
  scm_closedir, scm_dir_print, scm_dir_free, scm_chdir, scm_getcwd,
  set_element, fill_select_type, get_element, retrieve_select_type,
  scm_select, scm_fcntl, scm_fsync, scm_symlink, scm_readlink,
  scm_lstat, scm_copy_file): Conditionalize on HAVE_POSIX.
  (scm_mkstemp, scm_access): New functions.
  (scm_init_filesys): Conditionalize `scm_tc16_dir', `O_RDONLY', etc. on
  HAVE_POSIX.  Define `R_OK', `W_OK', etc.

* libguile/fports.c (fport_print): Use `scm_ttyname' only when
  HAVE_POSIX.

* libguile/i18n.c (lock_locale_mutex, unlock_locale_mutex): New
  functions.  Update users of `scm_i_locale_mutex' to use them.

* libguile/init.c (scm_i_init_guile): Always call `scm_init_filesys'.

* meta/guile-tools.in (main): Use `setlocale' only when it is defined.

* module/ice-9/boot-9.scm: Always load `ice-9/posix'.
2011-04-15 00:09:16 +02:00
Mark H Weaver
dd36ce77cd Update Gnulib; add new modules; remove `round' module.
This updates Gnulib to v0.0-4951-g6ff7b70.

* m4/gnulib-cache.m4: Add floor, ceil, frexp, and ldexp.  Add wchar as
  an explicit dependency; it had been present as an indirect dependency
  before, but no longer.  Remove round, which I had requested earlier,
  but turned out to be unnecessary.
2011-03-09 17:06:05 -05:00
Ludovic Courtès
bb5b36d069 Fix compilation of `c-tokenize.c' in a cross-compile setup.
* libguile/Makefile.am (c-tokenize.$(OBJEXT)): When cross-compiling,
  don't include any CPPFLAGS since we could end up seeing Gnulib's
  replacements, e.g., `rpl_malloc', which we can't use.
2011-02-15 12:15:02 +01:00
Ludovic Courtès
cae0945c83 Use all the LDFLAGS from Gnulib.
* libguile/Makefile.am (version_info): New variable.
  (libguile_@GUILE_EFFECTIVE_VERSION@_la_LIBADD): Remove
  `$(LTLIBUNISTRING) $(LTLIBICONV) $(LTLIBINTL)'.
  (libguile_@GUILE_EFFECTIVE_VERSION@_la_LDFLAGS): Add all the flags
  from Gnulib, one per line as in the `gnulib-tool' output, including
  those above.
2011-02-15 12:07:49 +01:00
Ludovic Courtès
533d8212af Pass all the flags when building `gen-scmconfig' in a cross-compile setup.
* libguile/Makefile.am (gen-scmconfig.$(OBJEXT)): When cross-compiling,
  pass all the CPPFLAGS and CFLAGS.
2011-02-14 13:48:08 +01:00
Andy Wingo
7948811252 deprecate primitive properties
* libguile.h:
* libguile/Makefile.am:
* libguile/deprecated.h:
* libguile/deprecated.c:
* libguile/init.c:
* libguile/properties.c:
* libguile/properties.h: Deprecate the "primitive properties"
  interface.  It was only used to implement object properties, and that
  is no longer the case.

* module/ice-9/boot-9.scm (make-object-property): Reimplement just in
  terms of weak hash tables, and make threadsafe.

* NEWS:
* doc/ref/api-utility.texi: Update.
2011-02-10 23:16:52 +01:00
Andy Wingo
6f81b18abe add (ice-9 poll), a poll wrapper
* libguile/poll.c:
* libguile/poll.h:
* module/ice-9/poll.scm: New module, (ice-9 poll).

* module/Makefile.am:
* libguile/init.c:
* libguile/Makefile.am: Adapt.

* configure.ac: Check for poll.h and poll.
2010-12-03 15:16:37 +01:00
Ludovic Courtès
abd7e37ab7 configure: Don't needlessly augment $LIBS (and $GUILE_LIBS.)
* configure.ac: Don't augment $LIBS with $LTLIBUNISTRING and
  $BDW_GC_LIBS.

* libguile/Makefile.am (libguile_@GUILE_EFFECTIVE_VERSION@_la_LDFLAGS):
  Remove @LTLIBINTL@.  Add $(BDW_GC_LIBS).
2010-10-20 23:45:58 +02:00
Ludovic Courtès
9253d0905d Fix the chknew-E' and chknew-SIG' rules.
* libguile/Makefile.am (chknew-E chknew-SIG): Run gcc without `-undef'
  since otherwise it ends up trying to include headers that are not
  available (e.g., <gnu/stubs-32.h> on an x86_64-linux-gnu system.)
2010-10-15 15:56:01 +02:00
Andy Wingo
37710f7e8f move srfi-1 and srfi-60 C impl to libguile, without public C api
* libguile/srfi-1.c:
* libguile/srfi-1.h:
* libguile/srfi-60.c:
* libguile/srfi-60.h:
* libguile/ChangeLog-srfi: Move here, from the srfi/ dir. The C API is
  internal. Add API to register the extensions, called by init.c.

* libguile/init.c: Verily, register srfi extensions.

* libguile/Makefile.am: Add srfi files.

* module/srfi/srfi-1.scm:
* module/srfi/srfi-60.scm: Update load-extension invocation.

* Makefile.am:
* configure.ac: Remove srfi/ dir.

* test-suite/standalone/Makefile.am:
* test-suite/standalone/test-srfi-1.c: Remove srfi-1 C test, we don't
  support this API any more.
2010-09-12 23:29:11 +02:00
Ludovic Courtès
18f2d5aa4d Use `have-lib' when checking for libltdl.
Suggested by primus <rprimus@gmail.com>.

* configure.ac: Use `AC_LIB_HAVE_LINKFLAGS' when checking for libltdl.

* libguile/Makefile.am (libguile_@GUILE_EFFECTIVE_VERSION@_la_LIBADD):
  Add $(LTLIBLTDL).

* README: Update to make it clear that libgc and libffi don't have a
  `--with-XXX-prefix' option.
2010-09-06 22:49:24 +02:00
Thien-Thi Nguyen
e6d67f1e69 [build] Refine libguile/*.doc snarfing.
* libguile/guile-snarf-docs.in: Rewrite to incorporate all
  three phases of snarfing: func-name check, cpp, tokenization.
  Also, require/check new command-line syntax.
* libguile/Makefile.am (AM_V_FILTER): Delete var.
  (AM_V_FILTER_, AM_V_FILTER_0): Likewise.
  (.c.doc): Run ./guile-snarf-docs; use new command-line syntax.
2010-08-26 18:36:48 +02:00
Andy Wingo
d5a1a8cd1b consolidate sitedir definition
* configure.ac (sitedir): Fix definition to point to the
  version-specific sitedir.

* libguile/Makefile.am (libpath.h): Take sitedir definition from
  configure.ac.
2010-08-25 10:24:27 -04:00
Thien-Thi Nguyen
bfebf099d9 [build] Use AM_SILENT_RULES for generating cpp-E.c, cpp-SIG.c.
* libguile/Makefile.am (.syms.c): Prefix first command
  with $(AM_V_GEN); unconditionally silence second command.
2010-08-19 11:15:08 +02:00
Thien-Thi Nguyen
319b53dd1c [build] Fix sed portability bug: Don't use '\n' in sed script.
Regression introduced 2010-07-22, "[build] Overhaul
<errno.h>, <signal.h> cpp symbol extraction/checking".
See: <http://autobuild.josefsson.org/guile/log-201008181002653292000.txt>

* libguile/Makefile.am (.syms.c): Convert
  one-liner sed script to while-read-echo loop.
2010-08-18 19:48:12 +02:00
Thien-Thi Nguyen
b405cdb4c5 [build] Create libguile/version.h using the configure script.
* configure.ac (AC_CONFIG_FILES): Add libguile/version.h.

* libguile/Makefile.am (version.h): Delete target.
  (EXTRA_DIST): Remove version.h.in.
  (BUILT_SOURCES): Remove version.h.
  (MOSTLYCLEANFILES): Remove version.h, version.h.tmp.
* libguile/version.h.in (SCM_MAJOR_VERSION): Use conventional
  @VAR@ instead of @-VAR-@ for ‘GUILE_MAJOR_VERSION’.
  (SCM_MINOR_VERSION, SCM_MICRO_VERSION, SCM_EFFECTIVE_VERSION): Likewise
  for ‘GUILE_MINOR_VERSION’, ‘GUILE_MICRO_VERSION’, ‘GUILE_EFFECTIVE_VERSION’.
2010-08-18 19:48:12 +02:00
Andy Wingo
8a4ed2dd34 remove "discouraged" infrastructure
* libguile/discouraged.h: Remove.

* libguile/deprecated.c (scm_internal_select, scm_thread_sleep)
  (scm_thread_usleep): Deprecate formerly discouraged names.

* libguile/eq.h (SCM_EQ_P):
* libguile/pairs.h (SCM_NULLP, SCM_NNULLP, SCM_CONSP, SCM_NCONSP):
* libguile/boolean.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOLP, SCM_BOOL):
  (SCM_NEGATE_BOOL, SCM_BOOL_NOT): Undiscourage these names, because I'm
  not sure deprecating them will do any good.

* libguile.h:
* libguile/gen-scmconfig.c:
* libguile/numbers.c:
* libguile/init.c:
* libguile/Makefile.am:
* configure.ac: Remove bits that referenced discouraged.h, and dealt
  with the "discouraging" system.
2010-08-08 14:15:47 +02:00
Andy Wingo
220058a835 deprecated all discouraged functions
* libguile/Makefile.am:
* libguile/discouraged.c: Remove discouraged.c.

* libguile/deprecated.c:
* libguile/deprecated.h:
* libguile/discouraged.h: All functions and declarations moved from
  discouraged.[ch] to deprecated.[ch], adding deprecation warnings.

* libguile/init.c: Remove discouraged init.

* libguile/numbers.c (scm_num2float, scm_num2double): Deprecate.

* test-suite/standalone/test-num2integral.c: Port to modern API.
2010-08-08 13:48:35 +02:00
Andy Wingo
869bfe86af s/extensionsdir/extensiondir/
* libguile/Makefile.am (libpath.h): Change "extensionsdir" to
  "extensiondir".
* meta/guile-2.0.pc.in (extensiondir): Likewise.
2010-08-06 13:15:58 +02:00
Andy Wingo
bc325e763f %site-dir is specific to the effective version
* libguile/load.h:
* libguile/load.c (scm_sys_global_site_dir): New API, is what %site-dir
  used to be.
  (scm_sys_site_dir): Changed to be a version-specific dir.
  (scm_init_load_path): Search the version-specific sitedir before the
  global one.

* libguile/Makefile.am (libpath.h): Update SCM_SITE_DIR and
  SCM_GLOBAL_SITE_DIR, as appropriate.
2010-08-06 13:15:29 +02:00
Yan Li
f9560a348e Compiling DOT_X_FILES requires version.h
There was a race condition when building Guile since DOT_X_FILES didn't
depend on version.h, which is dynamically generated. Sometimes the
DOT_X_FILES are compiled before the version.h is generated and leads to
build failure. This patch fixed this problem.

Signed-off-by: Yan Li <yan.i.li@intel.com>
2010-08-04 20:07:27 +02:00
Thien-Thi Nguyen
2d6a14adc9 Fix "make dist" regression: Distribute guile-func-name-check.
Regression introduced 2010-07-22,
"Avoid no-op config-subst for libguile/guile-func-name-check".
* libguile/Makefile.am (noinst_SCRIPTS):
Move guile-func-name-check from here...
(EXTRA_DIST): ...to here.
2010-07-24 22:25:24 +02:00
Thien-Thi Nguyen
395afce9f2 [maint] Remove unused script guile-doc-snarf.
* doc/ref/tools.texi (Doc Snarfing): Don't mention guile-doc-snarf.

* configure.ac (libguile/guile-doc-snarf): Delete ‘GUILE_CONFIG_SCRIPT’.

* libguile/Makefile.am (noinst_SCRIPTS): Remove guile-doc-snarf.
* libguile/.gitignore: Remove guile-doc-snarf.
* libguile/guile-doc-snarf.in: Delete file.

* module/scripts/doc-snarf.scm: Comment munging; nfc.

* AUTHORS: Update.
2010-07-22 21:10:38 +02:00
Thien-Thi Nguyen
6a6df18794 [maint] Avoid no-op config-subst for libguile/guile-func-name-check.
* configure.ac (libguile/guile-func-name-check): Remove ‘GUILE_CONFIG_SCRIPT’.
* libguile/Makefile.am (.c.doc): Look in $(srcdir) for awk script.
* libguile/guile-func-name-check: Rename from guile-func-name-check.in.
2010-07-22 14:17:26 +02:00
Thien-Thi Nguyen
648da03259 [build] Overhaul <errno.h>, <signal.h> cpp symbol extraction/checking.
* libguile/Makefile.am (BUILT_SOURCES): Delete cpp_err_symbols.c,
  cpp_sig_symbols.c; add cpp-E.c, cpp-SIG.c.
  (EXTRA_DIST): Delete cpp_signal.c, cpp_errno.c, cpp_err_symbols.in,
  cpp_err_symbols.c, cpp_sig_symbols.c, cpp_sig_symbols.in, cpp_cnvt.awk;
  add cpp-E.syms, cpp-E.c, cpp-SIG.syms, cpp-SIG.c.
  (error.x, posix.x): Update prereq list.
  (cpp_err_symbols.c, cpp_sig_symbols.c): Delete targets.
  (check_signals, check_errnos): Likewise.
  (.syms.c): New pattern rule.
  (chknew-E, chknew-SIG): New targets.
  (MOSTLYCLEANFILES): Delete cpp_err_symbols_here, cpp_err_symbols_diff,
  cpp_err_symbols_new, cpp_sig_symbols_here, cpp_sig_symbols_diff,
  cpp_sig_symbols_new.
* libguile/cpp-E.syms: Rename from libguile/cpp_err_symbols.in.
* libguile/cpp-SIG.syms: Rename from libguile/cpp_sig_symbols.in.
* libguile/error.c (scm_init_error): #include "libguile/cpp-E.c".
* libguile/posix.c (scm_init_posix): #include "libguile/cpp-SIG.c".
* libguile/cpp_cnvt.awk: Delete file.
* libguile/cpp_errno.c: Delete file.
* libguile/cpp_signal.c: Delete file.
2010-07-22 13:59:12 +02:00
Thien-Thi Nguyen
a6025413eb [build] Use UTC, precise format for ‘buildstamp’ value.
* libguile/Makefile.am (libpath.h): For ‘buildstamp’,
  specify date(1) output format precisely, and in UTC.
* doc/ref/api-options.texi (Build Config): Update ‘buildstamp’ doc.
2010-06-18 19:49:02 +02:00
No Itisnt
a572fc95f9 Use AM_SILENT_RULES to pare down build output, ignore auto-generated files
* .gitignore: Ignore extra gnulib headers.
* am/snarf: Silent SNARF command
* am/guilec: Silent GUILEC command
* configure.ac: Use AM_SILENT_RULES when available
* guile-readline/Makefile.am:
* libguile/Makefile.am:
* srfi/Makefile.am:
* test-suite/standalone/Makefile.am: Silence snarf output
2010-06-18 11:15:18 +02:00
Andy Wingo
dc3e203e07 separate boot expansion from memoization
* libguile/Makefile.am:
* libguile/init.c:
* libguile/expand.c:
* libguile/expand.h: Add new expander. The idea is that macroexpansion
  is one thing, and whether to compile or interpret the result of that
  is another thing.

* libguile/memoize.c: Adapt to expand as necessary, and then memoize
  expanded source without worrying about syntax errors.

* module/ice-9/eval.scm (make-general-closure): Allow alt clauses to not
  possess the full make-general-closure arity.
2010-05-19 22:51:31 +02:00
Andy Wingo
cd038da546 remove libguile/lang.h, deprecate %nil (in favor of #nil)
* libguile/Makefile.am:
* libguile/init.c:
* libguile/lang.c:
* libguile/lang.h: Remove lang.c and lang.h.

* libguile/pairs.h (SCM_NIL_P, SCM_NULL_OR_NIL_P): Moved here.

* module/ice-9/deprecated.scm (%nil): %nil definition moved here.

* libguile/alist.c:
* libguile/async.c:
* libguile/backtrace.c:
* libguile/boolean.c:
* libguile/dynl.c:
* libguile/eval.c:
* libguile/filesys.c:
* libguile/fluids.c:
* libguile/list.c:
* libguile/load.c:
* libguile/options.c:
* libguile/posix.c:
* libguile/print.c:
* libguile/promises.c:
* libguile/sort.c:
* libguile/throw.c:
* libguile/trees.c:
* libguile/vectors.c:
* libguile/vm.c:
* libguile/weaks.c:
* srfi/srfi-1.c: <libguile/lang.h> references removed.
2010-04-09 14:26:31 +02:00
Andy Wingo
718815d761 parallel installability for libguile*.h
* Makefile.am:
* libguile/Makefile.am (modincludedir): Install into
  $pkgincludedir/$GUILE_EFFECTIVE_VERSION. This allows multiple Guile
  development packages to be installed at once.

* guile-readline/Makefile.am (modincludedir):
* srfi/Makefile.am (srfiincludedir): Likewise.

* meta/guile-2.0.pc.in (Cflags): Add the appropriate -I line so that
  user code picks up the new location transparently.
2010-03-16 21:44:34 +01:00
Andy Wingo
44602b0868 rename libguile to libguile-@EFFECTIVE_VERSION@, currently libguile-2.0
* libguile/Makefile.am (lib_LTLIBRARIES): Instead of just "libguile.la",
  make "libguile-@EFFECTIVE_VERSION@.la". This allows multiple versions
  of Guile to be installed at once. See
  http://www106.pair.com/rhp/parallel.html for a rationale.

  (libguile_@GUILE_EFFECTIVE_VERSION@_la_CFLAGS):
  (libguile_@GUILE_EFFECTIVE_VERSION@_la_SOURCES):
  (EXTRA_libguile_@GUILE_EFFECTIVE_VERSION@_la_SOURCES):
  (libguile_@GUILE_EFFECTIVE_VERSION@_la_DEPENDENCIES):
  (libguile_@GUILE_EFFECTIVE_VERSION@_la_LIBADD):
  (libguile_@GUILE_EFFECTIVE_VERSION@_la_LDFLAGS): Fixup automake vars
  to include the effective version.
  (guile_LDADD): Fix up the spelling of libguile.

* libguile/bytevectors.c (scm_bootstrap_bytevectors):
* libguile/foreign.c (scm_register_foreign):
* libguile/i18n.c (scm_bootstrap_i18n):
* libguile/instructions.c (scm_bootstrap_instructions):
* libguile/objcodes.c (scm_bootstrap_objcodes):
* libguile/programs.c (scm_bootstrap_programs):
* libguile/vm.c (scm_bootstrap_vm): Register extensions using e.g.
  "libguile-2.0" as the libname -- i.e., including the effective version
  in the libname.

* module/ice-9/i18n.scm:
* module/rnrs/bytevector.scm:
* module/rnrs/io/ports.scm:
* module/system/foreign.scm:
* module/system/vm/instruction.scm:
* module/system/vm/objcode.scm:
* module/system/vm/program.scm:
* module/system/vm/vm.scm: When doing a load-extension for something in
  Guile, use the effective version also.

* meta/guile-2.0-uninstalled.pc.in (Libs):
* meta/guile-2.0.pc.in (Libs): Use -lguile-@EFFECTIVE_VERSION@. This
  change should mean that code built against Guile should not be
  affected by the libguile rename.

* guile-readline/Makefile.am (libguilereadline_v_@LIBGUILEREADLINE_MAJOR@_la_LIBADD):
* srfi/Makefile.am
  (libguile_srfi_srfi_1_v_@LIBGUILE_SRFI_SRFI_1_MAJOR@_la_LIBADD):
  (libguile_srfi_srfi_4_v_@LIBGUILE_SRFI_SRFI_4_MAJOR@_la_LIBADD):
  (libguile_srfi_srfi_13_14_v_@LIBGUILE_SRFI_SRFI_13_14_MAJOR@_la_LIBADD):
  (libguile_srfi_srfi_60_v_@LIBGUILE_SRFI_SRFI_60_MAJOR@_la_LIBADD):
* test-suite/standalone/Makefile.am (test_num2integral_LDADD):
  (test_round_LDADD):
  (libtest_asmobs_la_LIBADD):
  (libtest_ffi_la_LIBADD):
  (test_list_LDADD):
  (test_unwind_LDADD):
  (test_conversion_LDADD):
  (test_loose_ends_LDADD):
  (test_scm_c_read_LDADD):
  (test_scm_take_locale_symbol_LDADD):
  (test_scm_take_u8vector_LDADD):
  (libtest_extensions_la_LIBADD):
  (test_with_guile_module_LDADD):
  (test_scm_with_guile_LDADD): Fix up the spelling of libguile.la.
2010-03-16 21:20:34 +01:00
Andy Wingo
89607fab50 version.h has SCM_EFFECTIVE_VERSION; effective-version uses that
* libguile/version.c (scm_effective_version): Use SCM_EFFECTIVE_VERSION.
* libguile/version.h.in (SCM_EFFECTIVE_VERSION): Define from
  GUILE_EFFECTIVE_VERSION.

* libguile/Makefile.am (version.h): Subst in GUILE_EFFECTIVE_VERSION.

* test-suite/tests/version.test ("version reporting works"): The
  effective version is not necessarily MAJOR.MINOR. Remove check.
2010-03-16 21:20:29 +01:00
Ludovic Courtès
2bfa4d5ccd Add missing $(LTLIBINTL), suggested by Gnulib.
* libguile/Makefile.am (libguile_la_LIBADD): Add $(LTLIBINTL).
2010-02-16 20:57:13 +01:00
Ludovic Courtès
61cd9dc907 Use Gnulib's `getaddrinfo' module.
* m4/gnulib-cache.m4: Add `getaddrinfo'.

* libguile/Makefile.am (libguile_la_LDFLAGS): Add `$(GETADDRINFO_LIB)
  $(HOSTENT_LIB) $(SERVENT_LIB)'.
2010-02-14 17:06:13 +01:00
Andy Wingo
b9c100d008 add @control and @prompt stub primitives
* libguile/Makefile.am:
* libguile/control.c:
* libguile/control.h:
* libguile/init.c: Add stub @control and @prompt primitives, for use
  when bootstrapping (ice-9 control).
2010-01-31 20:40:24 +01:00
Andy Wingo
d8b04f04e9 first pass at implementing low-level foreign functions
* libguile/Makefile.am (AM_CPPFLAGS): Move LIBFFI_CFLAGS here (from
  AM_CFLAGS), allowing snarfing to work.

* libguile/foreign.h (scm_make_foreign_function): New public function.

* libguile/foreign.c: Flesh out an implementation of foreign functions.
  (scm_take_foreign_pointer): Bugfix for the case in which we have a
  finalizer.

* module/system/foreign.scm: Export `make-foreign-function'.
2010-01-26 22:56:41 +01:00
Andy Wingo
75c242a256 add libffi dependency
* configure.ac:
* libguile/Makefile.am (AM_CFLAGS, libguile_la_LDFLAGS): Add a libffi
  dependency, for making a dynamic FFI.
2010-01-26 22:56:41 +01:00
Andy Wingo
a6029b97ea properly integrate vm bootstrapping into init.c
* libguile/Makefile.am (modinclude_HEADERS):
* libguile/vm-bootstrap.h: Remove vm-bootstrap.h.

* libguile/frames.c: No more vm-bootstrap.h.

* libguile/instructions.c (scm_init_instructions):
* libguile/objcodes.c (scm_init_objcodes):
* libguile/programs.c (scm_init_programs): No need to call
  scm_bootstrap_vm, init.c does that for us.

* libguile/vm.c (scm_bootstrap_vm): No need call e.g.
  scm_bootstrap_frames, init.c does that. Remove a twice-calling guard,
  should be unnecessary. Don't define the load-compiled subr here.

* libguile/load.c (scm_init_load): Define the load-compiled subr here.

* libguile/vm.h: Declare scm_bootstrap_vm here.

* libguile/init.c (scm_i_init_guile): Properly integrate VM
  bootstrapping into this file.
2010-01-07 23:42:41 +01:00
Andy Wingo
a268973767 reimplement srfi-4 vectors on top of bytevectors
* libguile/srfi-4.h:
* libguile/srfi-4.c (scm_make_srfi_4_vector): New function, exported by
  (srfi srfi-4 gnu).
* libguile/srfi-4.i.c: Removed.
* module/srfi/srfi-4.scm:
* module/srfi/srfi-4/gnu.scm: Reimplement srfi-4 vectors on top of
  bytevectors. The implementation is mostly in Scheme now.

* test-suite/tests/unif.test: Update to use (srfi srfi-4 gnu).

* libguile/bytevectors.c (bytevector_ref_c32, bytevector_ref_c64)
  (bytevector_set_c32, bytevector_set_c64): Fix some embarrassing bugs.
  Still need to do an upper bounds check.

* libguile/deprecated.h: Remove deprecated array functions:
  scm_i_arrayp, scm_i_array_ndim, scm_i_array_mem, scm_i_array_v,
  scm_i_array_base, scm_i_array_dims, and the deprecated macros:
  SCM_ARRAYP, SCM_ARRAY_NDIM, SCM_ARRAY_CONTP, SCM_ARRAY_MEM,
  SCM_ARRAY_V, SCM_ARRAY_BASE, SCM_ARRAY_DIMS.
* libguile/deprecated.c (scm_uniform_vector_read_x)
  (scm_uniform_vector_write, scm_uniform_array_read_x)
  (scm_uniform_array_write): Newly deprecated functions.

* libguile/generalized-arrays.c (scm_array_type): Remove the bytevector
  hack.

* libguile/objcodes.c (scm_bytecode_to_objcode, scm_objcode_to_bytecode):
  Rework to operate on bytevectors, as scm_make_u8vector now causes a
  module lookup, which can't be done e.g. when loading the VM boot
  program for psyntax-pp.go on a fresh bootstrap.

* libguile/objcodes.h (SCM_F_OBJCODE_IS_BYTEVECTOR):
  (SCM_OBJCODE_IS_BYTEVECTOR): s/U8VECTOR/BYTEVECTOR/.

* module/ice-9/boot-9.scm (the-scm-module): A terrible hack to pull in
  (srfi srfi-4), as the bindings are primarily there now. We'll worry
  about this later.
2010-01-07 22:06:56 +01:00
Andy Wingo
e2c2a6994d add foreign value wrapper
* libguile/foreign.h:
* libguile/foreign.c: New files, implementing simple wrappers around
  foreign values, such as those that one might link in dynamically from
  a library.

* libguile/tags.h (scm_tc7_foreign): Take a tc7 for foreign values.

* libguile.h:
* libguile/init.c: Add foreign.h to headers and init.

* libguile/print.c (iprin1): Add printer for foreign values.

* libguile/gc.c (scm_i_tag_name): Case for foreign values.
* libguile/goops.c (scm_class_of, create_standard_classes): Add a class
  for foreign values.

* libguile/evalext.c (scm_self_evaluating_p): Add case for foreign
  values.

* libguile/Makefile.am: Add foreign.[ch] to the build.
2010-01-04 12:39:21 +01:00
Andy Wingo
c66fe8a9a0 version.h depends on config.status
* libguile/Makefile.am (version.h): Depend on config.status, so if we
  reconfigure we make sure to regenerate the version.
2009-12-20 23:26:42 +01:00