* script.c (scm_compile_shell_switches): Add handling of -q switch
[bpt/guile.git] / NEWS
diff --git a/NEWS b/NEWS
index 3a8d96d..96315cc 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -53,25 +53,76 @@ mirror site; the canonical location is "ftp://prep.ai.mit.edu/pub/gnu".
 
 * Changes to the procedure for linking libguile with your programs
 
-** You can now use the 'build-guile' utility to link against Guile.
+** You can now use the `guile-config' utility to build programs that use Guile.
 
-Guile now includes a command-line utility called 'build-guile', which
-writes to its standard output a list of flags which you must pass to
-the linker to link against the Guile library.  The flags include
-'-lguile' itself, and any other libraries the Guile library depends
-upon.
+Guile now includes a command-line utility called `guile-config', which
+can provide information about how to compile and link programs that
+use Guile.
+
+*** `guile-config compile' prints any C compiler flags needed to use Guile.
+You should include this command's output on the command line you use
+to compile C or C++ code that #includes the Guile header files.  It's
+usually just a `-I' flag to help the compiler find the Guile headers.
+
+
+*** `guile-config link' prints any linker flags necessary to link with Guile.
+
+This command writes to its standard output a list of flags which you
+must pass to the linker to link your code against the Guile library.
+The flags include '-lguile' itself, any other libraries the Guile
+library depends upon, and any `-L' flags needed to help the linker
+find those libraries.
 
 For example, here is a Makefile rule that builds a program named 'foo'
 from the object files ${FOO_OBJECTS}, and links them against Guile:
 
   foo: ${FOO_OBJECTS}
-         ${CC} ${CFLAGS} ${FOO_OBJECTS} `build-guile link` -o foo
+         ${CC} ${CFLAGS} ${FOO_OBJECTS} `guile-config link` -o foo
 
 Previous Guile releases recommended that you use autoconf to detect
 which of a predefined set of libraries were present on your system.
-It is more robust to use build-guile, since it records exactly which
+It is more robust to use `guile-config', since it records exactly which
 libraries the installed Guile library requires.
 
+This was originally called `build-guile', but was renamed to
+`guile-config' before Guile 1.3 was released, to be consistent with
+the analogous script for the GTK+ GUI toolkit, which is called
+`gtk-config'.
+
+
+** Use the GUILE_FLAGS macro in your configure.in file to find Guile.
+
+If you are using the GNU autoconf package to configure your program,
+you can use the GUILE_FLAGS autoconf macro to call `guile-config'
+(described above) and gather the necessary values for use in your
+Makefiles.
+
+The GUILE_FLAGS macro expands to configure script code which runs the
+`guile-config' script, to find out where Guile's header files and
+libraries are installed.  It sets two variables, marked for
+substitution, as by AC_SUBST.
+
+  GUILE_CFLAGS --- flags to pass to a C or C++ compiler to build
+    code that uses Guile header files.  This is almost always just a
+    -I flag.
+
+  GUILE_LDFLAGS --- flags to pass to the linker to link a
+    program against Guile.  This includes `-lguile' for the Guile
+    library itself, any libraries that Guile itself requires (like
+    -lqthreads), and so on.  It may also include a -L flag to tell the
+    compiler where to find the libraries.
+
+GUILE_FLAGS is defined in the file guile.m4, in the top-level
+directory of the Guile distribution.  You can copy it into your
+package's aclocal.m4 file, and then use it in your configure.in file.
+
+If you are using the `aclocal' program, distributed with GNU automake,
+to maintain your aclocal.m4 file, the Guile installation process
+installs guile.m4 where aclocal will find it.  All you need to do is
+use GUILE_FLAGS in your configure.in file, and then run `aclocal';
+this will copy the definition of GUILE_FLAGS into your aclocal.m4
+file.
+
 
 * Changes to Scheme functions and syntax
 
@@ -393,6 +444,12 @@ buffer objekt as an argument to throw.
 This mechanism has been removed since its utility doesn't motivate the
 extra complexity it introduces.
 
+** The `#/' notation for lists now provokes a warning message from Guile.
+This syntax will be removed from Guile in the near future.
+
+To disable the warning message, set the GUILE_HUSH environment
+variable to any non-empty value.
+
 * Changes to the gh_ interface
 
 ** The gh_enter function now takes care of loading the Guile startup files.
@@ -475,6 +532,43 @@ are now incorrect, since they will return early, and fail to mark any
 other objects the smob refers to.  Some code in the Guile library used
 to work this way.
 
+** The semantics of the I/O port functions in scm_ptobfuns have changed.
+
+If you have implemented your own I/O port type, by writing the
+functions required by the scm_ptobfuns and then calling scm_newptob,
+you will need to change your functions slightly.
+
+The functions in a scm_ptobfuns structure now expect the port itself
+as their argument; they used to expect the `stream' member of the
+port's scm_port_table structure.  This allows functions in an
+scm_ptobfuns structure to easily access the port's cell (and any flags
+it its CAR), and the port's scm_port_table structure.
+
+Guile now passes the I/O port itself as the `port' argument in the
+following scm_ptobfuns functions:
+
+  int (*free) (SCM port);
+  int (*fputc) (int, SCM port);
+  int (*fputs) (char *, SCM port);
+  scm_sizet (*fwrite) SCM_P ((char *ptr,
+                             scm_sizet size,
+                             scm_sizet nitems,
+                             SCM port));
+  int (*fflush) (SCM port);
+  int (*fgetc) (SCM port);
+  int (*fclose) (SCM port);
+
+The interfaces to the `mark', `print', `equalp', and `fgets' methods
+are unchanged.
+
+If you have existing code which defines its own port types, it is easy
+to convert your code to the new interface; simply apply SCM_STREAM to
+the port argument to yield the value you code used to expect.
+
+Note that since both the port and the stream have the same type in the
+C code --- they are both SCM values --- the C compiler will not remind
+you if you forget to update your scm_ptobfuns functions.
+
 
 ** Function: int scm_internal_select (int fds,
                                      SELECT_TYPE *rfds,
@@ -552,6 +646,26 @@ Body functions to scm_internal_catch and friends do not any longer
 take a second argument.  This is because it is no longer possible to
 pass a #f arg to catch.
 
+** Calls to scm_protect_object and scm_unprotect now nest properly.
+
+The function scm_protect_object protects its argument from being freed
+by the garbage collector.  scm_unprotect_object removes that
+protection.
+
+These functions now nest properly.  That is, for every object O, there
+is a counter which scm_protect_object(O) increments and
+scm_unprotect_object(O) decrements, if the counter is greater than
+zero.  Every object's counter is zero when it is first created.  If an
+object's counter is greater than zero, the garbage collector will not
+reclaim its storage.
+
+This allows you to use scm_protect_object in your code without
+worrying that some other function you call will call
+scm_unprotect_object, and allow it to be freed.  Assuming that the
+functions you call are well-behaved, and unprotect only those objects
+they protect, you can follow the same rule and have confidence that
+objects will be freed only at appropriate times.
+
 \f
 Changes in Guile 1.2 (released Tuesday, June 24 1997):