changeset 15427:a42d69d5a36d

Merge in Daniel's changes
author Jordi Gutiérrez Hermoso <jordigh@octave.org>
date Thu, 20 Sep 2012 10:14:03 -0400
parents 8ae34ffe5c1b (current diff) cabe2fa4566c (diff)
children 6823ad7a25b1
files autogen.sh build-aux/bootstrap build-aux/bootstrap.conf libgui/src/main-window.cc
diffstat 50 files changed, 625 insertions(+), 340 deletions(-) [+]
line wrap: on
line diff
--- a/.hgignore
+++ b/.hgignore
@@ -4,7 +4,7 @@
 # project's top-level directory".
 
 # gnulib makes these silly backup files
-^.*~
+.~$
 
 # This directory gets created by gnulib during the build. 
 # It contains no Octave files.
@@ -13,7 +13,7 @@
 # These directories mostly contain cruft during build time, but they
 # do contain some Octave code, so we gotta be a bit more careful about
 # what we ignore here
-^libgnu/.*\.([hc]$|sin$|valgrind$|charset$)
+^libgnu/.*\.([hc]$|sin$|valgrind$|charset$|mk$)
 ^m4/(?!ax_).+\.m4$
 
 # Emacs tools create these
--- a/Makefile.am
+++ b/Makefile.am
@@ -37,8 +37,8 @@
   INSTALL.OCTAVE \
   NEWS \
   README \
-  autogen.sh \
-  build-aux/bootstrap \
+  bootstrap \
+  build-aux/bootstrap_gnulib \
   build-aux/bootstrap.conf \
   build-aux/mk-opts.pl \
   build-aux/mkinstalldirs \
rename from autogen.sh
rename to bootstrap
--- a/autogen.sh
+++ b/bootstrap
@@ -1,5 +1,5 @@
 #! /bin/sh
-# autogen.sh
+# bootstrap
 # Run this to generate all the initial makefiles, etc.
 
 set -e
@@ -36,7 +36,7 @@
 
 echo "bootstrapping..."
 
-build-aux/bootstrap "$@"
+build-aux/bootstrap_gnulib "$@"
 
 ## G77 is obsolete, but it is still the first option in the autoconf Fortran
 ## macros.  We should avoid it, because mixing old versions of g77 with modern
rename from build-aux/bootstrap
rename to build-aux/bootstrap_gnulib
rename from build-aux/bootstrap.conf
rename to build-aux/bootstrap_gnulib.conf
--- a/build-aux/bootstrap.conf
+++ b/build-aux/bootstrap_gnulib.conf
@@ -19,17 +19,22 @@
 # gnulib modules used by this package.
 gnulib_modules="
   base64
-  c-strcase
+  canonicalize
+  chdir
+  close
+  closedir
   copysign
   copysignf
-  closedir
   crypto/md5
+  dup2
   fclose
   fcntl
+  fflush
   filemode
+  floor
+  floorf
   fnmatch
   fopen
-  fflush
   fseek
   ftell
   getcwd
@@ -40,23 +45,25 @@
   isatty
   link
   lstat
+  malloc
   mkdir
   mkfifo
   mkostemp
-  mkstemp
   mktime
   nanosleep
   nproc
+  open
   opendir
   pathmax
   progname
   readdir
   readlink
+  realloc
   rename
-  rewinddir
   rmdir
   round
   roundf
+  select
   sigaction
   signal
   sigprocmask
@@ -64,6 +71,7 @@
   stat
   stdint
   stdio
+  strerror
   strftime
   strptime
   symlink
--- a/build-aux/common.mk
+++ b/build-aux/common.mk
@@ -82,9 +82,9 @@
 F77 = @F77@
 AM_FFLAGS = @FFLAGS@
 FPICFLAG = @FPICFLAG@
-ALL_FFLAGS = $(FFLAGS)
 F77_FLOAT_STORE_FLAG = @F77_FLOAT_STORE_FLAG@
 F77_INTEGER_8_FLAG = @F77_INTEGER_8_FLAG@
+ALL_FFLAGS = $(FFLAGS)
 
 F77_TOLOWER=@F77_TOLOWER@
 F77_APPEND_UNDERSCORE=@F77_TOLOWER@
@@ -92,23 +92,7 @@
 
 F77_ISNAN_MACRO=@F77_ISNAN_MACRO@
 
-X11_INCFLAGS = @X11_INCFLAGS@
-X11_LIBS = @X11_LIBS@
-
-CARBON_LIBS = @CARBON_LIBS@
-
-MAGICK_CPPFLAGS = @MAGICK_CPPFLAGS@
-MAGICK_LDFLAGS = @MAGICK_LDFLAGS@
-MAGICK_LIBS = @MAGICK_LIBS@
-
-PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
-PTHREAD_LIBS = @PTHREAD_LIBS@
-
-LIBFLAGS = -L$(top_builddir)
-
-DEFS = @DEFS@
-
-UGLY_DEFS = @UGLY_DEFS@
+# C compiler flags.
 
 CC = @CC@
 ## FIXME: CC_VERSION is deprecated and should be removed in version 3.12
@@ -118,6 +102,7 @@
 XTRA_CFLAGS = @XTRA_CFLAGS@
 WARN_CFLAGS = @WARN_CFLAGS@
 AM_CFLAGS = $(XTRA_CFLAGS)
+ALL_CPPFLAGS = $(CPPFLAGS) $(HDF5_CPPFLAGS) $(Z_CPPFLAGS) $(LLVM_CPPFLAGS)
 
 BUILD_CC = @BUILD_CC@
 BUILD_CFLAGS = @BUILD_CFLAGS@
@@ -129,7 +114,10 @@
 #   omit_deps = true;
 # endif
 
-GRAPHICS_CFLAGS = @GRAPHICS_CFLAGS@
+DEFS = @DEFS@
+UGLY_DEFS = @UGLY_DEFS@
+
+# C++ compiler flags.
 
 CXX = @CXX@
 ## FIXME: CXX_VERSION is deprecated and should be removed in version 3.12
@@ -144,10 +132,11 @@
 BUILD_CXX = @BUILD_CXX@
 BUILD_CXXFLAGS = @BUILD_CXXFLAGS@
 
-NO_UNDEFINED_LDFLAG = @NO_UNDEFINED_LDFLAG@
+# Linker and library flags
 
 LD_CXX = @LD_CXX@
 LD_STATIC_FLAG = @LD_STATIC_FLAG@
+LIBFLAGS = -L$(top_builddir)
 #ALL_LDFLAGS = $(LIBFLAGS) $(LD_STATIC_FLAG) $(CPICFLAG) $(LDFLAGS)
 
 BUILD_LDFLAGS = @BUILD_LDFLAGS@
@@ -162,61 +151,33 @@
 
 RDYNAMIC_FLAG = @RDYNAMIC_FLAG@
 
-FLIBS = @FLIBS@
+NO_UNDEFINED_LDFLAG = @NO_UNDEFINED_LDFLAG@
+
+# List of libraries and their special compilation flags
 
 LIBOCTINTERP = @LIBOCTINTERP@
 LIBOCTAVE = @LIBOCTAVE@
 
-FT2_CFLAGS = @FT2_CFLAGS@
-FT2_LIBS = @FT2_LIBS@
-
-HDF5_CPPFLAGS = @HDF5_CPPFLAGS@
-HDF5_LDFLAGS = @HDF5_LDFLAGS@
-HDF5_LIBS = @HDF5_LIBS@
-
-Z_CPPFLAGS = @Z_CPPFLAGS@
-Z_LDFLAGS = @Z_LDFLAGS@
-Z_LIBS = @Z_LIBS@
-
-LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
-LLVM_LDFLAGS = @LLVM_LDFLAGS@
-LLVM_LIBS = @LLVM_LIBS@
-
-GRAPHICS_LIBS = @GRAPHICS_LIBS@
-
-QHULL_CPPFLAGS = @QHULL_CPPFLAGS@
-QHULL_LDFLAGS = @QHULL_LDFLAGS@
-QHULL_LIBS = @QHULL_LIBS@
-
-REGEX_LIBS = @REGEX_LIBS@
-
-LAPACK_LIBS = @LAPACK_LIBS@
-BLAS_LIBS = @BLAS_LIBS@
-
-FFTW3_CPPFLAGS = @FFTW3_CPPFLAGS@
-FFTW3_LDFLAGS = @FFTW3_LDFLAGS@
-FFTW3_LIBS = @FFTW3_LIBS@
-
-FFTW3F_CPPFLAGS = @FFTW3F_CPPFLAGS@
-FFTW3F_LDFLAGS = @FFTW3F_LDFLAGS@
-FFTW3F_LIBS = @FFTW3F_LIBS@
-
-GLPK_CPPFLAGS = @GLPK_CPPFLAGS@
-GLPK_LDFLAGS = @GLPK_LDFLAGS@
-GLPK_LIBS = @GLPK_LIBS@
-
-CURL_CPPFLAGS = @CURL_CPPFLAGS@
-CURL_LDFLAGS = @CURL_LDFLAGS@
-CURL_LIBS = @CURL_LIBS@
+DL_LIBS = @DL_LIBS@
+FLIBS = @FLIBS@
+LIBS = @LIBS@
 
 AMD_CPPFLAGS = @AMD_CPPFLAGS@
 AMD_LDFLAGS = @AMD_LDFLAGS@
 AMD_LIBS = @AMD_LIBS@
 
+ARPACK_CPPFLAGS = @ARPACK_CPPFLAGS@
+ARPACK_LDFLAGS = @ARPACK_LDFLAGS@
+ARPACK_LIBS = @ARPACK_LIBS@
+
+BLAS_LIBS = @BLAS_LIBS@
+
 CAMD_CPPFLAGS = @CAMD_CPPFLAGS@
 CAMD_LDFLAGS = @CAMD_LDFLAGS@
 CAMD_LIBS = @CAMD_LIBS@
 
+CARBON_LIBS = @CARBON_LIBS@
+
 COLAMD_CPPFLAGS = @COLAMD_CPPFLAGS@
 COLAMD_LDFLAGS = @COLAMD_LDFLAGS@
 COLAMD_LIBS = @COLAMD_LIBS@
@@ -229,31 +190,66 @@
 CHOLMOD_LDFLAGS = @CHOLMOD_LDFLAGS@
 CHOLMOD_LIBS = @CHOLMOD_LIBS@
 
+CURL_CPPFLAGS = @CURL_CPPFLAGS@
+CURL_LDFLAGS = @CURL_LDFLAGS@
+CURL_LIBS = @CURL_LIBS@
+
 CXSPARSE_CPPFLAGS = @CXSPARSE_CPPFLAGS@
 CXSPARSE_LDFLAGS = @CXSPARSE_LDFLAGS@
 CXSPARSE_LIBS = @CXSPARSE_LIBS@
 
-UMFPACK_CPPFLAGS = @UMFPACK_CPPFLAGS@
-UMFPACK_LDFLAGS = @UMFPACK_LDFLAGS@
-UMFPACK_LIBS = @UMFPACK_LIBS@
+FFTW3_CPPFLAGS = @FFTW3_CPPFLAGS@
+FFTW3_LDFLAGS = @FFTW3_LDFLAGS@
+FFTW3_LIBS = @FFTW3_LIBS@
+
+FFTW3F_CPPFLAGS = @FFTW3F_CPPFLAGS@
+FFTW3F_LDFLAGS = @FFTW3F_LDFLAGS@
+FFTW3F_LIBS = @FFTW3F_LIBS@
+
+FFTW_XCPPFLAGS = $(FFTW3_CPPFLAGS) $(FFTW3F_CPPFLAGS)
+FFTW_XLDFLAGS = $(FFTW3_LDFLAGS) $(FFTW3F_LDFLAGS)
+FFTW_XLIBS = $(FFTW3_LIBS) $(FFTW3F_LIBS)
+
+FT2_CFLAGS = @FT2_CFLAGS@
+FT2_LIBS = @FT2_LIBS@
+
+GLPK_CPPFLAGS = @GLPK_CPPFLAGS@
+GLPK_LDFLAGS = @GLPK_LDFLAGS@
+GLPK_LIBS = @GLPK_LIBS@
+
+GRAPHICS_CFLAGS = @GRAPHICS_CFLAGS@
+GRAPHICS_LIBS = @GRAPHICS_LIBS@
+
+HDF5_CPPFLAGS = @HDF5_CPPFLAGS@
+HDF5_LDFLAGS = @HDF5_LDFLAGS@
+HDF5_LIBS = @HDF5_LIBS@
+
+LAPACK_LIBS = @LAPACK_LIBS@
+
+LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
+LLVM_LDFLAGS = @LLVM_LDFLAGS@
+LLVM_LIBS = @LLVM_LIBS@
+
+MAGICK_CPPFLAGS = @MAGICK_CPPFLAGS@
+MAGICK_LDFLAGS = @MAGICK_LDFLAGS@
+MAGICK_LIBS = @MAGICK_LIBS@
 
 OPENGL_LIBS = @OPENGL_LIBS@
 
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+
+QHULL_CPPFLAGS = @QHULL_CPPFLAGS@
+QHULL_LDFLAGS = @QHULL_LDFLAGS@
+QHULL_LIBS = @QHULL_LIBS@
+
 QRUPDATE_CPPFLAGS = @QRUPDATE_CPPFLAGS@
 QRUPDATE_LDFLAGS = @QRUPDATE_LDFLAGS@
 QRUPDATE_LIBS = @QRUPDATE_LIBS@
 
-READLINE_LIBS = @READLINE_LIBS@
-TERM_LIBS = @TERM_LIBS@
+REGEX_LIBS = @REGEX_LIBS@
 
-ARPACK_CPPFLAGS = @ARPACK_CPPFLAGS@
-ARPACK_LDFLAGS = @ARPACK_LDFLAGS@
-ARPACK_LIBS = @ARPACK_LIBS@
-
-DL_LIBS = @DL_LIBS@
-LIBS = @LIBS@
-
-ALL_CPPFLAGS = $(CPPFLAGS) $(HDF5_CPPFLAGS) $(Z_CPPFLAGS) $(LLVM_CPPFLAGS)
+READLINE_LIBS = @READLINE_LIBS@
 
 SPARSE_XCPPFLAGS = \
   $(CHOLMOD_CPPFLAGS) $(UMFPACK_CPPFLAGS) \
@@ -271,11 +267,20 @@
     $(AMD_LIBS) $(CAMD_LIBS) $(COLAMD_LIBS) \
     $(CCOLAMD_LIBS) $(CXSPARSE_LIBS)
 
-FFTW_XCPPFLAGS = $(FFTW3_CPPFLAGS) $(FFTW3F_CPPFLAGS)
+TERM_LIBS = @TERM_LIBS@
+
+UMFPACK_CPPFLAGS = @UMFPACK_CPPFLAGS@
+UMFPACK_LDFLAGS = @UMFPACK_LDFLAGS@
+UMFPACK_LIBS = @UMFPACK_LIBS@
 
-FFTW_XLDFLAGS = $(FFTW3_LDFLAGS) $(FFTW3F_LDFLAGS)
+X11_INCFLAGS = @X11_INCFLAGS@
+X11_LIBS = @X11_LIBS@
 
-FFTW_XLIBS = $(FFTW3_LIBS) $(FFTW3F_LIBS)
+Z_CPPFLAGS = @Z_CPPFLAGS@
+Z_LDFLAGS = @Z_LDFLAGS@
+Z_LIBS = @Z_LIBS@
+
+# Miscellaneous
 
 USE_64_BIT_IDX_T = @USE_64_BIT_IDX_T@
 OCTAVE_IDX_TYPE = @OCTAVE_IDX_TYPE@
@@ -424,6 +429,8 @@
 
 NO_OCT_FILE_STRIP = @NO_OCT_FILE_STRIP@
 
+# ==================== Octave-specific Makefile rules ====================
+
 # The following pattern rules and the substitution functions require
 # GNU make.  If you don't have it, get it!
 
@@ -503,9 +510,10 @@
   -e "s|%OCTAVE_CONF_DL_LD%|\"${DL_LD}\"|" \
   -e "s|%OCTAVE_CONF_DL_LDFLAGS%|\"${DL_LDFLAGS}\"|" \
   -e "s|%OCTAVE_CONF_DL_LIBS%|\"${DL_LIBS}\"|" \
+  -e "s|%OCTAVE_CONF_ENABLE_DYNAMIC_LINKING%|\"${ENABLE_DYNAMIC_LINKING}\"|" \
+  -e "s|%OCTAVE_CONF_EXEEXT%|\"${EXEEXT}\"|" \
   -e "s|%OCTAVE_CONF_GCC_VERSION%|\"${GCC_VERSION}\"|" \
   -e "s|%OCTAVE_CONF_GXX_VERSION%|\"${GXX_VERSION}\"|" \
-  -e "s|%OCTAVE_CONF_EXEEXT%|\"${EXEEXT}\"|" \
   -e "s|%OCTAVE_CONF_F77%|\"${F77}\"|" \
   -e "s|%OCTAVE_CONF_F77_FLOAT_STORE_FLAG%|\"${F77_FLOAT_STORE_FLAG}\"|" \
   -e "s|%OCTAVE_CONF_F77_INTEGER_8_FLAG%|\"${F77_INTEGER_8_FLAG}\"|" \
@@ -519,11 +527,13 @@
   -e "s|%OCTAVE_CONF_FFTW3F_LIBS%|\"${FFTW3F_LIBS}\"|" \
   -e "s|%OCTAVE_CONF_FLIBS%|\"${FLIBS}\"|" \
   -e "s|%OCTAVE_CONF_FPICFLAG%|\"${FPICFLAG}\"|" \
+  -e "s|%OCTAVE_CONF_FT2_CFLAGS%|\"${FT2_CFLAGS}\"|" \
   -e "s|%OCTAVE_CONF_FT2_LIBS%|\"${FT2_LIBS}\"|" \
   -e "s|%OCTAVE_CONF_GLPK_CPPFLAGS%|\"${GLPK_CPPFLAGS}\"|" \
   -e "s|%OCTAVE_CONF_GLPK_LDFLAGS%|\"${GLPK_LDFLAGS}\"|" \
   -e "s|%OCTAVE_CONF_GLPK_LIBS%|\"${GLPK_LIBS}\"|" \
   -e "s|%OCTAVE_CONF_GNUPLOT%|\"${GNUPLOT}\"|" \
+  -e "s|%OCTAVE_CONF_GRAPHICS_CFLAGS%|\"${GRAPHICS_CFLAGS}\"|" \
   -e "s|%OCTAVE_CONF_GRAPHICS_LIBS%|\"${GRAPHICS_LIBS}\"|" \
   -e "s|%OCTAVE_CONF_HDF5_CPPFLAGS%|\"${HDF5_CPPFLAGS}\"|" \
   -e "s|%OCTAVE_CONF_HDF5_LDFLAGS%|\"${HDF5_LDFLAGS}\"|" \
@@ -542,13 +552,13 @@
   -e "s|%OCTAVE_CONF_LIBOCTAVE%|\"${LIBOCTAVE}\"|" \
   -e "s|%OCTAVE_CONF_LIBOCTINTERP%|\"${LIBOCTINTERP}\"|" \
   -e "s|%OCTAVE_CONF_LIBS%|\"${LIBS}\"|" \
+  -e "s|%OCTAVE_CONF_LLVM_CPPFLAGS%|\"${LLVM_CPPFLAGS}\"|" \
+  -e "s|%OCTAVE_CONF_LLVM_LDFLAGS%|\"${LLVM_LDFLAGS}\"|" \
+  -e "s|%OCTAVE_CONF_LLVM_LIBS%|\"${LLVM_LIBS}\"|" \
   -e "s|%OCTAVE_CONF_LN_S%|\"${LN_S}\"|" \
   -e "s|%OCTAVE_CONF_MAGICK_CPPFLAGS%|\"${MAGICK_CPPFLAGS}\"|" \
   -e "s|%OCTAVE_CONF_MAGICK_LDFLAGS%|\"${MAGICK_LDFLAGS}\"|" \
   -e "s|%OCTAVE_CONF_MAGICK_LIBS%|\"${MAGICK_LIBS}\"|" \
-  -e "s|%OCTAVE_CONF_LLVM_CPPFLAGS%|\"${LLVM_CPPFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_LLVM_LDFLAGS%|\"${LLVM_LDFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_LLVM_LIBS%|\"${LLVM_LIBS}\"|" \
   -e 's|%OCTAVE_CONF_MKOCTFILE_DL_LDFLAGS%|\"@MKOCTFILE_DL_LDFLAGS@\"|' \
   -e "s|%OCTAVE_CONF_OCTAVE_LINK_DEPS%|\"${OCTAVE_LINK_DEPS}\"|" \
   -e "s|%OCTAVE_CONF_OCTAVE_LINK_OPTS%|\"${OCTAVE_LINK_OPTS}\"|" \
@@ -588,7 +598,8 @@
   -e "s|%OCTAVE_CONF_UMFPACK_LIBS%|\"${UMFPACK_LIBS}\"|" \
   -e "s|%OCTAVE_CONF_USE_64_BIT_IDX_T%|\"${USE_64_BIT_IDX_T}\"|" \
   -e "s|%OCTAVE_CONF_VERSION%|\"${version}\"|" \
-  -e "s|%OCTAVE_CONF_ENABLE_DYNAMIC_LINKING%|\"${ENABLE_DYNAMIC_LINKING}\"|" \
+  -e "s|%OCTAVE_CONF_WARN_CFLAGS%|\"${WARN_CFLAGS}\"|" \
+  -e "s|%OCTAVE_CONF_WARN_CXXFLAGS%|\"${WARN_CXXFLAGS}\"|" \
   -e "s|%OCTAVE_CONF_X11_INCFLAGS%|\"${X11_INCFLAGS}\"|" \
   -e "s|%OCTAVE_CONF_X11_LIBS%|\"${X11_LIBS}\"|" \
   -e "s|%OCTAVE_CONF_XTRA_CFLAGS%|\"${XTRA_CFLAGS}\"|" \
--- a/configure.ac
+++ b/configure.ac
@@ -1798,22 +1798,6 @@
 AC_HEADER_DIRENT
 AC_HEADER_SYS_WAIT
 
-dnl FIXME: We should probably only generate this file if it is missing.
-### Produce unistd.h for MSVC target, this simplifies changes in
-### Octave source tree and avoid problems with lex-generated code.
-case $canonical_host_type in
-  *-*-msdosmsvc)
-    AC_MSG_NOTICE([Generating replacement for <unistd.h> for MSVC])
-    cat << \EOF > unistd.h
-/* File generated by configure script. */
-#include <direct.h>
-#include <io.h>
-#include <process.h>
-EOF
-    CPPFLAGS="-I. $CPPFLAGS"
-    ;;
-esac
-
 ## C headers
 
 dnl Use multiple AC_CHECKs to avoid line continuations '\' in list
@@ -2578,12 +2562,16 @@
   QHULL CPPFLAGS:              $QHULL_CPPFLAGS
   QHULL LDFLAGS:               $QHULL_LDFLAGS
   QHULL libraries:             $QHULL_LIBS
+  QRUPDATE CPPFLAGS:           $QRUPDATE_CPPFLAGS
+  QRUPDATE LDFLAGS:            $QRUPDATE_LDFLAGS
   QRUPDATE libraries:          $QRUPDATE_LIBS
   Qt headers:                  $QT_INCDIR
   Qt libraries:                $QT_LIBDIR
   READLINE libraries:          $READLINE_LIBS
   REGEX libraries:             $REGEX_LIBS
   TERM libraries:              $TERM_LIBS
+  UMFPACK CPPFLAGS:            $UMFPACK_CPPFLAGS
+  UMFPACK LDFLAGS:             $UMFPACK_LDFLAGS
   UMFPACK libraries:           $UMFPACK_LIBS
   X11 include flags:           $X11_INCFLAGS
   X11 libraries:               $X11_LIBS
--- a/doc/interpreter/contrib.txi
+++ b/doc/interpreter/contrib.txi
@@ -82,7 +82,7 @@
 Generate the necessary configuration files:
 
 @example
-./autogen.sh
+./bootstrap
 @end example
 
 @item
--- a/etc/HACKING
+++ b/etc/HACKING
@@ -43,9 +43,9 @@
 
   http://www.gnu.org/software/octave/download.html
 
-After cloning Octave, you will need to run the autogen.sh script:
+After cloning Octave, you will need to run the bootstrap script:
 
-  $ ./autogen.sh
+  $ ./bootstrap
 
 This script will examine the source tree and generate some Makefile
 fragments and then runs the bootstrap script.  The bootstrap script comes
@@ -70,10 +70,10 @@
 corresponding Mercurial revision if you update the working directory to
 a past revision not too far in the past.
 
-Additional options besides --gnulib-srcdir can be passed to autogen.sh and
-they will be forwarded without modification to the bootstrap script.
+Additional options besides --gnulib-srcdir can be passed to bootstrap and
+they will be forwarded without modification to the gnulib bootstrap script.
 
-Once the autogen.sh and bootstrap scripts complete successfully, you may
+Once the bootstrap and bootstrap_gnulib scripts complete successfully, you may
 run
 
   $ ./configure
@@ -115,8 +115,8 @@
 
   libgnu        -- gnulib sources that we use.  The files here are
                    copied here from the gnulib directory by the
-                   build-aux/bootstrap script that is run by the
-                   autogen.sh script.
+                   build-aux/bootstrap_gnulib script that is run by the
+                   bootstrap script.
 
 
   liboctave     -- C++ interfaces to the numerical libraries, Fortran
--- a/etc/README.MacOS
+++ b/etc/README.MacOS
@@ -270,8 +270,8 @@
 After installing each of the dependencies, the sources are compiled by
 setting the proper environment variables and then following the standard build
 sequence.  The following is an example set of variables for a 32-bit build
-using gcc-4.2.  When building from the sources obtained from the mercurial
-archive, ./autogen.sh must be run prior to ./configure.
+using gcc-4.2.  When building from the sources obtained from the Mercurial
+archive, ./bootstrap must be run prior to ./configure.
 
   export FINK_PREFIX="/sw"
   export PREFIX="/usr/local/bin"
@@ -385,7 +385,7 @@
 Octave may now be built from a local mercurial archive by typing the commands
 below (these assume gcc-4.4 is installed by macports).
 
-  ./autogen.sh
+  ./bootstrap
   export PREFIX=/opt/local
   export CC=/opt/local/bin/gcc-mp-4.4
   export CXX=/opt/local/bin/g++-mp-4.4
--- a/etc/README.MinGW
+++ b/etc/README.MinGW
@@ -94,7 +94,7 @@
   http://thread.gmane.org/gmane.comp.gnu.octave.bugs/12361/focus=12404
 
   To build development sources from the Mercurial repository you must run
-  'autogen.sh' (bootstrap) before running configure and make.  This requires
+  bootstrap before running configure and make.  This requires
   that automake and autoconf tools be installed.
 
 
--- a/libgnu/Makefile.am
+++ b/libgnu/Makefile.am
@@ -21,7 +21,7 @@
 # the same distribution terms as the rest of that program.
 #
 # Generated by gnulib-tool.
-# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl --lib=libgnu --source-base=libgnu --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --no-conditional-dependencies --libtool --macro-prefix=gl base64 c-strcase closedir copysign copysignf crypto/md5 fclose fcntl fflush filemode fnmatch fopen fseek ftell getcwd gethostname getopt-gnu gettimeofday glob isatty link lstat mkdir mkfifo mkostemp mkstemp mktime nanosleep nproc opendir pathmax progname readdir readlink rename rewinddir rmdir round roundf sigaction signal sigprocmask sleep stat stdint stdio strftime strptime symlink sys_stat sys_time sys_times time times tmpfile trunc truncf unistd unlink vasprintf
+# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl --lib=libgnu --source-base=libgnu --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --no-conditional-dependencies --libtool --macro-prefix=gl base64 canonicalize chdir close closedir copysign copysignf crypto/md5 dup2 fclose fcntl fflush filemode floor floorf fnmatch fopen fseek ftell getcwd gethostname getopt-gnu gettimeofday glob isatty link lstat malloc mkdir mkfifo mkostemp mktime nanosleep nproc open opendir pathmax progname readdir readlink realloc rename rmdir round roundf select sigaction signal sigprocmask sleep stat stdint stdio strerror strftime strptime symlink sys_stat sys_time sys_times time times tmpfile trunc truncf unistd unlink vasprintf
 
 AUTOMAKE_OPTIONS = 1.5 gnits
 
@@ -51,6 +51,7 @@
 libgnu_la_LDFLAGS += -no-undefined
 libgnu_la_LDFLAGS += $(COPYSIGNF_LIBM)
 libgnu_la_LDFLAGS += $(COPYSIGN_LIBM)
+libgnu_la_LDFLAGS += $(FLOORF_LIBM)
 libgnu_la_LDFLAGS += $(FLOOR_LIBM)
 libgnu_la_LDFLAGS += $(GETHOSTNAME_LIB)
 libgnu_la_LDFLAGS += $(LIBSOCKET)
@@ -96,6 +97,14 @@
 
 ## end   gnulib module alloca-opt
 
+## begin gnulib module areadlink-with-size
+
+libgnu_la_SOURCES += areadlink-with-size.c
+
+EXTRA_DIST += areadlink.h
+
+## end   gnulib module areadlink-with-size
+
 ## begin gnulib module at-internal
 
 
@@ -111,17 +120,25 @@
 
 ## end   gnulib module base64
 
+## begin gnulib module bitrotate
+
+libgnu_la_SOURCES += bitrotate.h
+
+## end   gnulib module bitrotate
+
 ## begin gnulib module c-ctype
 
 libgnu_la_SOURCES += c-ctype.h c-ctype.c
 
 ## end   gnulib module c-ctype
 
-## begin gnulib module c-strcase
-
-libgnu_la_SOURCES += c-strcase.h c-strcasecmp.c c-strncasecmp.c
-
-## end   gnulib module c-strcase
+## begin gnulib module canonicalize
+
+libgnu_la_SOURCES += canonicalize.c
+
+EXTRA_DIST += canonicalize.h
+
+## end   gnulib module canonicalize
 
 ## begin gnulib module canonicalize-lgpl
 
@@ -294,6 +311,16 @@
 
 ## end   gnulib module dirfd
 
+## begin gnulib module dirname
+
+libgnu_la_SOURCES += dirname.c basename.c
+
+EXTRA_DIST += stripslash.c
+
+EXTRA_libgnu_la_SOURCES += stripslash.c
+
+## end   gnulib module dirname
+
 ## begin gnulib module dirname-lgpl
 
 libgnu_la_SOURCES += dirname-lgpl.c basename-lgpl.c stripslash.c
@@ -466,6 +493,14 @@
 
 ## end   gnulib module fflush
 
+## begin gnulib module file-set
+
+libgnu_la_SOURCES += file-set.c
+
+EXTRA_DIST += file-set.h
+
+## end   gnulib module file-set
+
 ## begin gnulib module filemode
 
 libgnu_la_SOURCES += filemode.c
@@ -529,6 +564,15 @@
 
 ## end   gnulib module floor
 
+## begin gnulib module floorf
+
+
+EXTRA_DIST += floor.c floorf.c
+
+EXTRA_libgnu_la_SOURCES += floor.c floorf.c
+
+## end   gnulib module floorf
+
 ## begin gnulib module fnmatch
 
 BUILT_SOURCES += $(FNMATCH_H)
@@ -751,6 +795,28 @@
 
 ## end   gnulib module glob
 
+## begin gnulib module hash
+
+libgnu_la_SOURCES += hash.c
+
+EXTRA_DIST += hash.h
+
+## end   gnulib module hash
+
+## begin gnulib module hash-pjw
+
+libgnu_la_SOURCES += hash-pjw.h hash-pjw.c
+
+## end   gnulib module hash-pjw
+
+## begin gnulib module hash-triple
+
+libgnu_la_SOURCES += hash-triple.c
+
+EXTRA_DIST += hash-triple.h
+
+## end   gnulib module hash-triple
+
 ## begin gnulib module intprops
 
 
@@ -895,6 +961,15 @@
 
 ## end   gnulib module lstat
 
+## begin gnulib module malloc-gnu
+
+
+EXTRA_DIST += malloc.c
+
+EXTRA_libgnu_la_SOURCES += malloc.c
+
+## end   gnulib module malloc-gnu
+
 ## begin gnulib module malloc-posix
 
 
@@ -1276,15 +1351,6 @@
 
 ## end   gnulib module mkostemp
 
-## begin gnulib module mkstemp
-
-
-EXTRA_DIST += mkstemp.c
-
-EXTRA_libgnu_la_SOURCES += mkstemp.c
-
-## end   gnulib module mkstemp
-
 ## begin gnulib module mktime
 
 
@@ -1409,6 +1475,15 @@
 
 ## end   gnulib module readlink
 
+## begin gnulib module realloc-gnu
+
+
+EXTRA_DIST += realloc.c
+
+EXTRA_libgnu_la_SOURCES += realloc.c
+
+## end   gnulib module realloc-gnu
+
 ## begin gnulib module realloc-posix
 
 
@@ -1463,6 +1538,14 @@
 
 ## end   gnulib module roundf
 
+## begin gnulib module same
+
+libgnu_la_SOURCES += same.c
+
+EXTRA_DIST += same.h
+
+## end   gnulib module same
+
 ## begin gnulib module same-inode
 
 
@@ -2230,6 +2313,24 @@
 
 ## end   gnulib module strings
 
+## begin gnulib module strndup
+
+
+EXTRA_DIST += strndup.c
+
+EXTRA_libgnu_la_SOURCES += strndup.c
+
+## end   gnulib module strndup
+
+## begin gnulib module strnlen
+
+
+EXTRA_DIST += strnlen.c
+
+EXTRA_libgnu_la_SOURCES += strnlen.c
+
+## end   gnulib module strnlen
+
 ## begin gnulib module strnlen1
 
 libgnu_la_SOURCES += strnlen1.h strnlen1.c
@@ -2970,12 +3071,47 @@
 
 ## end   gnulib module wctype-h
 
+## begin gnulib module xalloc
+
+libgnu_la_SOURCES += xmalloc.c
+
+EXTRA_DIST += xalloc.h
+
+## end   gnulib module xalloc
+
+## begin gnulib module xalloc-die
+
+libgnu_la_SOURCES += xalloc-die.c
+
+## end   gnulib module xalloc-die
+
+## begin gnulib module xalloc-oversized
+
+
+EXTRA_DIST += xalloc-oversized.h
+
+## end   gnulib module xalloc-oversized
+
+## begin gnulib module xgetcwd
+
+libgnu_la_SOURCES += xgetcwd.c
+
+EXTRA_DIST += xgetcwd.h
+
+## end   gnulib module xgetcwd
+
 ## begin gnulib module xsize
 
 libgnu_la_SOURCES += xsize.h
 
 ## end   gnulib module xsize
 
+## begin gnulib module xstrndup
+
+libgnu_la_SOURCES += xstrndup.h xstrndup.c
+
+## end   gnulib module xstrndup
+
 
 mostlyclean-local: mostlyclean-generic
 	@for dir in '' $(MOSTLYCLEANDIRS); do \
--- a/libgui/src/main-window.cc
+++ b/libgui/src/main-window.cc
@@ -42,10 +42,11 @@
 #include "octave-link.h"
 #include "settings-dialog.h"
 
-#include "debug.h"
+#include "builtins.h"
+#include "defaults.h"
 #include "load-save.h"
 #include "toplev.h"
-#include "variables.h"
+#include "version.h"
 
 #include "cmd-hist.h"
 #include "oct-env.h"
@@ -376,22 +377,7 @@
 void
 main_window::show_about_octave ()
 {
-  QString message =
-    "GNU Octave\n"
-    "Copyright (C) 2009 John W. Eaton and others.\n"
-    "This is free software; see the source code for copying conditions."
-    "There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or"
-    "FITNESS FOR A PARTICULAR PURPOSE.  For details, type `warranty'.\n"
-    "\n"
-    "Additional information about Octave is available at http://www.octave.org.\n"
-    "\n"
-    "Please contribute if you find this software useful."
-    "For more information, visit http://www.octave.org/help-wanted.html\n"
-    "\n"
-    "Report bugs to <bug@octave.org> (but first, please read"
-    "http://www.octave.org/bugs.html to learn how to write a helpful report).\n"
-    "\n"
-    "For information about changes from previous versions, type `news'.\n";
+  QString message = OCTAVE_STARTUP_MESSAGE;
 
   QMessageBox::about (this, tr ("About Octave"), message);
 }
@@ -883,19 +869,19 @@
 void
 main_window::save_workspace_callback (const std::string& file)
 {
-  save_workspace (file);
+  Fsave (ovl (file));
 }
 
 void
 main_window::load_workspace_callback (const std::string& file)
 {
-  load_workspace (file);
+  Fload (ovl (file));
 }
 
 void
 main_window::clear_workspace_callback (void)
 {
-  clear_current_scope ();
+  Fclear ();
 }
 
 void
@@ -909,41 +895,41 @@
 void
 main_window::change_directory_callback (const std::string& directory)
 {
-  octave_env::chdir (directory); 
+  Fcd (ovl (directory));
 }
 
 void
 main_window::debug_continue_callback (void)
 {
-  debug_continue ();
+  Fdbcont ();
 }
 
 void
 main_window::debug_step_into_callback (void)
 {
-  debug_step ("in");
+  Fdbstep (ovl ("in"));
 }
 
 void
 main_window::debug_step_over_callback (void)
 {
-  debug_step ();
+  Fdbstep ();
 }
 
 void
 main_window::debug_step_out_callback (void)
 {
-  debug_step ("out");
+  Fdbstep (ovl ("out"));
 }
 
 void
 main_window::debug_quit_callback (void)
 {
-  debug_quit ();
+  Fdbquit ();
 }
 
 void
 main_window::exit_callback (void)
 {
-  clean_up_and_exit (0);
+  Fquit ();
 }
--- a/libgui/src/module.mk
+++ b/libgui/src/module.mk
@@ -141,7 +141,7 @@
   -I$(top_builddir)/liboctave/operators -I$(top_srcdir)/liboctave/operators \
   -I$(top_srcdir)/liboctave/system \
   -I$(top_srcdir)/liboctave/util \
-  -I$(top_srcdir)/libinterp \
+  -I$(top_builddir)/libinterp -I$(top_srcdir)/libinterp \
   -I$(top_builddir)/libinterp/parse-tree -I$(top_srcdir)/libinterp/parse-tree \
   -I$(top_builddir)/libinterp/interp-core -I$(top_srcdir)/libinterp/interp-core \
   -I$(top_builddir)/libinterp/interpfcn -I$(top_srcdir)/libinterp/interpfcn \
--- a/libinterp/Makefile.am
+++ b/libinterp/Makefile.am
@@ -53,6 +53,7 @@
   interpfcn/defaults.h \
   interpfcn/graphics-props.cc \
   interpfcn/graphics.h \
+  builtin-defun-decls.h \
   operators/ops.cc \
   parse-tree/lex.cc \
   parse-tree/oct-gperf.h \
@@ -73,6 +74,7 @@
   interp-core/oct-errno.cc \
   interpfcn/defaults.h \
   interpfcn/graphics.h \
+  builtin-defun-decls.h \
   operators/ops.cc \
   oct-conf.h \
   version.h \
@@ -100,6 +102,7 @@
   interpfcn/graphics-props.cc \
   parse-tree/oct-gperf.h \
   builtins.h \
+  builtin-defun-decls.h \
   octave.h \
   $(OCTAVE_VALUE_INC) \
   $(PARSE_TREE_INC) \
@@ -157,6 +160,7 @@
   interpfcn/defaults.h \
   interpfcn/graphics.h \
   operators/ops.cc \
+  builtin-defun-decls.h \
   builtins.cc \
   oct-conf.h \
   version.h \
@@ -188,9 +192,6 @@
   -bindir $(bindir) \
   $(LIBOCTINTERP_LINK_OPTS)
 
-## FIXME: Does this rule need to be uncommented?
-#fft.df fft.lo fft2.df fft2.lo fftn.df fftn.lo: CPPFLAGS += $(FFTW_XCPPFLAGS)
-
 ## Section for defining and creating DEF_FILES
 SRC_DEF_FILES := $(shell $(srcdir)/find-defun-files.sh "$(srcdir)" $(DIST_SRC))
 
@@ -210,6 +211,8 @@
 
 $(DEF_FILES): $(OPT_HANDLERS) $(OPT_INC)
 
+## FIXME: The following two variables are deprecated and should be removed
+##        in Octave version 3.12.
 DLL_CDEFS = @OCTINTERP_DLL_DEFS@
 DLL_CXXDEFS = @OCTINTERP_DLL_DEFS@
 
@@ -247,7 +250,11 @@
 	mv $@-t $@
 
 builtins.cc: $(DEF_FILES) mkbuiltins
-	$(srcdir)/mkbuiltins $(DEF_FILES) > $@-t
+	$(srcdir)/mkbuiltins --source $(DEF_FILES) > $@-t
+	mv $@-t $@
+
+builtin-defun-decls.h: $(SRC_DEF_FILES) mkbuiltins
+	$(srcdir)/mkbuiltins --header $(SRC_DEF_FILES) > $@-t
 	mv $@-t $@
 
 if AMCOND_ENABLE_DYNAMIC_LINKING
--- a/libinterp/builtins.h
+++ b/libinterp/builtins.h
@@ -23,6 +23,10 @@
 #if !defined (octave_builtins_h)
 #define octave_builtins_h 1
 
+#if !defined (MAKE_BUILTINS)
+#include "builtin-defun-decls.h"
+#endif
+
 extern OCTINTERP_API void install_builtins (void);
 
 #endif
--- a/libinterp/corefcn/mgorth.cc
+++ b/libinterp/corefcn/mgorth.cc
@@ -51,15 +51,16 @@
 DEFUN (mgorth, args, nargout,
   "-*- texinfo -*-\n\
 @deftypefn {Built-in Function} {[@var{y}, @var{h}] =} mgorth (@var{x}, @var{v})\n\
-Orthogonalize a given column vector @var{x} with respect to a given\n\
-orthonormal basis @var{v} using a modified Gram-Schmidt orthogonalization.  \n\
+Orthogonalize a given column vector @var{x} with respect to a set of\n\
+orthonormal vectors comprising the columns of @var{v}\n\
+using the modified Gram-Schmidt method.\n\
 On exit, @var{y} is a unit vector such that:\n\
 \n\
 @example\n\
 @group\n\
   norm (@var{y}) = 1\n\
   @var{v}' * @var{y} = 0\n\
-  @var{x} = @var{h}*[@var{v}, @var{y}]\n\
+  @var{x} = [@var{v}, @var{y}]*@var{h}'\n\
 @end group\n\
 @end example\n\
 \n\
@@ -81,7 +82,7 @@
   if (arg_v.ndims () != 2 || arg_x.ndims () != 2 || arg_x.columns () != 1
       || arg_v.rows () != arg_x.rows ())
     {
-      error ("mgorth: V should me a matrix, and X a column vector with"
+      error ("mgorth: V should be a matrix, and X a column vector with"
              " the same number of rows as V.");
       return retval;
     }
--- a/libinterp/corefcn/module.mk
+++ b/libinterp/corefcn/module.mk
@@ -95,5 +95,5 @@
 noinst_LTLIBRARIES += corefcn/libcorefcn.la
 
 corefcn_libcorefcn_la_SOURCES = $(COREFCN_SRC)
-corefcn_libcorefcn_la_CPPFLAGS = $(liboctinterp_la_CPPFLAGS)
+corefcn_libcorefcn_la_CPPFLAGS = $(liboctinterp_la_CPPFLAGS) $(FFTW_XCPPFLAGS)
 
--- a/libinterp/dldfcn/__init_gnuplot__.cc
+++ b/libinterp/dldfcn/__init_gnuplot__.cc
@@ -33,6 +33,7 @@
 #include <config.h>
 #endif
 
+#include "builtins.h"
 #include "defun-dld.h"
 #include "error.h"
 #include "graphics.h"
@@ -148,24 +149,17 @@
 
           if (! error_state)
             {
-              args(1) = "\nquit;\n";
-              args(0) = fids(0);
-              feval ("fputs", args);
+              Ffputs (ovl (fids(0), "\nquit;\n"));
 
-              args.resize (1);
-              feval ("fflush", args);
-              feval ("pclose", args);
+              Ffflush (ovl (fids(0)));
+              Fpclose (ovl (fids(0)));
 
               if (fids.numel () > 1)
                 {
-                  args(0) = fids(1);
-                  feval ("pclose", args);
+                  Fpclose (ovl (fids(1)));
 
                   if (fids.numel () > 2)
-                    {
-                      args(0) = fids(2);
-                      feval ("waitpid", args);
-                    }
+                    Fwaitpid (ovl (fids(2)));
                 }
             }
         }
--- a/libinterp/interp-core/defun-dld.h
+++ b/libinterp/interp-core/defun-dld.h
@@ -57,14 +57,14 @@
 #else
 
 #define DEFUN_DLD(name, args_name, nargout_name, doc) \
-  DECLARE_FUN_NO_DEFAULTS (name, args_name, nargout_name); \
+  DECLARE_FUN (name, args_name, nargout_name); \
   DEFINE_FUN_INSTALLER_FUN (name, doc) \
-  DECLARE_FUN_NO_DEFAULTS (name, args_name, nargout_name)
+  DECLARE_FUN (name, args_name, nargout_name)
 
 #define DEFUNX_DLD(name, fname, gname, args_name, nargout_name, doc) \
-  DECLARE_FUNX_NO_DEFAULTS (fname, args_name, nargout_name); \
+  DECLARE_FUNX (fname, args_name, nargout_name); \
   DEFINE_FUNX_INSTALLER_FUN (name, fname, gname, doc) \
-  DECLARE_FUNX_NO_DEFAULTS (fname, args_name, nargout_name)
+  DECLARE_FUNX (fname, args_name, nargout_name)
 
 #endif
 
--- a/libinterp/interp-core/defun-int.h
+++ b/libinterp/interp-core/defun-int.h
@@ -77,23 +77,13 @@
 extern OCTINTERP_API void
 defun_isargout (int, int, bool *);
 
-#define DECLARE_FUNXX(name, args_decl, nargout_decl) \
-  OCTAVE_EXPORT octave_value_list name (args_decl, nargout_decl)
-
 #define DECLARE_FUNX(name, args_name, nargout_name) \
-  DECLARE_FUNXX (name, \
-                 const octave_value_list& args_name = octave_value_list (), \
-                 int nargout_name = 0)
-
-#define DECLARE_FUNX_NO_DEFAULTS(name, args_name, nargout_name) \
-  DECLARE_FUNXX (name, const octave_value_list& args_name, int nargout_name)
+  OCTAVE_EXPORT octave_value_list \
+  name (const octave_value_list& args_name, int nargout_name)
 
 #define DECLARE_FUN(name, args_name, nargout_name) \
   DECLARE_FUNX (F ## name, args_name, nargout_name)
 
-#define DECLARE_FUN_NO_DEFAULTS(name, args_name, nargout_name) \
-  DECLARE_FUNX_NO_DEFAULTS (F ## name, args_name, nargout_name)
-
 // Define the code that will be used to insert the new function into
 // the symbol table.  We look for this name instead of the actual
 // function so that we can easily install the doc std::string too.
--- a/libinterp/interp-core/module.mk
+++ b/libinterp/interp-core/module.mk
@@ -111,8 +111,11 @@
   $(JIT_SRC) \
   $(C_INTERP_CORE_SRC)
 
-## FIXME: I don't believe this rule actually fires
-display.df display.lo: CPPFLAGS += $(X11_FLAGS)
+## FIXME: Automake does not support per-object rules.
+##        These rules could be emulated by creating a new convenience
+##        library and using per-library rules.  Or we can just live
+##        without the rule since there haven't been any problems. (09/18/2012)
+#display.df display.lo: CPPFLAGS += $(X11_FLAGS)
 
 ## Special rules for sources which must be built before rest of compilation.
 interp-core/oct-errno.cc: interp-core/oct-errno.in.cc Makefile
--- a/libinterp/interp-core/oct-obj.h
+++ b/libinterp/interp-core/oct-obj.h
@@ -166,4 +166,152 @@
   DECLARE_OCTAVE_ALLOCATOR
 };
 
+// Make it easy to build argument lists for built-in functions or for
+// returning values.
+
+inline octave_value_list
+ovl (const octave_value& a0)
+{
+  octave_value_list retval;
+  retval(0) = a0;
+  return retval;
+}
+
+inline octave_value_list
+ovl (const octave_value& a0, const octave_value& a1)
+{
+  octave_value_list retval;
+  retval(1) = a1;
+  retval(0) = a0;
+  return retval;
+}
+
+inline octave_value_list
+ovl (const octave_value& a0, const octave_value& a1,
+     const octave_value& a2)
+{
+  octave_value_list retval;
+  retval(2) = a2;
+  retval(1) = a1;
+  retval(0) = a0;
+  return retval;
+}
+
+inline octave_value_list
+ovl (const octave_value& a0, const octave_value& a1,
+     const octave_value& a2, const octave_value& a3)
+{
+  octave_value_list retval;
+  retval(3) = a3;
+  retval(2) = a2;
+  retval(1) = a1;
+  retval(0) = a0;
+  return retval;
+}
+
+inline octave_value_list
+ovl (const octave_value& a0, const octave_value& a1,
+     const octave_value& a2, const octave_value& a3,
+     const octave_value& a4)
+{
+  octave_value_list retval;
+  retval(4) = a4;
+  retval(3) = a3;
+  retval(2) = a2;
+  retval(1) = a1;
+  retval(0) = a0;
+  return retval;
+}
+
+inline octave_value_list
+ovl (const octave_value& a0, const octave_value& a1,
+     const octave_value& a2, const octave_value& a3,
+     const octave_value& a4, const octave_value& a5)
+{
+  octave_value_list retval;
+  retval(5) = a5;
+  retval(4) = a4;
+  retval(3) = a3;
+  retval(2) = a2;
+  retval(1) = a1;
+  retval(0) = a0;
+  return retval;
+}
+
+inline octave_value_list
+ovl (const octave_value& a0, const octave_value& a1,
+     const octave_value& a2, const octave_value& a3,
+     const octave_value& a4, const octave_value& a5,
+     const octave_value& a6)
+{
+  octave_value_list retval;
+  retval(6) = a6;
+  retval(5) = a5;
+  retval(4) = a4;
+  retval(3) = a3;
+  retval(2) = a2;
+  retval(1) = a1;
+  retval(0) = a0;
+  return retval;
+}
+
+inline octave_value_list
+ovl (const octave_value& a0, const octave_value& a1,
+     const octave_value& a2, const octave_value& a3,
+     const octave_value& a4, const octave_value& a5,
+     const octave_value& a6, const octave_value& a7)
+{
+  octave_value_list retval;
+  retval(7) = a7;
+  retval(6) = a6;
+  retval(5) = a5;
+  retval(4) = a4;
+  retval(3) = a3;
+  retval(2) = a2;
+  retval(1) = a1;
+  retval(0) = a0;
+  return retval;
+}
+
+inline octave_value_list
+ovl (const octave_value& a0, const octave_value& a1,
+     const octave_value& a2, const octave_value& a3,
+     const octave_value& a4, const octave_value& a5,
+     const octave_value& a6, const octave_value& a7,
+     const octave_value& a8)
+{
+  octave_value_list retval;
+  retval(8) = a8;
+  retval(7) = a7;
+  retval(6) = a6;
+  retval(5) = a5;
+  retval(4) = a4;
+  retval(3) = a3;
+  retval(2) = a2;
+  retval(1) = a1;
+  retval(0) = a0;
+  return retval;
+}
+
+inline octave_value_list
+ovl (const octave_value& a0, const octave_value& a1,
+     const octave_value& a2, const octave_value& a3,
+     const octave_value& a4, const octave_value& a5,
+     const octave_value& a6, const octave_value& a7,
+     const octave_value& a8, const octave_value& a9)
+{
+  octave_value_list retval;
+  retval(9) = a9;
+  retval(8) = a8;
+  retval(7) = a7;
+  retval(6) = a6;
+  retval(5) = a5;
+  retval(4) = a4;
+  retval(3) = a3;
+  retval(2) = a2;
+  retval(1) = a1;
+  retval(0) = a0;
+  return retval;
+}
+
 #endif
--- a/libinterp/interpfcn/debug.cc
+++ b/libinterp/interpfcn/debug.cc
@@ -1201,17 +1201,6 @@
 
 DEFALIAS (dbnext, dbstep);
 
-void
-debug_step (const std::string& what)
-{
-  octave_value_list args;
-
-  if (! what.empty ())
-    args(0) = what;
-
-  Fdbstep (args);
-}
-
 DEFUN (dbcont, args, ,
   "-*- texinfo -*-\n\
 @deftypefn {Command} {} dbcont\n\
@@ -1236,12 +1225,6 @@
   return octave_value_list ();
 }
 
-void
-debug_continue (void)
-{
-  Fdbcont ();
-}
-
 DEFUN (dbquit, args, ,
   "-*- texinfo -*-\n\
 @deftypefn {Command} {} dbquit\n\
@@ -1269,12 +1252,6 @@
   return octave_value_list ();
 }
 
-void
-debug_quit (void)
-{
-  Fdbquit ();
-}
-
 DEFUN (isdebugmode, args, ,
   "-*- texinfo -*-\n\
 @deftypefn {Built-in Function} {} isdebugmode ()\n\
--- a/libinterp/interpfcn/debug.h
+++ b/libinterp/interpfcn/debug.h
@@ -131,10 +131,4 @@
 
 extern std::string get_file_line (const std::string& fname, size_t line);
 
-extern void OCTINTERP_API debug_continue (void);
-
-extern void OCTINTERP_API debug_step (const std::string& what = std::string ());
-
-extern void OCTINTERP_API debug_quit (void);
-
 #endif
--- a/libinterp/interpfcn/graphics.cc
+++ b/libinterp/interpfcn/graphics.cc
@@ -42,6 +42,7 @@
 #include "oct-locbuf.h"
 #include "singleton-cleanup.h"
 
+#include "builtins.h"
 #include "cutils.h"
 #include "defun.h"
 #include "display.h"
@@ -8202,7 +8203,7 @@
 
   if (Vdrawnow_requested && ! old_Vdrawnow_requested)
     {
-      feval ("drawnow");
+      Fdrawnow ();
 
       Vdrawnow_requested = false;
     }
--- a/libinterp/interpfcn/load-save.cc
+++ b/libinterp/interpfcn/load-save.cc
@@ -1443,17 +1443,6 @@
     }
 }
 
-void
-load_workspace (const std::string& file)
-{
-  octave_value_list args;
-
-  if (! file.empty ())
-    args(0) = file;
-
-  Fload (args);
-}
-
 DEFUN (save, args, ,
   "-*- texinfo -*-\n\
 @deftypefn  {Command} {} save file\n\
@@ -1755,17 +1744,6 @@
   return retval;
 }
 
-void
-save_workspace (const std::string& file)
-{
-  octave_value_list args;
-
-  if (! file.empty ())
-    args(0) = file;
-
-  Fsave (args);
-}
-
 DEFUN (crash_dumps_octave_core, args, nargout,
   "-*- texinfo -*-\n\
 @deftypefn  {Built-in Function} {@var{val} =} crash_dumps_octave_core ()\n\
--- a/libinterp/interpfcn/load-save.h
+++ b/libinterp/interpfcn/load-save.h
@@ -87,7 +87,4 @@
 extern void
 write_header (std::ostream& os, load_save_format format);
 
-extern OCTINTERP_API void load_workspace (const std::string& file);
-extern OCTINTERP_API void save_workspace (const std::string& file);
-
 #endif
--- a/libinterp/interpfcn/module.mk
+++ b/libinterp/interpfcn/module.mk
@@ -65,13 +65,6 @@
 	$(AWK) -v emit_graphics_props=1 -f $(srcdir)/genprops.awk $< > $@-t
 	mv $@-t $@
 
-## FIXME: Do these rules work correctly after transplant to interpfcn/ dir?
-__fltk_uigetfile__.lo __fltk_uigetfile__.o: \
-  AM_CXXFLAGS := $(filter-out $(DLL_CXXDEFS), $(AM_CXXFLAGS) $(GRAPHICS_CFLAGS))
-
-__init_fltk__.lo __init_fltk__.o: \
-  AM_CXXFLAGS := $(filter-out $(DLL_CXXDEFS), $(AM_CXXFLAGS) $(GRAPHICS_CFLAGS))
-
 noinst_LTLIBRARIES += interpfcn/libinterpfcn.la
 
 interpfcn_libinterpfcn_la_SOURCES = $(INTERPFCN_SRC)
--- a/libinterp/interpfcn/sysdep.cc
+++ b/libinterp/interpfcn/sysdep.cc
@@ -69,6 +69,7 @@
 #include "quit.h"
 
 #include "Cell.h"
+#include "builtins.h"
 #include "defun.h"
 #include "error.h"
 #include "input.h"
@@ -645,7 +646,7 @@
 
   if (interactive || forced_interactive)
     {
-      feval ("drawnow");
+      Fdrawnow ();
 
       int c = octave_kbhit (args.length () == 0);
 
@@ -697,7 +698,7 @@
         {
           if (! xisnan (dval))
             {
-              feval ("drawnow");
+              Fdrawnow ();
 
               if (xisinf (dval))
                 {
@@ -713,7 +714,7 @@
     }
   else
     {
-      feval ("drawnow");
+      Fdrawnow ();
       flush_octave_stdout ();
       octave_kbhit ();
     }
@@ -746,7 +747,7 @@
             warning ("sleep: NaN is an invalid delay");
           else
             {
-              feval ("drawnow");
+              Fdrawnow ();
               octave_sleep (dval);
             }
         }
@@ -786,7 +787,7 @@
             warning ("usleep: NaN is an invalid delay");
           else
             {
-              feval ("drawnow");
+              Fdrawnow ();
 
               int delay = NINT (dval);
 
--- a/libinterp/interpfcn/toplev.cc
+++ b/libinterp/interpfcn/toplev.cc
@@ -1249,10 +1249,10 @@
       { false, "ARPACK_LDFLAGS", OCTAVE_CONF_ARPACK_LDFLAGS },
       { false, "ARPACK_LIBS", OCTAVE_CONF_ARPACK_LIBS },
       { false, "BLAS_LIBS", OCTAVE_CONF_BLAS_LIBS },
-      { false, "CARBON_LIBS", OCTAVE_CONF_CARBON_LIBS },
       { false, "CAMD_CPPFLAGS", OCTAVE_CONF_CAMD_CPPFLAGS },
       { false, "CAMD_LDFLAGS", OCTAVE_CONF_CAMD_LDFLAGS },
       { false, "CAMD_LIBS", OCTAVE_CONF_CAMD_LIBS },
+      { false, "CARBON_LIBS", OCTAVE_CONF_CARBON_LIBS },
       { false, "CC", OCTAVE_CONF_CC },
       // FIXME: CC_VERSION is deprecated.  Remove in version 3.12
       { false, "CC_VERSION", OCTAVE_CONF_CC_VERSION },
@@ -1302,11 +1302,13 @@
       { false, "FFTW3F_LIBS", OCTAVE_CONF_FFTW3F_LIBS },
       { false, "FLIBS", OCTAVE_CONF_FLIBS },
       { false, "FPICFLAG", OCTAVE_CONF_FPICFLAG },
+      { false, "FT2_CFLAGS", OCTAVE_CONF_FT2_CFLAGS },
       { false, "FT2_LIBS", OCTAVE_CONF_FT2_LIBS },
       { false, "GLPK_CPPFLAGS", OCTAVE_CONF_GLPK_CPPFLAGS },
       { false, "GLPK_LDFLAGS", OCTAVE_CONF_GLPK_LDFLAGS },
       { false, "GLPK_LIBS", OCTAVE_CONF_GLPK_LIBS },
       { false, "GNUPLOT", OCTAVE_CONF_GNUPLOT },
+      { false, "GRAPHICS_CFLAGS", OCTAVE_CONF_GRAPHICS_CFLAGS },
       { false, "GRAPHICS_LIBS", OCTAVE_CONF_GRAPHICS_LIBS },
       { false, "HDF5_CPPFLAGS", OCTAVE_CONF_HDF5_CPPFLAGS },
       { false, "HDF5_LDFLAGS", OCTAVE_CONF_HDF5_LDFLAGS },
@@ -1323,13 +1325,13 @@
       { false, "LIBOCTAVE", OCTAVE_CONF_LIBOCTAVE },
       { false, "LIBOCTINTERP", OCTAVE_CONF_LIBOCTINTERP },
       { false, "LIBS", OCTAVE_CONF_LIBS },
+      { false, "LLVM_CPPFLAGS", OCTAVE_CONF_LLVM_CPPFLAGS },
+      { false, "LLVM_LDFLAGS", OCTAVE_CONF_LLVM_LDFLAGS },
+      { false, "LLVM_LIBS", OCTAVE_CONF_LLVM_LIBS },
       { false, "LN_S", OCTAVE_CONF_LN_S },
       { false, "MAGICK_CPPFLAGS", OCTAVE_CONF_MAGICK_CPPFLAGS },
       { false, "MAGICK_LDFLAGS", OCTAVE_CONF_MAGICK_LDFLAGS },
       { false, "MAGICK_LIBS", OCTAVE_CONF_MAGICK_LIBS },
-      { false, "LLVM_CPPFLAGS", OCTAVE_CONF_LLVM_CPPFLAGS },
-      { false, "LLVM_LDFLAGS", OCTAVE_CONF_LLVM_LDFLAGS },
-      { false, "LLVM_LIBS", OCTAVE_CONF_LLVM_LIBS },
       { false, "MKOCTFILE_DL_LDFLAGS", OCTAVE_CONF_MKOCTFILE_DL_LDFLAGS },
       { false, "OCTAVE_LINK_DEPS", OCTAVE_CONF_OCTAVE_LINK_DEPS },
       { false, "OCTAVE_LINK_OPTS", OCTAVE_CONF_OCTAVE_LINK_OPTS },
@@ -1364,6 +1366,8 @@
       { false, "UMFPACK_LDFLAGS", OCTAVE_CONF_UMFPACK_LDFLAGS },
       { false, "UMFPACK_LIBS", OCTAVE_CONF_UMFPACK_LIBS },
       { false, "USE_64_BIT_IDX_T", OCTAVE_CONF_USE_64_BIT_IDX_T },
+      { false, "WARN_CFLAGS", OCTAVE_CONF_WARN_CFLAGS },
+      { false, "WARN_CXXFLAGS", OCTAVE_CONF_WARN_CXXFLAGS },
       { false, "X11_INCFLAGS", OCTAVE_CONF_X11_INCFLAGS },
       { false, "X11_LIBS", OCTAVE_CONF_X11_LIBS },
       { false, "XTRA_CFLAGS", OCTAVE_CONF_XTRA_CFLAGS },
--- a/libinterp/interpfcn/variables.cc
+++ b/libinterp/interpfcn/variables.cc
@@ -2460,12 +2460,6 @@
   return retval;
 }
 
-void
-clear_current_scope (void)
-{
-  Fclear ();
-}
-
 DEFUN (whos_line_format, args, nargout,
   "-*- texinfo -*-\n\
 @deftypefn  {Built-in Function} {@var{val} =} whos_line_format ()\n\
--- a/libinterp/interpfcn/variables.h
+++ b/libinterp/interpfcn/variables.h
@@ -148,7 +148,4 @@
 
 extern OCTINTERP_API void maybe_missing_function_hook (const std::string& name);
 
-// Equivalent to Fclear without any arguments.
-extern OCTINTERP_API void clear_current_scope (void);
-
 #endif
--- a/libinterp/mkbuiltins
+++ b/libinterp/mkbuiltins
@@ -18,14 +18,59 @@
 # along with Octave; see the file COPYING.  If not, see
 # <http://www.gnu.org/licenses/>.
 
-if test $# -eq 0; then
-  echo "usage: mkbuiltins f1 f2 ..." 1>&2
+if test $# -lt 2; then
+  echo "usage: mkbuiltins --header|--source f1 f2 ..." 1>&2
   exit 1
 fi
 
 SED=${SED:-'sed'}
 
-cat << \EOF
+make_header=false
+make_source=false
+case "$1" in
+  --header)
+    make_header=true
+    shift
+  ;;
+  --source)
+    make_source=true
+    shift
+  ;;
+  *)
+    echo "mkbuiltins: unrecognized option: $1" 1>&2
+    exit 1
+  ;;
+esac
+
+if $make_header; then
+
+  cat << \EOF
+// DO NOT EDIT!  Generated automatically by mkbuiltins.
+
+#if !defined (octave_builtin_defun_decls_h)
+#define octave_builtin_defun_decls_h 1
+
+#include "oct-obj.h"
+
+#define DEFUN_DECL(name) \
+  extern OCTINTERP_API octave_value_list \
+  name (const octave_value_list& = octave_value_list (), int = 0);
+
+EOF
+
+ $SED -n -e 's/ *\(XDEFUN\|XDEFCONSTFUN\)_INTERNAL *( *\([_A-Za-z][_A-Za-z0-9]*\) *,.*$/DEFUN_DECL (F\2);/p; s/^ *XDEFUNX_INTERNAL *( *"\([_A-Za-z][_A-Za-z0-9]*\)" *,.*$/DEFUN_DECL (F\1);/p' "$@"
+
+  cat << \EOF
+
+#undef DEFUN_DECL
+
+#endif
+
+EOF
+
+else
+
+  cat << \EOF
 // DO NOT EDIT!  Generated automatically by mkbuiltins.
 
 #ifdef HAVE_CONFIG_H
@@ -79,33 +124,35 @@
 
 EOF
 
-for arg
-do
-  fcn=`echo "$arg" | $SED 's,.*/,,; s/\.df//; s/-/_/g;'`
-  echo "static void"
-  echo "install_${fcn}_fcns (void)"
-  echo "{"
-  cat "$arg"
-  echo "}"
-  echo ""
-done
+  for arg
+  do
+    fcn=`echo "$arg" | $SED 's,.*/,,; s/\.df//; s/-/_/g;'`
+    echo "static void"
+    echo "install_${fcn}_fcns (void)"
+    echo "{"
+    cat "$arg"
+    echo "}"
+    echo ""
+  done
 
-cat << \EOF
+  cat << \EOF
 
 void
 install_builtins (void)
 {
 EOF
 
-for arg
-do
-  fcn=`echo "$arg" | $SED 's,.*/,,; s/\.df//; s/-/_/g;'`
-  echo "  install_${fcn}_fcns ();"
-done
+  for arg
+  do
+    fcn=`echo "$arg" | $SED 's,.*/,,; s/\.df//; s/-/_/g;'`
+    echo "  install_${fcn}_fcns ();"
+  done
 
-cat << \EOF
+  cat << \EOF
 }
 
 EOF
 
+fi
+
 exit 0
--- a/libinterp/oct-conf.in.h
+++ b/libinterp/oct-conf.in.h
@@ -214,6 +214,14 @@
 #define OCTAVE_CONF_DL_LIBS %OCTAVE_CONF_DL_LIBS%
 #endif
 
+#ifndef OCTAVE_CONF_ENABLE_DYNAMIC_LINKING
+#define OCTAVE_CONF_ENABLE_DYNAMIC_LINKING %OCTAVE_CONF_ENABLE_DYNAMIC_LINKING%
+#endif
+
+#ifndef OCTAVE_CONF_EXEEXT
+#define OCTAVE_CONF_EXEEXT %OCTAVE_CONF_EXEEXT%
+#endif
+
 #ifndef OCTAVE_CONF_GCC_VERSION
 #define OCTAVE_CONF_GCC_VERSION %OCTAVE_CONF_GCC_VERSION%
 #endif
@@ -222,10 +230,6 @@
 #define OCTAVE_CONF_GXX_VERSION %OCTAVE_CONF_GXX_VERSION%
 #endif
 
-#ifndef OCTAVE_CONF_EXEEXT
-#define OCTAVE_CONF_EXEEXT %OCTAVE_CONF_EXEEXT%
-#endif
-
 #ifndef OCTAVE_CONF_F77
 #define OCTAVE_CONF_F77 %OCTAVE_CONF_F77%
 #endif
@@ -278,6 +282,10 @@
 #define OCTAVE_CONF_FPICFLAG %OCTAVE_CONF_FPICFLAG%
 #endif
 
+#ifndef OCTAVE_CONF_FT2_CFLAGS
+#define OCTAVE_CONF_FT2_CFLAGS %OCTAVE_CONF_FT2_CFLAGS%
+#endif
+
 #ifndef OCTAVE_CONF_FT2_LIBS
 #define OCTAVE_CONF_FT2_LIBS %OCTAVE_CONF_FT2_LIBS%
 #endif
@@ -298,6 +306,10 @@
 #define OCTAVE_CONF_GNUPLOT %OCTAVE_CONF_GNUPLOT%
 #endif
 
+#ifndef OCTAVE_CONF_GRAPHICS_CFLAGS
+#define OCTAVE_CONF_GRAPHICS_CFLAGS %OCTAVE_CONF_GRAPHICS_CFLAGS%
+#endif
+
 #ifndef OCTAVE_CONF_GRAPHICS_LIBS
 #define OCTAVE_CONF_GRAPHICS_LIBS %OCTAVE_CONF_GRAPHICS_LIBS%
 #endif
@@ -550,8 +562,12 @@
 #define OCTAVE_CONF_USE_64_BIT_IDX_T %OCTAVE_CONF_USE_64_BIT_IDX_T%
 #endif
 
-#ifndef OCTAVE_CONF_ENABLE_DYNAMIC_LINKING
-#define OCTAVE_CONF_ENABLE_DYNAMIC_LINKING %OCTAVE_CONF_ENABLE_DYNAMIC_LINKING%
+#ifndef OCTAVE_CONF_WARN_CFLAGS
+#define OCTAVE_CONF_WARN_CFLAGS %OCTAVE_CONF_WARN_CFLAGS%
+#endif
+
+#ifndef OCTAVE_CONF_WARN_CXXFLAGS
+#define OCTAVE_CONF_WARN_CXXFLAGS %OCTAVE_CONF_WARN_CXXFLAGS%
 #endif
 
 #ifndef OCTAVE_CONF_X11_INCFLAGS
--- a/libinterp/parse-tree/module.mk
+++ b/libinterp/parse-tree/module.mk
@@ -11,8 +11,12 @@
   parse-tree/lex.ll \
   parse-tree/oct-parse.yy
 
-lex.lo lex.o oct-parse.lo oct-parse.o: \
-  AM_CXXFLAGS := $(filter-out -Wold-style-cast, $(AM_CXXFLAGS))
+## FIXME: Automake does not support per-object rules.
+##        These rules could be emulated by creating a new convenience
+##        library and using per-library rules.  Or we can just live
+##        with the extra warnings about old-sytle-casts. (09/18/2012)
+#lex.lo lex.o oct-parse.lo oct-parse.o: \
+#  AM_CXXFLAGS := $(filter-out -Wold-style-cast, $(AM_CXXFLAGS))
 
 PARSE_TREE_INC = \
   parse-tree/pt-all.h \
--- a/liboctave/Makefile.am
+++ b/liboctave/Makefile.am
@@ -85,18 +85,11 @@
 ## It has no source code itself.
 liboctave_la_SOURCES = 
 
-## FIXME: SPARSE, FFTW, and ARPACK flags should probably only be in the
-##        particular convenience library that needs them.  
-liboctave_la_CPPFLAGS = \
-  @OCTAVE_DLL_DEFS@ \
-  $(SPARSE_XCPPFLAGS) \
-  $(FFTW_XCPPFLAGS) \
-  $(ARPACK_CPPFLAGS) \
-  $(AM_CPPFLAGS)
+liboctave_la_CPPFLAGS = @OCTAVE_DLL_DEFS@ $(AM_CPPFLAGS)
 
 include link-deps.mk
 
-# Dummy C++ source to cause C++ linking.
+# Dummy C++ source to force C++ linking.
 nodist_EXTRA_liboctave_la_SOURCES = dummy.cc
 
 liboctave_la_LIBADD = \
--- a/liboctave/array/module.mk
+++ b/liboctave/array/module.mk
@@ -137,5 +137,7 @@
 noinst_LTLIBRARIES += array/libarray.la
 
 array_libarray_la_SOURCES = $(ARRAY_SRC)
-array_libarray_la_CPPFLAGS = $(liboctave_la_CPPFLAGS)
+array_libarray_la_CPPFLAGS = \
+  $(liboctave_la_CPPFLAGS) \
+  $(SPARSE_XCPPFLAGS)
 
--- a/liboctave/cruft/Makefile.am
+++ b/liboctave/cruft/Makefile.am
@@ -36,9 +36,7 @@
 
 libcruft_la_FFLAGS = $(F77_INTEGER_8_FLAG)
 
-libcruft_la_CPPFLAGS = \
-  @CRUFT_DLL_DEFS@ \
-  $(AM_CPPFLAGS)
+libcruft_la_CPPFLAGS = @CRUFT_DLL_DEFS@ $(AM_CPPFLAGS)
 
 libcruft_la_DEPENDENCIES = cruft.def
 
--- a/liboctave/link-deps.mk
+++ b/liboctave/link-deps.mk
@@ -1,6 +1,7 @@
 GNULIB_LINK_DEPS = \
   $(COPYSIGNF_LIBM)\
   $(COPYSIGN_LIBM)\
+  $(FLOORF_LIBM)\
   $(FLOOR_LIBM)\
   $(GETHOSTNAME_LIB)\
   $(LIBSOCKET)\
--- a/liboctave/numeric/lo-mappers.cc
+++ b/liboctave/numeric/lo-mappers.cc
@@ -279,10 +279,15 @@
   return gnulib::copysignf (x, y);
 }
 
+float xfloor (float x)
+{
+  return gnulib::floorf (x);
+}
+
 float
 xround (float x)
 {
-  return gnulib::round (x);
+  return gnulib::roundf (x);
 }
 
 float
--- a/liboctave/numeric/lo-mappers.h
+++ b/liboctave/numeric/lo-mappers.h
@@ -119,7 +119,7 @@
 extern OCTAVE_API float xtrunc (float x);
 extern OCTAVE_API float xcopysign (float x, float y);
 inline float xceil (float x) { return ceilf (x); }
-inline float xfloor (float x) { return floorf (x); }
+extern OCTAVE_API float xfloor (float x);
 inline float arg (float x) { return atan2f (0.0f, x); }
 inline float conj (float x) { return x; }
 inline float fix (float x) { return xtrunc (x); }
--- a/liboctave/numeric/module.mk
+++ b/liboctave/numeric/module.mk
@@ -1,5 +1,5 @@
 EXTRA_DIST += \
-	numeric/module.mk \
+  numeric/module.mk \
   $(OPT_IN)
 
 OPT_INC = \
@@ -156,7 +156,7 @@
   numeric/SparsedbleCHOL.cc \
   numeric/SparsedbleLU.cc \
   numeric/SparseQR.cc \
-	$(NUMERIC_C_SRC)
+  $(NUMERIC_C_SRC)
 
 TEMPLATE_SRC += \
   numeric/base-lu.cc \
@@ -176,5 +176,9 @@
 noinst_LTLIBRARIES += numeric/libnumeric.la
 
 numeric_libnumeric_la_SOURCES = $(NUMERIC_SRC)
-numeric_libnumeric_la_CPPFLAGS = $(liboctave_la_CPPFLAGS)
+numeric_libnumeric_la_CPPFLAGS = \
+  $(liboctave_la_CPPFLAGS) \
+  $(ARPACK_CPPFLAGS) \
+  $(FFTW_XCPPFLAGS) \
+  $(SPARSE_XCPPFLAGS)
 
--- a/liboctave/numeric/randmtzig.c
+++ b/liboctave/numeric/randmtzig.c
@@ -260,7 +260,7 @@
     int n = 0;
 
     /* Look for entropy in /dev/urandom */
-    FILE* urandom =fopen ("/dev/urandom", "rb");
+    FILE* urandom = fopen ("/dev/urandom", "rb");
     if (urandom)
       {
         while (n < MT_N)
@@ -400,8 +400,8 @@
 static double
 randu53 (void)
 {
-  const uint32_t a=randi32 ()>>5;
-  const uint32_t b=randi32 ()>>6;
+  const uint32_t a = randi32 ()>>5;
+  const uint32_t b = randi32 ()>>6;
   return (a*67108864.0+b+0.4) * (1.0/9007199254740992.0);
 }
 
@@ -593,7 +593,7 @@
 # else /* !HAVE_X86_32 */
       /* arbitrary mantissa (selected by NRANDI, with 1 bit for sign) */
       const uint64_t r = NRANDI;
-      const int64_t rabs=r>>1;
+      const int64_t rabs = r>>1;
       const int idx = (int)(rabs&0xFF);
       const double x = ( r&1 ? -rabs : rabs) * wi[idx];
 # endif /* !HAVE_X86_32 */
--- a/liboctave/operators/mx-ops
+++ b/liboctave/operators/mx-ops
@@ -16,7 +16,7 @@
 # along with Octave; see the file COPYING.  If not, see
 # <http://www.gnu.org/licenses/>.
 
-# NOTE: if this file changes, you must run autogen.sh and configure to
+# NOTE: if this file changes, you must run bootstrap and configure to
 # rebuild the source file lists for Make.
 
 # types
--- a/liboctave/operators/sparse-mx-ops
+++ b/liboctave/operators/sparse-mx-ops
@@ -16,7 +16,7 @@
 # along with Octave; see the file COPYING.  If not, see
 # <http://www.gnu.org/licenses/>.
 
-# NOTE: if this file changes, you must run autogen.sh and configure to
+# NOTE: if this file changes, you must run bootstrap and configure to
 # rebuild the source file lists for Make.
 
 # types
--- a/liboctave/operators/vx-ops
+++ b/liboctave/operators/vx-ops
@@ -16,7 +16,7 @@
 # along with Octave; see the file COPYING.  If not, see
 # <http://www.gnu.org/licenses/>.
 
-# NOTE: if this file changes, you must run autogen.sh and configure to
+# NOTE: if this file changes, you must run bootstrap and configure to
 # rebuild the source file lists for Make.
 
 # types
--- a/liboctave/system/file-ops.cc
+++ b/liboctave/system/file-ops.cc
@@ -37,6 +37,7 @@
 #include <unistd.h>
 
 #include "pathmax.h"
+#include "canonicalize.h"
 
 #include "dir-ops.h"
 #include "file-ops.h"
--- a/liboctave/util/module.mk
+++ b/liboctave/util/module.mk
@@ -82,5 +82,7 @@
 noinst_LTLIBRARIES += util/libutil.la
 
 util_libutil_la_SOURCES = $(UTIL_SRC)
-util_libutil_la_CPPFLAGS = $(liboctave_la_CPPFLAGS)
+util_libutil_la_CPPFLAGS = \
+  $(liboctave_la_CPPFLAGS) \
+  $(SPARSE_XCPPFLAGS)
 
--- a/scripts/plot/saveas.m
+++ b/scripts/plot/saveas.m
@@ -102,6 +102,6 @@
 
   prt_opt = strcat ("-d", tolower (fmt));
 
-  print (filename, prt_opt);
+  print (fig, filename, prt_opt);
 
 endfunction