changeset 9794:0d4613a736e9

convert build system to use automake and libtool
author John W. Eaton <jwe@octave.org>
date Tue, 10 Nov 2009 15:02:25 -0500
parents 7161e9b41cf6
children 3ccd3a03944c
files AUTHORS ChangeLog Makeconf.in Makefile Makefile.am acinclude.m4 aclocal.m4 autogen.sh common.mk configure.ac doc/ChangeLog doc/Makefile.am doc/Makefile.in doc/faq/Makefile.am doc/faq/Makefile.in doc/faq/Octave-FAQ.texi doc/faq/OctaveFAQ.texi doc/interpreter/Makefile.am doc/interpreter/Makefile.in doc/interpreter/config-images.sh doc/interpreter/images doc/interpreter/images.awk doc/interpreter/munge-texi.cc doc/liboctave/Makefile.am doc/liboctave/Makefile.in doc/liboctave/liboctave.texi doc/refcard/Makefile.am doc/refcard/Makefile.in emacs/Makefile.in emacs/module.mk examples/@FIRfilter/Makefile.in examples/@FIRfilter/module.mk examples/@polynomial/Makefile.in examples/@polynomial/module.mk examples/Makefile.am examples/Makefile.in install-sh libcruft/ChangeLog libcruft/Makefile.am libcruft/Makefile.in libcruft/Makerules.in libcruft/amos/Makefile.in libcruft/amos/module.mk libcruft/blas-xtra/Makefile.in libcruft/blas-xtra/module.mk libcruft/blas/Makefile.in libcruft/blas/module.mk libcruft/daspk/Makefile.in libcruft/daspk/module.mk libcruft/dasrt/Makefile.in libcruft/dasrt/module.mk libcruft/dassl/Makefile.in libcruft/dassl/module.mk libcruft/fftpack/Makefile.in libcruft/fftpack/module.mk libcruft/lapack-xtra/Makefile.in libcruft/lapack-xtra/module.mk libcruft/lapack/Makefile.in libcruft/lapack/module.mk libcruft/misc/Makefile.in libcruft/misc/module.mk libcruft/odepack/Makefile.in libcruft/odepack/module.mk libcruft/ordered-qz/Makefile.in libcruft/ordered-qz/module.mk libcruft/quadpack/Makefile.in libcruft/quadpack/module.mk libcruft/ranlib/Makefile.in libcruft/ranlib/module.mk libcruft/slatec-err/Makefile.in libcruft/slatec-err/module.mk libcruft/slatec-fn/Makefile.in libcruft/slatec-fn/module.mk libcruft/villad/Makefile.in libcruft/villad/module.mk liboctave/ChangeLog liboctave/Makefile.am liboctave/Makefile.in liboctave/config-ops.sh liboctave/mx-ops liboctave/sparse-mx-ops liboctave/vx-ops m4/Makefile.in m4/module.mk mkoctfile.cc.in mkoctfile.in octMakefile.in run-octave.in scripts/ChangeLog scripts/Makefile.am scripts/Makefile.in scripts/audio/Makefile.in scripts/audio/module.mk scripts/configure.ac scripts/deprecated/Makefile.in scripts/deprecated/module.mk scripts/elfun/Makefile.in scripts/elfun/module.mk scripts/general/Makefile.in scripts/general/module.mk scripts/geometry/Makefile.in scripts/geometry/module.mk scripts/help/Makefile.in scripts/help/module.mk scripts/image/Makefile.in scripts/image/module.mk scripts/io/Makefile.in scripts/io/module.mk scripts/linear-algebra/Makefile.in scripts/linear-algebra/module.mk scripts/miscellaneous/Makefile.in scripts/miscellaneous/module.mk scripts/mk-pkg-add scripts/mkdoc scripts/mkpkgadd scripts/move-if-change scripts/optimization/Makefile.in scripts/optimization/module.mk scripts/path/Makefile.in scripts/path/module.mk scripts/pkg/Makefile.in scripts/pkg/module.mk scripts/plot/Makefile.in scripts/plot/module.mk scripts/polynomial/Makefile.in scripts/polynomial/module.mk scripts/set/Makefile.in scripts/set/module.mk scripts/signal/Makefile.in scripts/signal/module.mk scripts/skip-autoheader scripts/sparse/Makefile.in scripts/sparse/module.mk scripts/specfun/Makefile.in scripts/specfun/module.mk scripts/special-matrix/Makefile.in scripts/special-matrix/module.mk scripts/startup/Makefile.in scripts/startup/module.mk scripts/statistics/Makefile.in scripts/statistics/base/Makefile.in scripts/statistics/base/module.mk scripts/statistics/distributions/Makefile.in scripts/statistics/distributions/module.mk scripts/statistics/models/Makefile.in scripts/statistics/models/module.mk scripts/statistics/tests/Makefile.in scripts/statistics/tests/module.mk scripts/strings/Makefile.in scripts/strings/module.mk scripts/testfun/Makefile.in scripts/testfun/module.mk scripts/time/Makefile.in scripts/time/module.mk src/ChangeLog src/DLD-FUNCTIONS/config-module.awk src/DLD-FUNCTIONS/config-module.sh src/DLD-FUNCTIONS/module-files src/Makefile.am src/Makefile.in src/OPERATORS/module.mk src/TEMPLATE-INST/module.mk src/find-defun-files.sh src/lex.l src/lex.ll src/mkbuiltins src/mkgendoc src/oct-conf.h.in src/oct-parse.yy src/parse.y src/toplev.cc src/version.h src/version.h.in test/@Blork/module.mk test/@Cork/module.mk test/@Dork/module.mk test/@Gork/module.mk test/@Pork/module.mk test/@Sneetch/module.mk test/@Snork/module.mk test/@Spork/module.mk test/ChangeLog test/Makefile.am test/Makefile.in
diffstat 182 files changed, 18191 insertions(+), 19636 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Tue Nov 10 13:25:57 2009 -0500
+++ b/ChangeLog	Tue Nov 10 15:02:25 2009 -0500
@@ -1,3 +1,54 @@
+2009-11-10  John W. Eaton  <jwe@octave.org>
+
+	* configure.ac: Set octincludedir to
+	$(includedir)/octave-$(version)/octave, not
+	$(includedir)/octave-$(version).
+	* mkoctfile.in: Set DEFAULT_INCFLAGS to -I$octincludedir/.. and
+	-I$octincludedir instead of -I$octincludedir and
+	-I$octincludedir/octave.
+
+	* configure.ac: Pass args to AC_INIT.  Invoke AM_INIT_AUTOMAKE and
+	AC_PROG_LIBTOOL.  Don't call AC_PROG_RANLIB.  Set version info here.
+	Call AC_CONFIG_MACRO_DIR.  Give same warning for gcc 1.x and 2.x.
+	Use AM_CONDITIONALS for FFTW, BLAS, and LAPACK.  Don't set
+	variables with calls to ACX_BLAS_WITH_F77_FUNC or ACX_LAPACK.
+	Don't substitute BLAS_DIR or LAPACK_DIR.  Use LT_INIT.  Eliminate
+	--enable-shared and --enable-static options (now provided by
+	LT_INIT).  Set SHARED_LIBS and STATIC_LIBS variables based on
+	LT_INIT variables.  Handle dlopen libraries with info from
+	LT_INIT.  Substitute NO_UNDEFINED_FLAG (only set on Windows
+	sytems).  Include $LAPACK_LIBS in $LIBS when checking for qrupdate
+	and cholmod.  Handle --enable-dl consistently with other --enable
+	options.  Don't copy $srcdir/Makefile in AH_BOTTOM commands.
+	Substitute LEX_OUTPUT_ROOT.  Use AM_CONDITONAL for
+	ENABLE_DYNAMIC_LINKING.  Reindent configure summary.
+	(AC_CONFIG_FILES): Don't list Makefiles in libcruft
+	subdirectories.  Generate Makefile and src/version.h.  Don't
+	generate Makeconf, octMakefile, m4/Makefile, emacs/Makefile,
+	examples/@polynomial/Makefile, or examples/@FIRfilter/Makefile.
+
+	* run-octave.in Call libtool to execute src/octave.
+	(ldpreloadsep, liboctinterp, liboctave, libcruft): Delete variables.
+	(INFOFILE): Find it in $top_srcdir, not $builddir.
+
+	* acinclude.m4: Rename from aclocal.m4.
+	(OCTAVE_PROG_FLEX): Don't include -t in LFLAGS.
+
+	* autogen.sh: Exit immediately on error.  Use libtoolize, aclocal,
+	and automake.  Only run autoconf and autoheader in top-level and
+	scripts directories.
+	Run liboctave/config-ops.sh, doc/interpreter/config-images.sh, and
+	src/DLD-FUNCTIONS/config-module.sh, to generate source lists for
+	subdirectories.
+
+	* AUTHORS, Makefile.am, common.mk, m4/module.mk, emacs/module.mk,
+	examples/@FIRfilter/module.mk, examples/@polynomial/module.mk,
+	examples/Makefile.am: New files.
+	* Makeconf.in, Makefile, octMakefile.in, m4/Makefile.in,
+	emacs/Makefile.in, install-sh, examples/Makefile.in,
+	examples/@FIRfilter/Makefile.in, examples/@polynomial/Makefile.in:
+	Delete.
+
 2009-11-09  David Grundberg  <davidg@cs.umu.se>
 
 	* configure.ac: Use AMD_CPPFLAGS while checking for UMFPACK.
--- a/Makeconf.in	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,834 +0,0 @@
-# @configure_input@
-#
-# Common configuration rules for all of octave's Makefiles.
-#
-# Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-#               2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 John W. Eaton
-#
-# This file is part of Octave.
-# 
-# Octave is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 3 of the License, or (at
-# your option) any later version.
-# 
-# Octave is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with Octave; see the file COPYING.  If not, see
-# <http://www.gnu.org/licenses/>.
- 
-SHELL = /bin/sh
-
-AWK = @AWK@
-export AWK
-
-SED = @SED@
-export SED
-
-FIND = @FIND@
-export FIND
-
-PERL = @PERL@
-export PERL
-
-PYTHON = @PYTHON@
-
-GNUPLOT = @GNUPLOT@
-
-DESKTOP_FILE_INSTALL = @DESKTOP_FILE_INSTALL@
-
-# A shell command to extract the version number from version.h.
-getversion = $(SED) -e '/OCTAVE_VERSION/!d' -e 's/.*"\(.*\)".*$$/\1/' -e q
-
-# A shell command to extract the API version number from version.h.
-getapiversion = $(SED) -e '/OCTAVE_API_VERSION/!d' -e 's/.*"\(.*\)".*$$/\1/' -e q
-
-# Look for version.h to get version information.
-xfiles := $(TOPDIR)/src/version.h $(srcdir)/$(TOPDIR)/src/version.h
-version_file := $(firstword $(foreach file, $(xfiles), $(wildcard $(file))))
-version := $(shell $(getversion) $(version_file))
-api_version := $(shell $(getapiversion) $(version_file))
-
-#### Start of system configuration section. ####
-
-EXEEXT = @EXEEXT@
-
-BUILD_EXEEXT = @BUILD_EXEEXT@
-
-LEX = @LEX@
-LFLAGS = @LFLAGS@
-LEXLIB = @LEXLIB@
-
-YACC = @YACC@
-YFLAGS = -dv
-
-GPERF = @GPERF@
-
-AR = @AR@
-ARFLAGS = @ARFLAGS@ 
-
-TEMPLATE_AR = @TEMPLATE_AR@
-TEMPLATE_ARFLAGS = @TEMPLATE_ARFLAGS@
-
-RANLIB = @RANLIB@
-
-LN_S = @LN_S@
-
-MAKEINFO = @MAKEINFO@
-TEXI2DVI = @TEXI2DVI@
-TEXI2PDF = @TEXI2PDF@
-
-GHOSTSCRIPT = @GHOSTSCRIPT@
-
-DEFAULT_PAGER = @DEFAULT_PAGER@
-
-ENABLE_DYNAMIC_LINKING = @ENABLE_DYNAMIC_LINKING@
-
-STATIC_LIBS = @STATIC_LIBS@
-
-SHARED_LIBS = @SHARED_LIBS@
-SHLEXT = @SHLEXT@
-SHLEXT_VER = @SHLEXT_VER@
-SHLLIB = @SHLLIB@
-SHLLIB_VER = @SHLLIB_VER@
-SHLBIN = @SHLBIN@
-SHLBIN_VER = @SHLBIN_VER@
-SHLLINKEXT=
-
-LIBEXT = a
-LIBPRE = @LIBPRE@
-SHLPRE = @SHLPRE@
-SHLLIBPRE = @SHLLIBPRE@
-SHLBINPRE = @SHLBINPRE@
-
-# Fortran compiler flags.
-
-FC = @FC@
-F77 = @F77@
-FFLAGS = @FFLAGS@
-FPICFLAG = @FPICFLAG@
-ALL_FFLAGS = $(FFLAGS)
-F77_FLOAT_STORE_FLAG = @F77_FLOAT_STORE_FLAG@
-
-F77_TOLOWER=@F77_TOLOWER@
-F77_APPEND_UNDERSCORE=@F77_TOLOWER@
-F77_APPEND_EXTRA_UNDERSCORE=@F77_TOLOWER@
-
-# cc and associated flags.
-
-# Clean up INCFLAGS a bit if we are not compiling in a separate
-# directory.
-ifeq ($(srcdir),.)
-  TMP_IF_1 = -I.
-else
-  TMP_IF_1 = -I. -I$(srcdir)
-endif
-ifeq ($(TOPDIR),$(top_srcdir))
-  TMP_IF_2 = \
-    -I$(TOPDIR) \
-    -I$(TOPDIR)/liboctave \
-    -I$(TOPDIR)/src \
-    -I$(TOPDIR)/libcruft/misc
-else
-  TMP_IF_2 = \
-    -I$(TOPDIR) \
-    -I$(TOPDIR)/liboctave \
-    -I$(TOPDIR)/src \
-    -I$(TOPDIR)/libcruft/misc \
-    -I$(top_srcdir) \
-    -I$(top_srcdir)/liboctave \
-    -I$(top_srcdir)/src \
-    -I$(top_srcdir)/libcruft/misc
-endif
-INCFLAGS = $(TMP_IF_1) $(TMP_IF_2)
-
-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$(TOPDIR)
-
-DEFS = @DEFS@
-
-UGLY_DEFS = @UGLY_DEFS@
-
-CC = @CC@
-CC_VERSION = @CC_VERSION@
-CFLAGS = @CFLAGS@
-CPICFLAG = @CPICFLAG@
-XTRA_CFLAGS = @XTRA_CFLAGS@
-WARN_CFLAGS = @WARN_CFLAGS@
-ALL_CFLAGS = $(INCFLAGS) $(DLL_CDEFS) $(DEFS) $(XTRA_CFLAGS) $(WARN_CFLAGS) $(CFLAGS) $(PTHREAD_CFLAGS)
-BUG_CFLAGS = $(DEFS) $(XTRA_CFLAGS) $(WARN_CFLAGS) $(CFLAGS)
-
-BUILD_CC = @BUILD_CC@
-BUILD_CFLAGS = @BUILD_CFLAGS@
-
-DEPEND_FLAGS = @DEPEND_FLAGS@
-DEPEND_EXTRA_SED_PATTERN = @DEPEND_EXTRA_SED_PATTERN@
-INCLUDE_DEPS = @INCLUDE_DEPS@
-ifeq ($(INCLUDE_DEPS),false)
-  omit_deps = true;
-endif
-
-GRAPHICS_CFLAGS = @GRAPHICS_CFLAGS@
-
-CXX = @CXX@
-CXX_VERSION = @CXX_VERSION@
-CXXCPP = @CXXCPP@
-CXXFLAGS = @CXXFLAGS@
-CXXPICFLAG = @CXXPICFLAG@
-XTRA_CXXFLAGS = @XTRA_CXXFLAGS@
-WARN_CXXFLAGS = @WARN_CXXFLAGS@
-ALL_CXXFLAGS = \
-  $(INCFLAGS) $(DLL_CXXDEFS) $(DEFS) $(XTRA_CXXFLAGS) $(WARN_CXXFLAGS) $(CXXFLAGS) $(PTHREAD_CFLAGS)
-BUG_CXXFLAGS = $(DEFS) $(XTRA_CXXFLAGS) $(WARN_CXXFLAGS) $(CXXFLAGS)
-
-BUILD_CXX = @BUILD_CXX@
-BUILD_CXXFLAGS = @BUILD_CXXFLAGS@
-
-CPPFLAGS = @CPPFLAGS@
-
-LD_CXX = @LD_CXX@
-LDFLAGS = @LDFLAGS@
-LD_STATIC_FLAG = @LD_STATIC_FLAG@
-ALL_LDFLAGS = $(LIBFLAGS) $(LD_STATIC_FLAG) $(CPICFLAG) $(LDFLAGS)
-
-BUILD_LDFLAGS = @BUILD_LDFLAGS@
-
-SH_LD = @SH_LD@
-SH_LDFLAGS = @SH_LDFLAGS@
-
-DL_LD = @DL_LD@
-DL_LDFLAGS = @DL_LDFLAGS@
-
-SONAME_FLAGS = @SONAME_FLAGS@
-
-RDYNAMIC_FLAG = @RDYNAMIC_FLAG@
-
-RLD_FLAG = @RLD_FLAG@
-
-FLIBS = @FLIBS@
-
-LIBGLOB = @LIBGLOB@
-LIBOCTINTERP = @LIBOCTINTERP@
-LIBOCTAVE = @LIBOCTAVE@
-LIBCRUFT = @LIBCRUFT@
-
-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@
-
-GRAPHICS_LIBS = @GRAPHICS_LIBS@
-
-QHULL_CPPFLAGS = @QHULL_CPPFLAGS@
-QHULL_LDFLAGS = @QHULL_LDFLAGS@
-QHULL_LIBS = @QHULL_LIBS@
-
-REGEX_LIBS = @REGEX_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@
-
-AMD_CPPFLAGS = @AMD_CPPFLAGS@
-AMD_LDFLAGS = @AMD_LDFLAGS@
-AMD_LIBS = @AMD_LIBS@
-
-CAMD_CPPFLAGS = @CAMD_CPPFLAGS@
-CAMD_LDFLAGS = @CAMD_LDFLAGS@
-CAMD_LIBS = @CAMD_LIBS@
-
-COLAMD_CPPFLAGS = @COLAMD_CPPFLAGS@
-COLAMD_LDFLAGS = @COLAMD_LDFLAGS@
-COLAMD_LIBS = @COLAMD_LIBS@
-
-CCOLAMD_CPPFLAGS = @CCOLAMD_CPPFLAGS@
-CCOLAMD_LDFLAGS = @CCOLAMD_LDFLAGS@
-CCOLAMD_LIBS = @CCOLAMD_LIBS@
-
-CHOLMOD_CPPFLAGS = @CHOLMOD_CPPFLAGS@
-CHOLMOD_LDFLAGS = @CHOLMOD_LDFLAGS@
-CHOLMOD_LIBS = @CHOLMOD_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@
-
-OPENGL_LIBS = @OPENGL_LIBS@
-
-QRUPDATE_CPPFLAGS = @QRUPDATE_CPPFLAGS@
-QRUPDATE_LDFLAGS = @QRUPDATE_LDFLAGS@
-QRUPDATE_LIBS = @QRUPDATE_LIBS@
-
-READLINE_LIBS = @READLINE_LIBS@
-TERM_LIBS = @TERM_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)
-
-SPARSE_CPPFLAGS = \
-  $(CHOLMOD_CPPFLAGS) $(UMFPACK_CPPFLAGS) \
-  $(AMD_CPPFLAGS) $(CAMD_CPPFLAGS) $(COLAMD_CPPFLAGS) \
-  $(CCOLAMD_CPPFLAGS) $(CXSPARSE_CPPFLAGS)
-
-SPARSE_LDFLAGS = \
-  $(CHOLMOD_LDFLAGS) $(UMFPACK_LDFLAGS) \
-  $(AMD_LDFLAGS) $(CAMD_LDFLAGS) $(COLAMD_LDFLAGS) \
-  $(CCOLAMD_LDFLAGS) $(CXSPARSE_LDFLAGS)
-
-## Order matters, at least on some systems (Cygwin, for example).
-SPARSE_LIBS = \
-    $(CHOLMOD_LIBS) $(UMFPACK_LIBS) \
-    $(AMD_LIBS) $(CAMD_LIBS) $(COLAMD_LIBS) \
-    $(CCOLAMD_LIBS) $(CXSPARSE_LIBS)
-
-FFTW_CPPFLAGS = $(FFTW3_CPPFLAGS) $(FFTW3F_CPPFLAGS)
-
-FFTW_LDFLAGS = $(FFTW3_LDFLAGS) $(FFTW3F_LDFLAGS)
-
-FFTW_LIBS = $(FFTW3_LIBS) $(FFTW3F_LIBS)
-
-USE_64_BIT_IDX_T = @USE_64_BIT_IDX_T@
-
-TEXINFO_COLAMD = @TEXINFO_COLAMD@
-TEXINFO_CHOLMOD = @TEXINFO_CHOLMOD@
-TEXINFO_UMFPACK = @TEXINFO_UMFPACK@
-TEXINFO_QHULL = @TEXINFO_QHULL@
-
-# The arguments passed to configure.
-config_opts = @config_opts@
-
-CONFIG_SUBDIRS = @subdirs@
-
-# ==================== Where To Install Things ====================
-
-# The default location for installation.  Everything is placed in
-# subdirectories of this directory.  The default values for many of
-# the variables below are expressed in terms of this one, so you may
-# not need to change them.  This defaults to /usr/local.
-prefix = @prefix@
-
-# Like `prefix', but used for architecture-specific files.
-exec_prefix = @exec_prefix@
-
-# Where to install Octave and other binaries that people will want to
-# run directly.
-bindir = @bindir@
-
-# Normally the directory for installing executables that system
-# administrators run.  This is the same as libexecdir on Cygwin systems.
-sbindir = @sbindir@
-
-# The root of the directory tree for read-only
-# architecture-independent data files.
-datarootdir = @datarootdir@
-
-# Where to install architecture-independent data files.  ${fcnfiledir}
-# and ${localfcnfiledir} are subdirectories of this.
-datadir = @datadir@
-
-libdir = @libdir@
-
-# Where to install and expect extra files like NEWS and doc-cache.
-octetcdir = @octetcdir@
-
-# Where to install and expect libraries like libcruft.a, liboctave.a,
-# and other architecture-dependent data.
-octlibdir = @octlibdir@
-
-# Where to install and expect executable programs to be run by Octave
-# rather than directly by users.
-libexecdir = @libexecdir@
-
-# The prefix for Octave's include file directory.  The default is
-# ${prefix}/include
-includedir = @includedir@
-
-# Where to install Octave's man pages, and what extension they should
-# have.  The default is ${prefix}/man/man1
-mandir = @mandir@
-man1dir = @man1dir@
-man1ext = @man1ext@
-
-# The full path to the default doc cache file.
-doc_cache_file = @doc_cache_file@
-
-# Where to install and expect the info files describing Octave..
-infodir = @infodir@
-
-# The full path to the default info file.
-infofile = @infofile@
-
-# ==================== Octave-specific directories ====================
-
-# These variables hold the values specific to Octave.  They are
-# based on the values of the standard Make variables above.
-
-# What is the path separation character
-sepchar = @sepchar@
-
-# Where to install Octave's include files (they will actually be
-# installed in a subdirectory called octave).  The default is
-# ${includedir}/octave-${version}
-octincludedir = @octincludedir@
-
-# Where to install the function file distributed with
-# Octave.  This includes the Octave version, so that the
-# function files for different versions of Octave will install
-# themselves in separate directories.
-fcnfiledir = @fcnfiledir@
-
-# Directories Octave should search for function files specific
-# to this site (i.e. customizations), before consulting
-# ${fcnfiledir}.  This should be a colon-separated list of
-# directories.
-localfcnfiledir = @localfcnfiledir@
-localapifcnfiledir = @localapifcnfiledir@
-localverfcnfiledir = @localverfcnfiledir@
-
-# Where to put executables to be run by Octave rather than
-# the user.  This path usually includes the Octave version
-# and configuration name, so that multiple configurations
-# for multiple versions of Octave may be installed at once.
-archlibdir = @archlibdir@
-
-# Where to put executables to be run by Octave rather than by the
-# user that are specific to this site.
-localarchlibdir = @localarchlibdir@
-localapiarchlibdir = @localapiarchlibdir@
-localverarchlibdir = @localverarchlibdir@
-
-# Where to put object files that will by dynamically loaded.
-# This path usually includes the Octave version and configuration
-# name, so that multiple configurations for multiple versions of
-# Octave may be installed at once. 
-octfiledir = @octfiledir@
-
-# Directories Octave should search for object files that will be
-# dynamically loaded and that are specific to this site
-# (i.e. customizations), before consulting ${octfiledir}.  This should
-# be a colon-separated list of directories.
-localoctfiledir = @localoctfiledir@
-localapioctfiledir = @localapioctfiledir@
-localveroctfiledir = @localveroctfiledir@
-
-# Where Octave will search to find image files.
-imagedir = @imagedir@
-
-# The type of computer we are running on.
-canonical_host_type = @canonical_host_type@
-
-# Where Octave will look for startup files
-startupfiledir = ${fcnfiledir}/startup
-localstartupfiledir = ${localfcnfiledir}/startup
-
-# LD_LIBRARY_PATH, DYLD_LIBRARY_PATH, PATH, ...
-library_path_var = @library_path_var@
-
-# The separator used for elements of the LD_PRELOAD variable (might be
-# a space, so protect with $(null))
-null :=
-ldpreloadsep = $(null)@ldpreloadsep@$(null)
-
-NO_OCT_FILE_STRIP = @NO_OCT_FILE_STRIP@
-
-# The following pattern rules and the substitution functions require
-# GNU make.  If you don't have it, get it!
-
-# How to make .o files:
-
-%.o : %.f
-	$(FC) -c $(ALL_FFLAGS) -o $@ $<
-
-%.o : %.c
-	$(CC) -c $(ALL_CPPFLAGS) $(ALL_CFLAGS) $< -o $@
-
-%.o : %.cc
-	$(CXX) -c $(ALL_CPPFLAGS) $(ALL_CXXFLAGS) $< -o $@
-
-pic/%.o : %.f
-	$(FC) -c $(FPICFLAG) $(ALL_FFLAGS) $< -o $@
-
-pic/%.o : %.c
-	$(CC) -c $(ALL_CPPFLAGS) $(CPICFLAG) $(ALL_CFLAGS) $< -o $@
-
-pic/%.o : %.cc
-	$(CXX) -c $(ALL_CPPFLAGS) $(CXXPICFLAG) $(ALL_CXXFLAGS) $< -o $@
-
-# Here is a rule for generating dependencies for .cc files:
-
-%.d : %.cc
-	@echo making $@ from $<
-	@rm -f $@
-	@$(CXX) $(DEPEND_FLAGS) $(CPPFLAGS) $(ALL_CXXFLAGS) $< | \
-	  $(SED) \
-              $(DEPEND_EXTRA_SED_PATTERN) \
-	      -e 's,^[^:]*/\(.*\.o\):,\1:,' \
-	      -e 's,$*\.o,pic/& & $*.df $@,g' > $@-t
-	@mv $@-t $@
-
-# And one for .c files.too:
-
-%.d : %.c
-	@echo making $@ from $<
-	@rm -f $@
-	@$(CC) $(DEPEND_FLAGS) $(CPPFLAGS) $(ALL_CFLAGS) $< | \
-	  $(SED) \
-              $(DEPEND_EXTRA_SED_PATTERN) \
-	      -e 's,^[^:]*/\(.*\.o\):,\1:,' \
-	      -e 's,$*\.o,pic/& & $@,g' > $@-t
-	@mv $@-t $@
-
-define do-subdir-for-command
-echo making $@ in $d; $(MAKE) -C $d $@;
-endef
-
-define subdir-for-command
-$(foreach d, $(SUBDIRS), $(do-subdir-for-command))
-endef
-
-define simple-move-if-change-rule
-if [ -s $@-t ]; then \
-  $(top_srcdir)/move-if-change $@-t $@; \
-else \
-  echo "$@-t is empty!" 1>&2; \
-  rm -f $@-t; \
-  exit 1; \
-fi
-endef
-
-define builddir-move-if-change-rule
-if [ -s $(@F)-t ]; then \
-  $(top_srcdir)/move-if-change $(@F)-t $(@F); \
-else \
-  echo "$(@F)-t is empty!" 1>&2; \
-  rm -f $(@F)-t; \
-  exit 1; \
-fi
-endef
-
-# Yes, the second sed command near the end is needed, to avoid limits
-# in command lengths for some versions of sed.  UGLY_DEFS is often
-# quite large, so it makes sense to split this command there.
-
-define do-subst-config-vals
-echo "making $@ from $<"
-$(SED) < $< \
-  -e "s|%NO_OCT_FILE_STRIP%|${NO_OCT_FILE_STRIP}|" \
-  -e "s|%OCTAVE_BINDIR%|\"${bindir}\"|" \
-  -e "s|%OCTAVE_CONF_ALL_CFLAGS%|\"${ALL_CFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_ALL_CXXFLAGS%|\"${ALL_CXXFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_ALL_FFLAGS%|\"${ALL_FFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_ALL_LDFLAGS%|\"${ALL_LDFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_AMD_CPPFLAGS%|\"${AMD_CPPFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_AMD_LDFLAGS%|\"${AMD_LDFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_AMD_LIBS%|\"${AMD_LIBS}\"|" \
-  -e "s|%OCTAVE_CONF_AR%|\"${AR}\"|" \
-  -e "s|%OCTAVE_CONF_ARFLAGS%|\"${ARFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_ARPACK_CPPFLAGS%|\"${ARPACK_CPPFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_ARPACK_LDFLAGS%|\"${ARPACK_LDFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_ARPACK_LIBS%|\"${ARPACK_LIBS}\"|" \
-  -e "s|%OCTAVE_CONF_BLAS_LIBS%|\"${BLAS_LIBS}\"|" \
-  -e "s|%OCTAVE_CONF_CAMD_CPPFLAGS%|\"${CAMD_CPPFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_CAMD_LDFLAGS%|\"${CAMD_LDFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_CAMD_LIBS%|\"${CAMD_LIBS}\"|" \
-  -e "s|%OCTAVE_CONF_CANONICAL_HOST_TYPE%|\"${canonical_host_type}\"|" \
-  -e "s|%OCTAVE_CONF_CARBON_LIBS%|\"${CARBON_LIBS}\"|" \
-  -e "s|%OCTAVE_CONF_CC%|\"${CC}\"|" \
-  -e "s|%OCTAVE_CONF_CC_VERSION%|\"${CC_VERSION}\"|" \
-  -e "s|%OCTAVE_CONF_CCOLAMD_CPPFLAGS%|\"${CCOLAMD_CPPFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_CCOLAMD_LDFLAGS%|\"${CCOLAMD_LDFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_CCOLAMD_LIBS%|\"${CCOLAMD_LIBS}\"|" \
-  -e "s|%OCTAVE_CONF_CFLAGS%|\"${CFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_CHOLMOD_CPPFLAGS%|\"${CHOLMOD_CPPFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_CHOLMOD_LDFLAGS%|\"${CHOLMOD_LDFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_CHOLMOD_LIBS%|\"${CHOLMOD_LIBS}\"|" \
-  -e "s|%OCTAVE_CONF_COLAMD_CPPFLAGS%|\"${COLAMD_CPPFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_COLAMD_LDFLAGS%|\"${COLAMD_LDFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_COLAMD_LIBS%|\"${COLAMD_LIBS}\"|" \
-  -e "s|%OCTAVE_CONF_CPICFLAG%|\"${CPICFLAG}\"|" \
-  -e "s|%OCTAVE_CONF_CPPFLAGS%|\"${CPPFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_CURL_CPPFLAGS%|\"${CURL_CPPFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_CURL_LDFLAGS%|\"${CURL_LDFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_CURL_LIBS%|\"${CURL_LIBS}\"|" \
-  -e "s|%OCTAVE_CONF_CXSPARSE_CPPFLAGS%|\"${CXSPARSE_CPPFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_CXSPARSE_LDFLAGS%|\"${CXSPARSE_LDFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_CXSPARSE_LIBS%|\"${CXSPARSE_LIBS}\"|" \
-  -e "s|%OCTAVE_CONF_CXX%|\"${CXX}\"|" \
-  -e "s|%OCTAVE_CONF_CXXCPP%|\"${CXXCPP}\"|" \
-  -e "s|%OCTAVE_CONF_CXXFLAGS%|\"${CXXFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_CXXPICFLAG%|\"${CXXPICFLAG}\"|" \
-  -e "s|%OCTAVE_CONF_CXX_VERSION%|\"${CXX_VERSION}\"|" \
-  -e "s|%OCTAVE_CONF_DEFAULT_PAGER%|\"${DEFAULT_PAGER}\"|" \
-  -e "s|%OCTAVE_CONF_DEPEND_FLAGS%|\"${DEPEND_FLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_DEPEND_EXTRA_SED_PATTERN%|\"${DEPEND_EXTRA_SED_PATTERN}\"|" \
-  -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_EXEEXT%|\"${EXEEXT}\"|" \
-  -e "s|%OCTAVE_CONF_F77%|\"${F77}\"|" \
-  -e "s|%OCTAVE_CONF_F77_FLOAT_STORE_FLAG%|\"${F77_FLOAT_STORE_FLAG}\"|" \
-  -e "s|%OCTAVE_CONF_FC%|\"${FC}\"|" \
-  -e "s|%OCTAVE_CONF_FFLAGS%|\"${FFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_FFTW3_CPPFLAGS%|\"${FFTW3_CPPFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_FFTW3_LDFLAGS%|\"${FFTW3_LDFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_FFTW3_LIBS%|\"${FFTW3_LIBS}\"|" \
-  -e "s|%OCTAVE_CONF_FFTW3F_CPPFLAGS%|\"${FFTW3F_CPPFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_FFTW3F_LDFLAGS%|\"${FFTW3F_LDFLAGS}\"|" \
-  -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_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_LIBS%|\"${GRAPHICS_LIBS}\"|" \
-  -e "s|%OCTAVE_CONF_HDF5_CPPFLAGS%|\"${HDF5_CPPFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_HDF5_LDFLAGS%|\"${HDF5_LDFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_HDF5_LIBS%|\"${HDF5_LIBS}\"|" \
-  -e "s|%OCTAVE_CONF_INCFLAGS%|\"${INCFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_INCLUDEDIR%|\"${includedir}\"|" \
-  -e "s|%OCTAVE_CONF_LD_CXX%|\"${LD_CXX}\"|" \
-  -e "s|%OCTAVE_CONF_LDFLAGS%|\"${LDFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_LD_STATIC_FLAG%|\"${LD_STATIC_FLAG}\"|" \
-  -e "s|%OCTAVE_CONF_LEX%|\"${LEX}\"|" \
-  -e "s|%OCTAVE_CONF_LEXLIB%|\"${LEXLIB}\"|" \
-  -e "s|%OCTAVE_CONF_LFLAGS%|\"${LFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_LIBCRUFT%|\"${LIBCRUFT}\"|" \
-  -e "s|%OCTAVE_CONF_LIBDIR%|\"${libdir}\"|" \
-  -e "s|%OCTAVE_CONF_LIBEXT%|\"${LIBEXT}\"|" \
-  -e "s|%OCTAVE_CONF_LIBFLAGS%|\"${LIBFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_LIBGLOB%|\"${LIBGLOB}\"|" \
-  -e "s|%OCTAVE_CONF_LIBOCTAVE%|\"${LIBOCTAVE}\"|" \
-  -e "s|%OCTAVE_CONF_LIBOCTINTERP%|\"${LIBOCTINTERP}\"|" \
-  -e "s|%OCTAVE_CONF_LIBS%|\"${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_MKOCTFILE_DL_LDFLAGS%|\"@MKOCTFILE_DL_LDFLAGS@\"|' \
-  -e "s|%OCTAVE_CONF_OCTINCLUDEDIR%|\"${octincludedir}\"|" \
-  -e "s|%OCTAVE_CONF_OCTLIBDIR%|\"${octlibdir}\"|" \
-  -e "s|%OCTAVE_CONF_OPENGL_LIBS%|\"${OPENGL_LIBS}\"|" \
-  -e "s|%OCTAVE_CONF_PREFIX%|\"${prefix}\"|" \
-  -e "s|%OCTAVE_CONF_PTHREAD_CFLAGS%|\"${PTHREAD_CFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_PTHREAD_LIBS%|\"${PTHREAD_LIBS}\"|" \
-  -e "s|%OCTAVE_CONF_QHULL_CPPFLAGS%|\"${QHULL_CPPFLAGSS}\"|" \
-  -e "s|%OCTAVE_CONF_QHULL_LDFLAGS%|\"${QHULL_LDFLAGSS}\"|" \
-  -e "s|%OCTAVE_CONF_QHULL_LIBS%|\"${QHULL_LIBS}\"|" \
-  -e "s|%OCTAVE_CONF_QRUPDATE_CPPFLAGS%|\"${QRUPDATE_CPPFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_QRUPDATE_LDFLAGS%|\"${QRUPDATE_LDFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_QRUPDATE_LIBS%|\"${QRUPDATE_LIBS}\"|" \
-  -e "s|%OCTAVE_CONF_RANLIB%|\"${RANLIB}\"|" \
-  -e "s|%OCTAVE_CONF_RDYNAMIC_FLAG%|\"${RDYNAMIC_FLAG}\"|" \
-  -e "s|%OCTAVE_CONF_READLINE_LIBS%|\"${READLINE_LIBS}\"|" \
-  -e "s|%OCTAVE_CONF_REGEX_LIBS%|\"${REGEX_LIBS}\"|" \
-  -e "s|%OCTAVE_CONF_RLD_FLAG%|\"${RLD_FLAG}\"|" \
-  -e "s|%OCTAVE_CONF_SED%|\"${SED}\"|" \
-  -e "s|%OCTAVE_CONF_SHARED_LIBS%|\"${SHARED_LIBS}\"|" \
-  -e "s|%OCTAVE_CONF_SHLEXT%|\"${SHLEXT}\"|" \
-  -e "s|%OCTAVE_CONF_SHLLINKEXT%|\"${SHLLINKEXT}\"|" \
-  -e "s|%OCTAVE_CONF_SHLEXT_VER%|\"${SHLEXT_VER}\"|" \
-  -e "s|%OCTAVE_CONF_SH_LD%|\"${SH_LD}\"|" \
-  -e "s|%OCTAVE_CONF_SH_LDFLAGS%|\"${SH_LDFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_SONAME_FLAGS%|\"${SONAME_FLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_STATIC_LIBS%|\"${STATIC_LIBS}\"|" \
-  -e "s|%OCTAVE_CONF_TERM_LIBS%|\"${TERM_LIBS}\"|" \
-  -e "s|%OCTAVE_CONF_UGLY_DEFS%|\"${UGLY_DEFS}\"|" \
-  -e "s|%OCTAVE_CONF_UMFPACK_CPPFLAGS%|\"${UMFPACK_CPPFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_UMFPACK_LDFLAGS%|\"${UMFPACK_LDFLAGS}\"|" \
-  -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_X11_INCFLAGS%|\"${X11_INCFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_X11_LIBS%|\"${X11_LIBS}\"|" \
-  -e "s|%OCTAVE_CONF_XTRA_CFLAGS%|\"${XTRA_CFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_XTRA_CXXFLAGS%|\"${XTRA_CXXFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_YACC%|\"${YACC}\"|" \
-  -e "s|%OCTAVE_CONF_YFLAGS%|\"${YFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_Z_CPPFLAGS%|\"${Z_CPPFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_Z_LDFLAGS%|\"${Z_LDFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_Z_LIBS%|\"${Z_LIBS}\"|" \
-  -e "s|%OCTAVE_CONF_config_opts%|\"${config_opts}\"|" | \
-  $(SED)  -e "s|%OCTAVE_CONF_DEFS%|\"${UGLY_DEFS}\"|" > $@-t
-$(simple-move-if-change-rule)
-endef
-
-define do-subst-default-vals
-echo "making $@ from $<"
-$(SED) < $< > $@-t \
-  -e "s|%OCTAVE_ARCHLIBDIR%|\"${archlibdir}\"|" \
-  -e "s|%OCTAVE_BINDIR%|\"${bindir}\"|" \
-  -e "s|%OCTAVE_CANONICAL_HOST_TYPE%|\"${canonical_host_type}\"|" \
-  -e "s|%OCTAVE_DATADIR%|\"${datadir}\"|" \
-  -e "s|%OCTAVE_DATAROOTDIR%|\"${datarootdir}\"|" \
-  -e "s|%OCTAVE_DEFAULT_PAGER%|\"${DEFAULT_PAGER}\"|" \
-  -e "s|%OCTAVE_DOC_CACHE_FILE%|\"${doc_cache_file}\"|" \
-  -e "s|%OCTAVE_EXEC_PREFIX%|\"${exec_prefix}\"|" \
-  -e "s|%OCTAVE_FCNFILEDIR%|\"${fcnfiledir}\"|" \
-  -e "s|%OCTAVE_IMAGEDIR%|\"${imagedir}\"|" \
-  -e "s|%OCTAVE_INCLUDEDIR%|\"${includedir}\"|" \
-  -e "s|%OCTAVE_INFODIR%|\"${infodir}\"|" \
-  -e "s|%OCTAVE_INFOFILE%|\"${infofile}\"|" \
-  -e "s|%OCTAVE_LIBDIR%|\"${libdir}\"|" \
-  -e "s|%OCTAVE_LIBEXECDIR%|\"${libexecdir}\"|" \
-  -e "s|%OCTAVE_LOCALAPIFCNFILEDIR%|\"${localapifcnfiledir}\"|" \
-  -e "s|%OCTAVE_LOCALAPIOCTFILEDIR%|\"${localapioctfiledir}\"|" \
-  -e "s|%OCTAVE_LOCALARCHLIBDIR%|\"${localarchlibdir}\"|" \
-  -e "s|%OCTAVE_LOCALFCNFILEDIR%|\"${localfcnfiledir}\"|" \
-  -e "s|%OCTAVE_LOCALOCTFILEDIR%|\"${localoctfiledir}\"|" \
-  -e "s|%OCTAVE_LOCALSTARTUPFILEDIR%|\"${localstartupfiledir}\"|" \
-  -e "s|%OCTAVE_LOCALAPIARCHLIBDIR%|\"${localapiarchlibdir}\"|" \
-  -e "s|%OCTAVE_LOCALVERARCHLIBDIR%|\"${localverarchlibdir}\"|" \
-  -e "s|%OCTAVE_LOCALVERFCNFILEDIR%|\"${localverfcnfiledir}\"|" \
-  -e "s|%OCTAVE_LOCALVEROCTFILEDIR%|\"${localveroctfiledir}\"|" \
-  -e "s|%OCTAVE_MAN1DIR%|\"${man1dir}\"|" \
-  -e "s|%OCTAVE_MAN1EXT%|\"${man1ext}\"|" \
-  -e "s|%OCTAVE_MANDIR%|\"${mandir}\"|" \
-  -e "s|%OCTAVE_OCTFILEDIR%|\"${octfiledir}\"|" \
-  -e "s|%OCTAVE_OCTETCDIR%|\"${octetcdir}\"|" \
-  -e "s|%OCTAVE_OCTINCLUDEDIR%|\"${octincludedir}\"|" \
-  -e "s|%OCTAVE_OCTLIBDIR%|\"${octlibdir}\"|" \
-  -e "s|%OCTAVE_STARTUPFILEDIR%|\"${startupfiledir}\"|" \
-  -e "s|%OCTAVE_PREFIX%|\"${prefix}\"|" \
-  -e "s|%OCTAVE_API_VERSION%|\"${api_version}\"|" \
-  -e "s|%OCTAVE_RELEASE%|\"${OCTAVE_RELEASE}\"|" \
-  -e "s|%OCTAVE_VERSION%|\"${version}\"|"
-$(simple-move-if-change-rule)
-endef
-
-define do-subst-texinfo-vals
-echo "making $@ from $<"
-$(SED) < $< \
-  -e "s|%abs_top_srcdir%|${abs_top_srcdir}|" \
-  -e "s|%top_srcdir%|${top_srcdir}|" \
-  -e "s|%OCTAVE_HOME%|${prefix}|" \
-  -e "s|%OCTAVE_VERSION%|${version}|" \
-  -e "s|%TEXINFO_COLAMD%|${TEXINFO_COLAMD}|" \
-  -e "s|%TEXINFO_CHOLMOD%|${TEXINFO_CHOLMOD}|" \
-  -e "s|%TEXINFO_UMFPACK%|${TEXINFO_UMFPACK}|" \
-  -e "s|%TEXINFO_QHULL%|${TEXINFO_QHULL}|" | \
-  $(SED) -e "s|%OCTAVE_CONF_DEFS%|\"${UGLY_DEFS}\"|" > $@-t
-$(simple-move-if-change-rule)
-endef
-
-define do-subst-script-vals
-echo "making $@ from $<"
-$(SED) < $< \
-  -e "s|%AWK%|${AWK}|g" \
-  -e "s|%FIND%|${FIND}|g" \
-  -e "s|%SED%|${SED}|g" \
-  -e "s|%library_path_var%|${library_path_var}|g" \
-  -e "s|%liboctinterp%|${SHLPRE}octinterp.${SHLEXT}|g" \
-  -e "s|%liboctave%|${SHLPRE}octave.${SHLEXT}|g" \
-  -e "s|%libcruft%|${SHLPRE}cruft.${SHLEXT}|g" \
-  -e "s|%ldpreloadsep%|${ldpreloadsep}|g" \
-  -e "s|%srcdir%|${srcdir}|" \
-  -e "s|%top_srcdir%|${top_srcdir}|" \
-  -e "s|%abs_top_srcdir%|${abs_top_srcdir}|" \
-  -e "s|%builddir%|$(shell pwd)|" > $@-t
-$(simple-move-if-change-rule)
-endef
-
-define do-subst-f77-mangling
-echo "making $@ from $<"
-$(SED) < $< \
-  -e "s|%F77_TOLOWER%|${F77_TOLOWER}|g" \
-  -e "s|%F77_APPEND_UNDERSCORE%|${F77_APPEND_UNDERSCORE}|" \
-  -e "s|%F77_APPEND_EXTRA_UNDERSCORE%|${F77_APPEND_EXTRA_UNDERSCORE}|" > $@-t
-$(simple-move-if-change-rule)
-endef
-
-define do-mkpkgadd
-$(top_srcdir)/mkpkgadd $(srcdir) > PKG_ADD.t
-if [ -n "`cat PKG_ADD.t`" ]; then \
-  mv PKG_ADD.t PKG_ADD ; \
-else \
-  rm -f PKG_ADD.t ; \
-fi
-endef
-
-define do-script-install
-$(top_srcdir)/mkinstalldirs \
-  $(addprefix $(DESTDIR), $(fcnfiledir)/$(script_sub_dir))
-for f in $(FCN_FILES); do \
-  fbase=`basename $$f`; \
-  rm -f $(DESTDIR)$(fcnfiledir)/$(script_sub_dir)/$$fbase; \
-  $(INSTALL_DATA) $$f $(DESTDIR)$(fcnfiledir)/$(script_sub_dir)/$$fbase; \
-done
-$(top_srcdir)/mkpkgadd $(DESTDIR)$(fcnfiledir)/$(script_sub_dir) > $(DESTDIR)$(fcnfiledir)/$(script_sub_dir)/PKG_ADD.t
-if [ -n "`cat $(DESTDIR)$(fcnfiledir)/$(script_sub_dir)/PKG_ADD.t`" ]; then \
-  $(INSTALL_DATA) $(DESTDIR)$(fcnfiledir)/$(script_sub_dir)/PKG_ADD.t $(DESTDIR)$(fcnfiledir)/$(script_sub_dir)/PKG_ADD ; \
-else \
-  rm -f $(DESTDIR)$(fcnfiledir)/$(script_sub_dir)/PKG_ADD.t ; \
-fi
-endef
-
-define do-script-uninstall
-for f in $(FCN_FILES_NO_DIR); \
-  do rm -f $(DESTDIR)$(fcnfiledir)/$(script_sub_dir)/$$f; \
-done
-rm -f $(DESTDIR)$(fcnfiledir)/$(script_sub_dir)/PKG_ADD
--rmdir $(addprefix $(DESTDIR), $(fcnfiledir)/$(script_sub_dir))
-endef
-
-define do-check-m-sources
-for f in $(notdir $(wildcard $(srcdir)/*.m)); do \
-  found=false; \
-  for m in $(SOURCES); do \
-    if [ "$$f" = "$$m" ]; then \
-      found=true; \
-      break; \
-    fi; \
-  done; \
-  if $$found; then \
-    true; \
-  else \
-    echo "$(script_sub_dir)/$$f: not listed in SOURCES"; \
-  fi; \
-done
-endef
--- a/Makefile	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,129 +0,0 @@
-# Makefile for octave's src directory
-#
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2003, 2004,
-#               2005, 2006, 2007, 2009 John W. Eaton
-#
-# This file is part of Octave.
-# 
-# Octave is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 3 of the License, or (at
-# your option) any later version.
-# 
-# Octave is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with Octave; see the file COPYING.  If not, see
-# <http://www.gnu.org/licenses/>.
-
-TARGETS = octave-bug octave-config mkoctfile libcruft liboctave \
-	dlfcn readline src scripts doc check octave.info \
-	INSTALL.OCTAVE BUGS install install-strip uninstall \
-	tags TAGS dist conf-dist snapshot snapshot-version \
-	.gdbinit run-octave
-
-NO_DEP_TARGETS = clean mostlyclean distclean maintainer-clean
-
-all: header-msg config-check
-	$(MAKE) -f octMakefile all
-
-configfiles: FORCE
-	$(MAKE) -f octMakefile configfiles
-
-$(TARGETS): FORCE
-	$(MAKE) -f octMakefile $@
-
-$(NO_DEP_TARGETS): FORCE
-	$(MAKE) -f octMakefile omit_deps=true $@
-
-# Maybe this message will prevent people from asking why the
-# Makefiles don't work for them.  Maybe not.
-
-header-msg: FORCE
-	@echo ""
-	@echo "***********************************************************"
-	@echo "*"
-	@echo "*  To compile Octave, you will need a recent versions of"
-	@echo "*  the following software:"
-	@echo "*"
-	@echo "*    GNU Make (a recent version)"
-	@echo "*"
-	@echo "*    g++ (preferably a recent 4.x version)"
-	@echo "*"
-	@echo "*    flex (2.5.4 or a more recent version) -- required if"
-	@echo "*    you need to recreate lex.cc from lex.l"
-	@echo "*"
-	@echo "*    bison (1.31 or a more recent version) -- required if"
-	@echo "*    you need to recreate parse.cc from parse.y"
-	@echo "*"
-	@echo "*    gperf (3.0.1 or a more recent version) -- required if"
-	@echo "*    you need to recreate oct-gperf.h from octave.gperf"
-	@echo "*"
-	@echo "*  Now would be a good time to read INSTALL.OCTAVE if"
-	@echo "*  you have not done so already."
-	@echo "*"
-	@echo "***********************************************************"
-	@echo ""
-
-help: header-msg
-	@echo ""
-	@echo "For more information, please read the files INSTALL,"
-	@echo "INSTALL.OCTAVE, and any other system-specific README"
-	@echo "files that apply (e.g., README.Linux)."
-	@echo ""
-	@echo "The following targets are available:"
-	@echo ""
-	@echo "  all                  build everything"
-	@echo "  check                run self tests"
-	@echo "  install              install files"
-	@echo "  install-strip        same as install but strip binaries"
-	@echo "  uninstall            delete installed files"
-	@echo ""
-	@echo "  dist                 create a source distribution"
-	@echo "  conf-dist            create a config files distribution"
-	@echo ""
-	@echo "  clean                remove files created by make all"
-	@echo "  mostlyclean          remove most files created by make all"
-	@echo "  distclean            remove all files not in distribution"
-	@echo "  maintainer-clean     clean up everything"
-	@echo ""
-	@echo "  octave-bug           create octave-bug script"
-	@echo "  octave-config        create octave-config script"
-	@echo "  mkoctfile            create mkoctfile script"
-	@echo "  INSTALL.OCTAVE       create INSTALL.OCTAVE doc file"
-	@echo "  BUGS                 create BUGS doc file"
-	@echo "  tags                 create tags files"
-	@echo "  TAGS                 create TAGS files"
-	@echo ""
-	@echo "  dlfcn                make all in subdirectory dlfcn"
-	@echo "  doc                  make all in subdirectory doc"
-	@echo "  libcruft             make all in subdirectory libcruft"
-	@echo "  liboctave            make all in subdirectory liboctave"
-	@echo "  scripts              make all in subdirectory scripts"
-	@echo "  src                  make all in subdirectory src"
-	@echo ""
-	@echo "  configfiles          update the configuration files"
-	@echo ""
-	@echo "  help                 print this message"
-	@echo ""
-
-config-check:
-	@if test -f octMakefile; then \
-	  true; \
-	else \
-	  echo ""; \
-	  echo "*** You must run configure before running make."; \
-	  echo "***"; \
-	  echo "*** Please read the INSTALL and INSTALL.OCTAVE files"; \
-	  echo "*** for more information about how to configure and"; \
-	  echo "*** compile Octave."; \
-	  echo ""; \
-	  exit 1; \
-	fi
-
-FORCE:
-
-.NOTPARALLEL:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Makefile.am	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,253 @@
+# Makefile for octave
+#
+# Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+#               2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 John W. Eaton
+#
+# This file is part of Octave.
+# 
+# Octave is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation; either version 3 of the License, or (at
+# your option) any later version.
+# 
+# Octave is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with Octave; see the file COPYING.  If not, see
+# <http://www.gnu.org/licenses/>.
+
+TOPDIR = .
+
+include common.mk
+
+ACLOCAL_AMFLAGS = -I m4
+
+SCRIPTS_EXE_SUFFIX = @SCRIPTS_EXE_SUFFIX@
+
+BUILT_DISTFILES = BUGS INSTALL.OCTAVE
+
+EXTRA_DIST = \
+  BUGS \
+  COPYING \
+  ChangeLog \
+  ChangeLog.1 \
+  INSTALL \
+  INSTALL.OCTAVE \
+  NEWS \
+  NEWS.1 \
+  NEWS.2 \
+  NEWS.3 \
+  PROJECTS \
+  README \
+  README.Cygwin \
+  README.Linux \
+  README.MSVC \
+  README.Windows \
+  README.kpathsea \
+  ROADMAP \
+  SENDING-PATCHES \
+  autogen.sh \
+  missing \
+  mk-opts.pl \
+  mkinstalldirs \
+  mkoctfile.cc.in \
+  mkoctfile.in \
+  move-if-change \
+  octave-bug.cc.in \
+  octave-bug.in \
+  octave-config.cc.in \
+  octave-config.in \
+  octave-sh \
+  run-octave.in
+
+include emacs/module.mk
+include m4/module.mk
+
+# Subdirectories in which to run `make all'.
+SUBDIRS = libcruft liboctave src scripts doc examples test
+
+BUILT_SHELL_FILES = \
+  mkoctfile$(SCRIPTS_EXE_SUFFIX) \
+  octave-config$(SCRIPTS_EXE_SUFFIX) \
+  octave-bug$(SCRIPTS_EXE_SUFFIX) \
+  run-octave
+
+bin_SCRIPTS = \
+  mkoctfile$(SCRIPTS_EXE_SUFFIX) \
+  octave-config$(SCRIPTS_EXE_SUFFIX) \
+  octave-bug$(SCRIPTS_EXE_SUFFIX)
+
+CLEANFILES = $(BUILT_SHELL_FILES)
+
+INFO_FILES = \
+  INSTALL.OCTAVE \
+  BUGS
+
+CONFIG_FILES = @ac_config_headers@ @ac_config_files@
+
+BUILT_SOURCES = run-octave
+
+nodist_octinclude_HEADERS = config.h
+
+all-local: $(bin_SCRIPTS) $(INFO_FILES)
+	@echo ""
+	@echo "Octave successfully built.  Now choose from the following:"
+	@echo ""
+	@echo "   ./run-octave    - to run in place to test before installing"
+	@echo "   make check      - to run the tests"
+	@echo "   make install    - to install (PREFIX=$(prefix))"
+	@echo ""
+.PHONY: all
+
+octave-bug: octave-bug.in Makefile
+	@$(do_subst_config_vals)
+	chmod a+rx $@
+
+octave-bug.cc: octave-bug.cc.in Makefile
+	@$(do_subst_config_vals)
+
+# ifneq ($(EXEEXT),)
+# octave-bug$(EXEEXT): octave-bug.o
+# 	$(LD_CXX) $(CPPFLAGS) $(ALL_CXXFLAGS) $(RDYNAMIC_FLAG) \
+# 	    $(ALL_LDFLAGS) -o $@ octave-bug.o
+# endif
+
+octave-config: octave-config.in Makefile
+	@$(do_subst_default_vals)
+	chmod a+rx $@
+
+octave-config.cc: octave-config.cc.in Makefile
+	@$(do_subst_default_vals)
+
+# ifneq ($(EXEEXT),)
+# octave-config$(EXEEXT): octave-config.o
+# 	$(LD_CXX) $(CPPFLAGS) $(ALL_CXXFLAGS) $(RDYNAMIC_FLAG) \
+# 	    $(ALL_LDFLAGS) -o $@ octave-config.o
+# endif
+
+mkoctfile: mkoctfile.in Makefile
+	@$(do_subst_config_vals)
+	chmod a+rx $@
+
+mkoctfile.cc: mkoctfile.cc.in Makefile
+	@$(do_subst_config_vals)
+
+# ifneq ($(EXEEXT),)
+# mkoctfile$(EXEEXT): mkoctfile.o
+# 	$(LD_CXX) $(CPPFLAGS) $(ALL_CXXFLAGS) $(RDYNAMIC_FLAG) \
+# 	    $(ALL_LDFLAGS) -o $@ mkoctfile.o
+# endif
+
+run-octave: run-octave.in Makefile
+	@$(do_subst_script_vals)
+	chmod a+rx "$@"
+
+BUGS INSTALL.OCTAVE:
+	$(MAKE) -C doc ../$@
+.PHONY: BUGS INSTALL.OCTAVE
+
+DIRS_TO_MAKE = \
+  $(localfcnfiledir) \
+  $(localapifcnfiledir) \
+  $(localverfcnfiledir) \
+  $(localoctfiledir) \
+  $(localapioctfiledir) \
+  $(localveroctfiledir) \
+  $(localarchlibdir) \
+  $(localapiarchlibdir) \
+  $(localverarchlibdir)
+
+installdirs-local:
+	$(MKDIR_P) $(addprefix $(DESTDIR), $(DIRS_TO_MAKE))
+.PHONY: installdirs-local
+
+install-data-local: installdirs-local install-extras
+.PHONY: install-data-local
+
+install-exec-hook: make-version-links
+.PHONY: install-exec-hook
+
+uninstall-local: remove-version-links uninstall-extras
+.PHONY: uninstall-local
+
+install-extras:
+	$(MKDIR_P) $(DESTDIR)$(octetcdir)
+	$(INSTALL_DATA) $(srcdir)/NEWS $(DESTDIR)$(octetcdir)/NEWS
+.PHONY: install-extras
+
+uninstall-extras:
+	rm -f $(DESTDIR)$(octetcdir)/NEWS
+.PHONY: uninstall-extras
+
+make-version-links:
+	cd $(DESTDIR)$(bindir) && \
+	for f in $(basename $(bin_SCRIPTS)); do \
+	  mv $$f$(EXEEXT) $$f-$(version)$(EXEEXT) && \
+	    $(LN_S) $$f-$(version)$(EXEEXT) $$f$(EXEEXT); \
+	done
+.PHONY: make-version-links
+
+remove-version-links:
+	for f in $(basename $(bin_SCRIPTS)); do \
+	  rm -f $(DESTDIR)$(bindir)/$$f-$(version)$(EXEEXT); \
+	done
+.PHONY: remove-version-links
+
+# install install-strip ::
+# 	$(MKDIR_P) $(addprefix $(DESTDIR), $(DIRS_TO_MAKE))
+# 	rm -f $(DESTDIR)$(bindir)/octave-bug$(SCRIPTS_EXE_SUFFIX)
+# 	$(INSTALL_SCRIPT) octave-bug$(SCRIPTS_EXE_SUFFIX) \
+# 	    $(DESTDIR)$(bindir)/octave-bug-$(version)$(SCRIPTS_EXE_SUFFIX)
+# 	(cd $(DESTDIR)$(bindir); $(LN_S) octave-bug-$(version)$(SCRIPTS_EXE_SUFFIX) \
+# 	    $(DESTDIR)$(bindir)/octave-bug$(SCRIPTS_EXE_SUFFIX))
+# 	rm -f $(DESTDIR)$(bindir)/octave-config$(SCRIPTS_EXE_SUFFIX)
+# 	$(INSTALL_SCRIPT) \
+# 	  octave-config$(SCRIPTS_EXE_SUFFIX) $(DESTDIR)$(bindir)/octave-config-$(version)$(SCRIPTS_EXE_SUFFIX)
+# 	(cd $(DESTDIR)$(bindir); $(LN_S) octave-config-$(version)$(SCRIPTS_EXE_SUFFIX) \
+# 	    $(DESTDIR)$(bindir)/octave-config$(SCRIPTS_EXE_SUFFIX))
+# 	rm -f $(DESTDIR)$(bindir)/mkoctfile$(SCRIPTS_EXE_SUFFIX)
+# 	$(INSTALL_SCRIPT) mkoctfile$(SCRIPTS_EXE_SUFFIX) \
+# 	    $(DESTDIR)$(bindir)/mkoctfile-$(version)$(SCRIPTS_EXE_SUFFIX)
+# 	(cd $(DESTDIR)$(bindir); $(LN_S) mkoctfile-$(version)$(SCRIPTS_EXE_SUFFIX) \
+# 	    $(DESTDIR)$(bindir)/mkoctfile$(SCRIPTS_EXE_SUFFIX))
+# 	$(INSTALL_DATA) config.h $(DESTDIR)$(octincludedir)/octave/config.h
+
+# uninstall::
+# 	rm -f $(DESTDIR)$(bindir)/octave-bug$(SCRIPTS_EXE_SUFFIX)
+# 	rm -f $(DESTDIR)$(bindir)/octave-bug-$(version)$(SCRIPTS_EXE_SUFFIX)
+# 	rm -f $(DESTDIR)$(bindir)/octave-config$(SCRIPTS_EXE_SUFFIX)
+# 	rm -f $(DESTDIR)$(bindir)/octave-config-$(version)$(SCRIPTS_EXE_SUFFIX)
+# 	rm -f $(DESTDIR)$(bindir)/mkoctfile$(SCRIPTS_EXE_SUFFIX)
+# 	rm -f $(DESTDIR)$(bindir)/mkoctfile-$(version)$(SCRIPTS_EXE_SUFFIX)
+# 	rm -f $(DESTDIR)$(octincludedir)/octave/config.h
+# 	rm -f $(DESTDIR)$(octetcdir)/NEWS
+
+# maintainer-clean::
+# 	@echo ""
+# 	@echo "************************************************************"
+# 	@echo "*                                                          *"
+# 	@echo "* This command is intended for maintainers to use; it      *"
+# 	@echo "* deletes files that may require special tools to rebuild. *"
+# 	@echo "*                                                          *"
+# 	@echo "************************************************************"
+# 	@echo ""
+
+# maintainer-clean distclean::
+# 	rm -f Makefile
+# 	rm -f config.cache config.h config.log config.status
+# 	rm -rf autom4te.cache
+# 	rm -f $(SHELL_FILES)
+# 	rm -f mkoctfile.cc octave-config.cc octave-bug.cc
+# 	rm -f unistd.h
+
+# maintainer-clean::
+# 	rm -f configure config.h.in BUGS INSTALL.OCTAVE
+
+# maintainer-clean distclean clean::
+# 	rm -f mkoctfile$(EXEEXT) octave-config$(EXEEXT) octave-bug$(EXEEXT)
+# 	rm -f mkoctfile.o octave-config.o octave-bug.o
+
+.NOTPARALLEL:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/acinclude.m4	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,1751 @@
+dnl aclocal.m4 -- extra macros for configuring Octave
+dnl
+dnl Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+dnl               2003, 2004, 2005, 2006, 2007, 2008, 2009 John W. Eaton
+dnl 
+dnl This file is part of Octave.
+dnl 
+dnl Octave is free software; you can redistribute it and/or modify it
+dnl under the terms of the GNU General Public License as published by the
+dnl Free Software Foundation; either version 3 of the License, or (at
+dnl your option) any later version.
+dnl 
+dnl Octave is distributed in the hope that it will be useful, but WITHOUT
+dnl ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+dnl FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+dnl for more details.
+dnl 
+dnl You should have received a copy of the GNU General Public License
+dnl along with Octave; see the file COPYING.  If not, see
+dnl <http://www.gnu.org/licenses/>.
+dnl
+dnl
+dnl Copyright (C) 2008 - 2009 Free Software Foundation, Inc.
+dnl
+dnl If needed, define the m4_ifblank and m4_ifnblank macros from autoconf 2.64
+dnl This allows us to run with earlier Autoconfs as well.
+dnl FIXME: these should go away once Autoconf 2.64 is required or ubiquitous.
+dnl
+ifdef([m4_ifblank],[],[
+m4_define([m4_ifblank],
+[m4_if(m4_translit([[$1]],  [ ][	][
+]), [], [$2], [$3])])])
+dnl
+ifdef([m4_ifnblank],[],[
+m4_define([m4_ifnblank],
+[m4_if(m4_translit([[$1]],  [ ][	][
+]), [], [$3], [$2])])])
+dnl
+dnl ----------------------------------------------------------------------
+dnl
+dnl Figure out the hardware-vendor-os info.
+dnl
+dnl OCTAVE_HOST_TYPE
+AC_DEFUN([OCTAVE_HOST_TYPE],
+[AC_CANONICAL_HOST
+if test -z "$host"; then
+  host=unknown
+fi
+canonical_host_type=$host
+if test "$host" = unknown; then
+  AC_MSG_WARN([configuring Octave for unknown system type
+])
+fi
+AC_SUBST(canonical_host_type)])
+dnl
+dnl Set default value for a variable and substitute it.
+dnl
+dnl OCTAVE_SET_DEFAULT
+AC_DEFUN([OCTAVE_SET_DEFAULT],
+[ifelse($#, 2, [: ${$1=$2}
+])dnl
+AC_MSG_RESULT([defining $1 to be $$1])
+AC_SUBST($1)])
+dnl
+dnl Check for ar.
+dnl
+AC_DEFUN([OCTAVE_PROG_AR],
+[if test -z "$AR"; then
+  AR=ar
+fi
+AC_SUBST(AR)
+
+if test -z "$ARFLAGS"; then
+  ARFLAGS="rc"
+fi
+AC_SUBST(ARFLAGS)
+])
+dnl
+dnl See if the compiler supports placement delete
+dnl
+AC_DEFUN([OCTAVE_PLACEMENT_DELETE],
+[AC_CACHE_CHECK([whether <new> defines placement delete operator],
+octave_cv_placement_delete,
+[AC_LANG_PUSH(C++)
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <new>]],
+[[operator delete((void *)0, (void *)0);]])],
+octave_cv_placement_delete=yes, octave_cv_placement_delete=no)])
+if test $octave_cv_placement_delete = yes; then
+AC_DEFINE(HAVE_PLACEMENT_DELETE,1,[Define if C++ supports operator delete(void *, void *)])
+fi
+AC_LANG_POP(C++)
+])
+dnl
+dnl See if the compiler dynamic auto arrays
+dnl
+AC_DEFUN([OCTAVE_DYNAMIC_AUTO_ARRAYS],
+[AC_CACHE_CHECK([whether C++ supports dynamic auto arrays],
+octave_cv_dynamic_auto_arrays,
+[AC_LANG_PUSH(C++)
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],
+[[void test(char *); int length(); char x[length()]; test(x);]])],
+octave_cv_dynamic_auto_arrays=yes, octave_cv_dynamic_auto_arrays=no)])
+if test $octave_cv_dynamic_auto_arrays = yes; then
+AC_DEFINE(HAVE_DYNAMIC_AUTO_ARRAYS,1,[Define if C++ supports dynamic auto arrays])
+fi
+AC_LANG_POP(C++)
+])
+dnl
+dnl Check for broken strptime
+dnl
+AC_DEFUN([OCTAVE_STRPTIME_BROKEN],
+[AC_CACHE_CHECK([whether strptime is broken],
+octave_cv_strptime_broken,
+[AC_LANG_PUSH(C)
+AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+#define _XOPEN_SOURCE
+#if defined (HAVE_SYS_TYPES_H)
+#include <sys/types.h>
+#if defined (HAVE_UNISTD_H)
+#include <unistd.h>
+#endif
+#endif
+#include <stdio.h>
+#include <time.h>
+]], [[
+struct tm t;
+char *q = strptime ("09/13", "%m/%d/%y", &t);
+return q ? 1 : 0;
+]])], [octave_cv_strptime_broken=no], [octave_cv_strptime_broken=yes])])
+if test $octave_cv_strptime_broken = yes; then
+AC_DEFINE(OCTAVE_HAVE_BROKEN_STRPTIME, 1, [Define if strptime is broken on your system])
+fi
+AC_LANG_POP(C)
+])
+dnl
+dnl The following test is from Karl Berry's Kpathseach library.  I'm
+dnl including it here in case we someday want to make the use of
+dnl kpathsea optional.
+dnl
+dnl Some BSD putenv's, e.g., FreeBSD, do malloc/free's on the environment.
+dnl This test program is due to Mike Hibler <mike@cs.utah.edu>.
+dnl We don't actually need to run this if we don't have putenv, but it
+dnl doesn't hurt.
+AC_DEFUN([OCTAVE_SMART_PUTENV],
+[AC_MSG_CHECKING(whether putenv uses malloc)
+AC_CACHE_VAL(octave_cv_func_putenv_malloc,
+[AC_RUN_IFELSE([AC_LANG_SOURCE([[
+#define VAR	"YOW_VAR"
+#define STRING1 "GabbaGabbaHey"
+#define STRING2 "Yow!!"		/* should be shorter than STRING1 */
+extern char *getenv (); /* in case char* and int don't mix gracefully */
+main ()
+{
+  char *str1, *rstr1, *str2, *rstr2;
+  str1 = getenv (VAR);
+  if (str1)
+    exit (1);
+  str1 = malloc (strlen (VAR) + 1 + strlen (STRING1) + 1);
+  if (str1 == 0)
+    exit (2);
+  strcpy (str1, VAR);
+  strcat (str1, "=");
+  strcat (str1, STRING1);
+  if (putenv (str1) < 0)
+    exit (3);
+  rstr1 = getenv (VAR);
+  if (rstr1 == 0)
+    exit (4);
+  rstr1 -= strlen (VAR) + 1;
+  if (strncmp (rstr1, VAR, strlen (VAR)))
+    exit (5);
+  str2 = malloc (strlen (VAR) + 1 + strlen (STRING2) + 1);
+  if (str2 == 0 || str1 == str2)
+    exit (6);
+  strcpy (str2, VAR);
+  strcat (str2, "=");
+  strcat (str2, STRING2);
+  if (putenv (str2) < 0)
+    exit (7);
+  rstr2 = getenv (VAR);
+  if (rstr2 == 0)
+    exit (8);
+  rstr2 -= strlen (VAR) + 1;
+#if 0
+  printf ("rstr1=0x%x, rstr2=0x%x\n", rstr1, rstr2);
+  /*
+   * If string from first call was reused for the second call,
+   * you had better not do a free on the first string!
+   */
+  if (rstr1 == rstr2)
+          printf ("#define SMART_PUTENV\n");
+  else
+          printf ("#undef SMART_PUTENV\n");
+#endif
+  exit (rstr1 == rstr2 ? 0 : 1);
+}]])], octave_cv_func_putenv_malloc=yes, octave_cv_func_putenv_malloc=no,
+    octave_cv_func_putenv_malloc=no)])dnl
+AC_MSG_RESULT($octave_cv_func_putenv_malloc)
+if test $octave_cv_func_putenv_malloc = yes; then
+  AC_DEFINE(SMART_PUTENV,1,[To quiet autoheader.])
+fi])
+dnl
+dnl These two checks for signal functions were originally part of the
+dnl aclocal.m4 file distributed with bash 2.0.
+dnl
+dnl Check type of signal routines (posix, 4.2bsd, 4.1bsd or v7)
+AC_DEFUN([OCTAVE_SIGNAL_CHECK],
+[AC_REQUIRE([AC_TYPE_SIGNAL])
+AC_MSG_CHECKING(for type of signal functions)
+AC_CACHE_VAL(octave_cv_signal_vintage,
+[
+  AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <signal.h>]],
+    [[sigset_t ss;
+      struct sigaction sa;
+      sigemptyset (&ss);
+      sigsuspend (&ss);
+      sigaction (SIGINT, &sa, (struct sigaction *) 0);
+      sigprocmask (SIG_BLOCK, &ss, (sigset_t *) 0);]])],
+    [octave_cv_signal_vintage=posix],
+    [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <signal.h>]],
+       [[int mask = sigmask (SIGINT);
+	 sigsetmask (mask);
+         sigblock (mask);
+         sigpause (mask);]])],
+       [octave_cv_signal_vintage=4.2bsd],
+       [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <signal.h>
+          RETSIGTYPE foo() { }]],
+          [[int mask = sigmask (SIGINT);
+	    sigset (SIGINT, foo);
+            sigrelse (SIGINT);
+	    sighold (SIGINT);
+            sigpause (SIGINT);]])],
+          [octave_cv_signal_vintage=svr3],
+          [octave_cv_signal_vintage=v7])])])])
+AC_MSG_RESULT($octave_cv_signal_vintage)
+if test "$octave_cv_signal_vintage" = posix; then
+AC_DEFINE(HAVE_POSIX_SIGNALS, 1, [Define if you have POSIX style signals.])
+elif test "$octave_cv_signal_vintage" = "4.2bsd"; then
+AC_DEFINE(HAVE_BSD_SIGNALS, 1, [Define if you have BSD style signals.])
+elif test "$octave_cv_signal_vintage" = svr3; then
+AC_DEFINE(HAVE_USG_SIGHOLD, 1, [Define if you have System V Release 3 signals.])
+fi
+])
+dnl
+AC_DEFUN([OCTAVE_REINSTALL_SIGHANDLERS],
+[AC_REQUIRE([AC_TYPE_SIGNAL])
+AC_REQUIRE([OCTAVE_SIGNAL_CHECK])
+AC_MSG_CHECKING([if signal handlers must be reinstalled when invoked])
+AC_CACHE_VAL(octave_cv_must_reinstall_sighandlers,
+[AC_RUN_IFELSE([AC_LANG_SOURCE([[
+#include <signal.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+typedef RETSIGTYPE sigfunc();
+int nsigint;
+#ifdef HAVE_POSIX_SIGNALS
+sigfunc *
+set_signal_handler(sig, handler)
+     int sig;
+     sigfunc *handler;
+{
+  struct sigaction act, oact;
+  act.sa_handler = handler;
+  act.sa_flags = 0;
+  sigemptyset (&act.sa_mask);
+  sigemptyset (&oact.sa_mask);
+  sigaction (sig, &act, &oact);
+  return (oact.sa_handler);
+}
+#else
+#define set_signal_handler(s, h) signal(s, h)
+#endif
+RETSIGTYPE
+sigint(s)
+    int s;
+{
+  nsigint++;
+}
+main()
+{
+  nsigint = 0;
+  set_signal_handler(SIGINT, sigint);
+  kill((int)getpid(), SIGINT);
+  kill((int)getpid(), SIGINT);
+  exit(nsigint != 2);
+}
+]])],
+  octave_cv_must_reinstall_sighandlers=no,
+  octave_cv_must_reinstall_sighandlers=yes,
+if test "$octave_cv_signal_vintage" = svr3; then
+  octave_cv_must_reinstall_sighandlers=yes
+else
+  octave_cv_must_reinstall_sighandlers=no
+fi)])
+if test "$cross_compiling" = yes; then
+  AC_MSG_RESULT([$octave_cv_must_reinstall_sighandlers assumed for cross compilation])
+else
+  AC_MSG_RESULT($octave_cv_must_reinstall_sighandlers)
+fi
+if test "$octave_cv_must_reinstall_sighandlers" = yes; then
+  AC_DEFINE(MUST_REINSTALL_SIGHANDLERS,1,[Define if signal handlers must be reinstalled after they are called.])
+fi
+])
+dnl
+dnl Check to see if C++ compiler needs the new friend template declaration 
+dnl syntax. 
+dnl
+dnl OCTAVE_CXX_NEW_FRIEND_TEMPLATE_DECL
+AC_DEFUN([OCTAVE_CXX_NEW_FRIEND_TEMPLATE_DECL], [
+  AC_REQUIRE([AC_PROG_CXX])
+  AC_MSG_CHECKING([for C++ support for new friend template declaration])
+  AC_CACHE_VAL(octave_cv_cxx_new_friend_template_decl, [
+    AC_LANG_PUSH(C++)
+    rm -f conftest.h
+    cat > conftest.h <<EOB
+       struct A {
+	 friend int operator== (const A&, const A&);
+	 A (int) { }
+       };
+
+       template <class T> int
+       operator== (const T&, const T&)
+       {
+	 return 0;
+       }
+EOB
+    AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include "conftest.h"]],
+      [[A a (1);
+        return a == A(1);]])],
+      [octave_cv_cxx_new_friend_template_decl=no],
+      [octave_cv_cxx_new_friend_template_decl=yes])
+    AC_LANG_POP(C++)
+  ])
+  AC_MSG_RESULT($octave_cv_cxx_new_friend_template_decl)
+  if test $octave_cv_cxx_new_friend_template_decl = yes; then
+    AC_DEFINE(CXX_NEW_FRIEND_TEMPLATE_DECL,1,[Define if your compiler supports `<>' stuff for template friends.])
+  fi
+])
+dnl
+dnl Check to see if C compiler handles FLAG command line option.  If
+dnl two arguments are specified, execute the second arg as shell
+dnl commands.  Otherwise, add FLAG to CFLAGS if the compiler accepts
+dnl the flag.
+dnl
+dnl OCTAVE_CC_FLAG
+AC_DEFUN([OCTAVE_CC_FLAG], [
+  ac_safe=`echo "$1" | sed 'y%./+-:=%__p___%'`
+  AC_MSG_CHECKING(whether ${CC-cc} accepts $1)
+  AC_CACHE_VAL(octave_cv_cc_flag_$ac_safe, [
+    AC_LANG_PUSH(C)
+    XCFLAGS="$CFLAGS"
+    CFLAGS="$CFLAGS $1"
+    AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
+      eval "octave_cv_cc_flag_$ac_safe=yes",
+      eval "octave_cv_cc_flag_$ac_safe=no")
+    CFLAGS="$XCFLAGS"
+    AC_LANG_POP(C)
+  ])
+  if eval "test \"`echo '$octave_cv_cc_flag_'$ac_safe`\" = yes"; then
+    AC_MSG_RESULT(yes)
+    ifelse([$2], , [
+      CFLAGS="$CFLAGS $1"
+      AC_MSG_RESULT([adding $1 to CFLAGS])], [$2])
+  else
+    AC_MSG_RESULT(no)
+    ifelse([$3], , , [$3])
+  fi
+])
+dnl
+dnl Check to see if C++ compiler handles FLAG command line option.  If
+dnl two arguments are specified, execute the second arg as shell
+dnl commands.  Otherwise, add FLAG to CXXFLAGS if the compiler accepts
+dnl the flag.
+dnl
+dnl OCTAVE_CXX_FLAG
+AC_DEFUN([OCTAVE_CXX_FLAG], [
+  ac_safe=`echo "$1" | sed 'y%./+-:=%__p___%'`
+  AC_MSG_CHECKING(whether ${CXX-g++} accepts $1)
+  AC_CACHE_VAL(octave_cv_cxx_flag_$ac_safe, [
+    AC_LANG_PUSH(C++)
+    XCXXFLAGS="$CXXFLAGS"
+    CXXFLAGS="$CXXFLAGS $1"
+    AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
+      eval "octave_cv_cxx_flag_$ac_safe=yes",
+      eval "octave_cv_cxx_flag_$ac_safe=no")
+    CXXFLAGS="$XCXXFLAGS"
+    AC_LANG_POP(C++)
+  ])
+  if eval "test \"`echo '$octave_cv_cxx_flag_'$ac_safe`\" = yes"; then
+    AC_MSG_RESULT(yes)
+    ifelse([$2], , [
+      CXXFLAGS="$CXXFLAGS $1"
+      AC_MSG_RESULT([adding $1 to CXXFLAGS])], [$2])
+  else
+    AC_MSG_RESULT(no)
+    ifelse([$3], , , [$3])
+  fi
+])
+dnl
+dnl Check to see if Fortran compiler handles FLAG command line option.  If
+dnl two arguments are specified, execute the second arg as shell
+dnl commands.  Otherwise, add FLAG to FFLAGS if the compiler accepts
+dnl the flag.
+dnl
+dnl OCTAVE_F77_FLAG
+AC_DEFUN([OCTAVE_F77_FLAG], [
+  ac_safe=`echo "$1" | sed 'y%./+-:=%__p___%'`
+  AC_MSG_CHECKING(whether ${F77-g77} accepts $1)
+  AC_CACHE_VAL(octave_cv_f77_flag_$ac_safe, [
+    AC_LANG_PUSH(Fortran 77)
+    XFFLAGS="$FFLAGS"
+    FFLAGS="$FFLAGS $1"
+    AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
+      eval "octave_cv_f77_flag_$ac_safe=yes",
+      eval "octave_cv_f77_flag_$ac_safe=no")
+    FFLAGS="$XFFLAGS"
+    AC_LANG_POP(Fortran 77)
+  ])
+  if eval "test \"`echo '$octave_cv_f77_flag_'$ac_safe`\" = yes"; then
+    AC_MSG_RESULT(yes)
+    ifelse([$2], , [
+      FFLAGS="$FFLAGS $1"
+      AC_MSG_RESULT([adding $1 to FFLAGS])], [$2])
+  else
+    AC_MSG_RESULT(no)
+    ifelse([$3], , , [$3])
+  fi
+])
+dnl
+dnl Check to see whether the default Fortran INTEGER is 64 bits wide.
+dnl
+AC_DEFUN([OCTAVE_CHECK_FORTRAN_INTEGER_SIZE], [
+  AC_LANG_PUSH(Fortran 77)
+  AC_CACHE_CHECK([whether $F77 generates correct size integers],
+                 [octave_cv_fortran_integer_size],
+[AC_COMPILE_IFELSE(
+[      subroutine foo(n, in, out)
+      integer n, in(n), out(n)
+      integer i
+      do 10 i = 1, n
+        out(i) = in(i)
+   10 continue
+      return
+      end],
+[mv conftest.$ac_objext fintsize.$ac_objext
+
+  octave_fintsize_save_LIBS="$LIBS"
+  LIBS="fintsize.$ac_objext $[]_AC_LANG_PREFIX[]LIBS"
+  AC_LANG_PUSH(C)dnl
+  AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <assert.h>]], [[
+#ifdef USE_64_BIT_IDX_T
+#if IDX_TYPE_LONG
+  typedef long octave_idx_type;
+#else
+  typedef int octave_idx_type;
+#endif
+#else
+  typedef int octave_idx_type;
+#endif
+  octave_idx_type n = 2;
+  octave_idx_type in[2];
+  octave_idx_type out[2];
+  in[0] = 13;
+  in[0] = 42;
+  F77_FUNC(foo,FOO) (&n, &in, &out);
+  assert (in[0] == out[0] && in[1] == out[1]);
+]])],
+  [octave_cv_fortran_integer_size=yes],
+  [octave_cv_fortran_integer_size=no])
+  AC_LANG_POP(C)dnl
+
+LIBS="$octave_fintsize_save_LIBS"
+rm -f conftest.$ac_objext fintsize.$ac_objext
+], [
+  rm -f conftest.$ac_objext
+  AC_MSG_FAILURE([cannot compile a simple Fortran program])
+  octave_cv_fortran_integer_size=no])])
+  AC_LANG_POP(Fortran 77)
+])
+dnl
+dnl
+dnl
+dnl OCTAVE_CHECK_LIBRARY(LIBRARY, DOC-NAME, WARN-MSG, HEADER, FUNC,
+dnl                      LANG, DOC-STRING, EXTRA-CHECK)
+AC_DEFUN([OCTAVE_CHECK_LIBRARY], [
+  AC_ARG_WITH([$1-includedir],
+    [AS_HELP_STRING([--with-$1-includedir=DIR],
+      [look for $2 include files in DIR])],
+    [m4_toupper([$1])_CPPFLAGS="-I$withval"])
+  AC_SUBST(m4_toupper([$1])_CPPFLAGS)
+
+  AC_ARG_WITH([$1-libdir],
+    [AS_HELP_STRING([--with-$1-libdir=DIR],
+      [look for $2 libraries in DIR])],
+    [m4_toupper([$1])_LDFLAGS="-L$withval"])
+  AC_SUBST(m4_toupper([$1])_LDFLAGS)
+
+  AC_ARG_WITH([$1],
+    [m4_ifblank([$7],
+      [AS_HELP_STRING([--without-$1], [don't use $2 library])],
+      [AS_HELP_STRING([--without-$1], [$7])])],
+    with_$1=$withval, with_$1=yes)
+
+  m4_toupper([$1])_LIBS=
+  case $with_$1 in
+    no)
+      m4_toupper([$1])_LIBS=
+    ;;
+    yes | "")
+      m4_toupper([$1])_LIBS="-l$1"
+    ;;
+    -* | */* | *.a | *.so | *.so.* | *.o)
+      m4_toupper([$1])_LIBS="$with_$1"
+    ;;
+    *)
+      m4_toupper([$1])_LIBS="-l$with_$1"
+    ;;
+  esac
+
+  [TEXINFO_]m4_toupper([$1])=
+  warn_$1="$3"
+  if test -n "$m4_toupper([$1])_LIBS"; then
+    octave_check_library_save_CPPFLAGS="$CPPFLAGS"
+    CPPFLAGS="$m4_toupper([$1])_CPPFLAGS $CPPFLAGS"
+    m4_ifnblank([$6], [AC_LANG_PUSH($6)])
+    octave_$1_check_for_lib=false
+    m4_ifblank([$4], [octave_$1_check_for_lib=true],
+               [AC_CHECK_HEADERS($4, [octave_$1_check_for_lib=true; break])])
+    if $octave_$1_check_for_lib; then
+      octave_check_library_save_LDFLAGS="$LDFLAGS"
+      LDFLAGS="$m4_toupper([$1])_LDFLAGS $LDFLAGS"
+      octave_check_library_save_LIBS="$LIBS"
+      LIBS="$m4_toupper([$1])_LIBS $LIBS"
+      octave_$1_ok=no
+      AC_MSG_CHECKING([for $5 in $m4_toupper([$1])_LIBS])
+      AC_LINK_IFELSE([AC_LANG_CALL([], [$5])],
+	[octave_$1_ok=yes])
+      AC_MSG_RESULT($octave_$1_ok)
+      if test $octave_$1_ok = yes; then
+	m4_ifblank([$8], [
+	  warn_$1=
+	  AC_DEFINE([HAVE_]m4_toupper([$1]), 1,
+            [Define if $2 is available.])
+	  [TEXINFO_]m4_toupper([$1])="@set [HAVE_]m4_toupper([$1])"], [$8])
+      fi
+      LIBS="$octave_check_library_save_LIBS"
+      LDFLAGS="$octave_check_library_save_LDFLAGS"
+    fi
+    m4_ifnblank([$6], [AC_LANG_POP($6)])
+    CPPFLAGS="$octave_check_library_save_CPPFLAGS"
+  fi
+  AC_SUBST(m4_toupper([$1])_LIBS)
+  AC_SUBST([TEXINFO_]m4_toupper([$1]))
+  if test -n "$warn_$1"; then
+    AC_MSG_WARN($warn_$1)
+    m4_toupper([$1])_LIBS=
+  fi
+])
+dnl
+dnl Check for flex
+dnl
+AC_DEFUN([OCTAVE_PROG_FLEX], [
+### For now, don't define LEXLIB to be -lfl -- we don't use anything in
+### it, and it might not be installed.
+###
+### Also make sure that we generate an interactive scanner if we are
+### using flex.
+  AC_PROG_LEX
+  case "$LEX" in
+    flex*)
+      LFLAGS="-I"
+      AC_MSG_RESULT([defining LFLAGS to be $LFLAGS])
+      LEXLIB=
+    ;;
+    *)
+      LEX='$(top_srcdir)/missing flex'
+      warn_flex="I didn't find flex, but it's only a problem if you need to reconstruct lex.cc"
+      AC_MSG_WARN($warn_flex)
+    ;;
+  esac
+  AC_SUBST(LFLAGS)
+])
+dnl
+dnl Check for bison
+dnl
+AC_DEFUN([OCTAVE_PROG_BISON], [
+  AC_PROG_YACC
+  case "$YACC" in
+    bison*)
+    ;;
+    *)
+      YACC='$(top_srcdir)/missing bison'
+      warn_bison="I didn't find bison, but it's only a problem if you need to reconstruct parse.cc"
+      AC_MSG_WARN($warn_bison)
+    ;;
+  esac
+])
+dnl
+dnl What pager should we use?
+dnl
+AC_DEFUN([OCTAVE_PROG_PAGER],
+[if test "$cross_compiling" = yes; then
+  DEFAULT_PAGER=less
+  AC_MSG_RESULT(assuming $DEFAULT_PAGER exists on $canonical_host_type host)
+  AC_SUBST(DEFAULT_PAGER)
+else
+  octave_possible_pagers="less more page pg"
+  case "$canonical_host_type" in
+    *-*-cygwin* | *-*-mingw32* | *-*-msdosmsvc)
+      octave_possible_pagers="$octave_possible_pagers more.com"
+    ;;
+  esac
+
+  AC_CHECK_PROGS(DEFAULT_PAGER, $octave_possible_pagers, [])
+  if test -z "$DEFAULT_PAGER"; then
+    warn_less="I couldn't find \`less', \`more', \`page', or \`pg'"
+    AC_MSG_WARN($warn_less)
+  fi
+fi
+])
+dnl
+dnl Does gnuplot exist?
+dnl
+AC_DEFUN([OCTAVE_PROG_GNUPLOT], [
+case "$canonical_host_type" in
+  *-*-cygwin* | *-*-mingw32* | *-*-msdosmsvc)
+    gp_names="pgnuplot pipe-gnuplot gnuplot"
+    gp_default=pgnuplot
+  ;;
+  *)
+    gp_names=gnuplot
+    gp_default=gnuplot
+  ;;
+esac
+if test "$cross_compiling" = yes; then
+  GNUPLOT="$gp_default"
+  AC_MSG_RESULT(assuming $GNUPLOT exists on $canonical_host_type host)
+else
+  AC_CHECK_PROGS(GNUPLOT, $gp_names)
+  if test -z "$GNUPLOT"; then
+    warn_gnuplot=yes
+
+    GNUPLOT="$gp_default"
+
+    ## If you change this text, be sure to also copy it to the set of
+    ## warnings at the end of the script
+
+    AC_MSG_WARN([I didn't find gnuplot.  It isn't necessary to have gnuplot])
+    AC_MSG_WARN([installed, but you won't be able to use any of Octave's])
+    AC_MSG_WARN([plotting commands without it.])
+    AC_MSG_WARN([])
+    AC_MSG_WARN([If gnuplot is installed but it isn't in your path, you can])
+    AC_MSG_WARN([tell Octave where to find it by typing the command])
+    AC_MSG_WARN([])
+    AC_MSG_WARN([gnuplot_binary = "/full/path/to/gnuplot/binary"])
+    AC_MSG_WARN([])
+    AC_MSG_WARN([at the Octave prompt.])
+    AC_MSG_WARN([])
+    AC_MSG_WARN([Setting default value to $GNUPLOT])
+  fi
+fi
+AC_SUBST(GNUPLOT)
+])
+dnl
+dnl Is gperf installed?
+dnl
+dnl OCTAVE_PROG_GPERF
+AC_DEFUN([OCTAVE_PROG_GPERF], [
+  AC_CHECK_PROG(GPERF, gperf, gperf, [])
+  if test -z "$GPERF"; then
+    GPERF='$(top_srcdir)/missing gperf'
+    warn_gperf="I didn't find gperf, but it's only a problem if you need to reconstruct oct-gperf.h"
+    AC_MSG_WARN($warn_gperf)
+  fi
+  AC_SUBST(GPERF)
+])
+dnl
+dnl Is ghostscript installed?
+dnl
+dnl OCTAVE_PROG_GHOSTSCRIPT
+AC_DEFUN([OCTAVE_PROG_GHOSTSCRIPT], [
+  case "$canonical_host_type" in
+    *-*-cygwin* | *-*-mingw32* | *-*-msdosmsvc)
+      gs_names="gs gswin32"
+    ;;
+    *)
+      gs_names=gs
+    ;;
+  esac
+  AC_CHECK_PROGS(GHOSTSCRIPT, $gs_names)
+  if test -z "$GHOSTSCRIPT"; then
+    GHOSTSCRIPT='$(top_srcdir)/missing gs'
+    warn_ghostscript="I didn't find ghostscript, but it's only a problem if you need to reconstruct figures for the manual"
+    AC_MSG_WARN($warn_ghostscript)
+  fi
+  AC_SUBST(GHOSTSCRIPT)
+])
+dnl
+dnl Is makeinfo installed?
+dnl
+dnl OCTAVE_PROG_MAKEINFO
+AC_DEFUN([OCTAVE_PROG_MAKEINFO], [
+  AC_CHECK_PROG(MAKEINFO, makeinfo, makeinfo, [])
+  if test -z "$MAKEINFO"; then
+    MAKEINFO='$(top_srcdir)/missing makeinfo'
+    warn_makeinfo="I didn't find makeinfo, but it's only a problem if you need to reconstruct the Info version of the manual"
+    AC_MSG_WARN($warn_makeinfo)
+  fi
+  AC_SUBST(MAKEINFO)
+])
+dnl
+dnl Is texi2dvi installed?
+dnl
+dnl OCTAVE_PROG_TEXI2DVI
+AC_DEFUN([OCTAVE_PROG_TEXI2DVI], [
+  AC_CHECK_PROG(TEXI2DVI, texi2dvi, texi2dvi, [])
+  if test -z "$TEXI2DVI"; then
+    TEXI2DVI='$(top_srcdir)/missing texi2dvi'
+    warn_texi2dvi="I didn't find texi2dvi, but it's only a problem if you need to reconstruct the DVI version of the manual"
+    AC_MSG_WARN($warn_texi2dvi)
+  fi
+  AC_SUBST(TEXI2DVI)
+])
+dnl
+dnl Is texi2pdf installed?
+dnl
+dnl OCTAVE_PROG_TEXI2PDF
+AC_DEFUN([OCTAVE_PROG_TEXI2PDF], [
+  AC_REQUIRE([OCTAVE_PROG_TEXI2DVI])
+  AC_CHECK_PROG(TEXI2PDF, texi2pdf, texi2pdf, [])
+  if test -z "$TEXI2PDF"; then
+    missing=true;
+    if test -n "$TEXI2DVI"; then
+      TEXI2PDF="$TEXI2DVI --pdf"
+      missing=false;
+    fi
+  else
+    missing=false;
+  fi
+  if $missing; then
+    TEXI2PDF='$(top_srcdir)/missing texi2pdf'
+    warn_texi2pdf="I didn't find texi2pdf, but it's only a problem if you need to reconstruct the PDF version of the manual"
+    AC_MSG_WARN($warn_texi2pdf)
+  fi
+  AC_SUBST(TEXI2PDF)
+])
+dnl
+dnl See if the C++ library is ISO compliant.
+dnl FIXME: This is obviously very simplistic, and trivially fooled.
+dnl
+dnl OCTAVE_CXX_ISO_COMPLIANT_LIBRARY
+AC_DEFUN([OCTAVE_CXX_ISO_COMPLIANT_LIBRARY], [
+  AC_REQUIRE([AC_PROG_CXX])
+  AC_MSG_CHECKING([if C++ library is ISO compliant])
+  AC_CACHE_VAL(octave_cv_cxx_iso_compliant_library, [
+    AC_LANG_PUSH(C++)
+    rm -f conftest.h
+### Omitting cwctype for now, since it is broken with gcc-3.0.x and
+### possibly other versions...
+    for inc in algorithm bitset cassert cctype cerrno cfloat ciso646 \
+	climits clocale cmath complex csetjmp csignal cstdarg cstddef \
+	cstdio cstdlib cstring ctime cwchar deque exception \
+	fstream functional iomanip ios iosfwd iostream istream iterator \
+	limits list locale map memory new numeric ostream queue set \
+	sstream stack stdexcept streambuf string strstream typeinfo \
+	utility valarray vector; do
+      echo "#include <$inc>" >> conftest.h
+    done
+    AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include "conftest.h"]],
+      [[std::bitset<50> flags;
+        flags.set();
+        int digits = std::numeric_limits<unsigned long>::digits;
+        digits = 0;]])],
+      [octave_cv_cxx_iso_compliant_library=yes],
+      [octave_cv_cxx_iso_compliant_library=no])
+    AC_LANG_POP(C++)
+  ])
+  AC_MSG_RESULT($octave_cv_cxx_iso_compliant_library)
+  if test $octave_cv_cxx_iso_compliant_library = yes; then
+    AC_DEFINE(CXX_ISO_COMPLIANT_LIBRARY, 1, [Define if your C++ runtime library is ISO compliant.])
+  fi
+])
+dnl
+dnl Allow the user disable support for command line editing using GNU
+dnl readline.
+dnl
+dnl OCTAVE_ENABLE_READLINE
+AC_DEFUN([OCTAVE_ENABLE_READLINE], [
+  USE_READLINE=true
+  READLINE_LIBS=
+  AC_ARG_ENABLE(readline,
+    [  --enable-readline       use readline library (default is yes)],
+    [if test "$enableval" = no; then
+       USE_READLINE=false
+       warn_readline="command editing and history features require GNU Readline"
+     fi])
+  if $USE_READLINE; then
+    save_LIBS="$LIBS"
+    LIBS="$TERM_LIBS"
+    AC_CHECK_LIB(readline, rl_set_keyboard_input_timeout, [
+      READLINE_LIBS="-lreadline"
+      AC_DEFINE(USE_READLINE, 1, [Define to use the readline library.])
+    ], [
+      AC_MSG_WARN([I need GNU Readline 4.2 or later])
+      AC_MSG_ERROR([this is fatal unless you specify --disable-readline])
+    ])
+    LIBS="$save_LIBS"
+  fi
+  AC_SUBST(READLINE_LIBS)
+])
+dnl
+dnl Check to see if C++ reintrepret cast works for function pointers.
+dnl
+dnl OCTAVE_CXX_BROKEN_REINTERPRET_CAST
+dnl
+AC_DEFUN([OCTAVE_CXX_BROKEN_REINTERPRET_CAST], [
+  AC_REQUIRE([AC_PROG_CXX])
+  AC_LANG_PUSH(C++)
+  AC_CACHE_CHECK([for broken C++ reinterpret_cast],
+    octave_cv_cxx_broken_reinterpret_cast, [
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <cmath>]], [[
+      typedef double (*fptr) (double);
+      fptr psin = sin;
+      void *vptr = reinterpret_cast<void *> (psin);
+      psin = reinterpret_cast<fptr> (vptr);]])],
+      octave_cv_cxx_broken_reinterpret_cast=no,
+      octave_cv_cxx_broken_reinterpret_cast=yes)])
+  if test $octave_cv_cxx_broken_reinterpret_cast = yes ; then
+    AC_DEFINE(CXX_BROKEN_REINTERPRET_CAST, 1, [Define if C++ reinterpret_cast fails for function pointers.])
+fi
+  AC_LANG_POP(C++)])
+dnl
+dnl Determine if mkdir accepts only one argument instead dnl of the usual 2.
+dnl
+AC_DEFUN([OCTAVE_MKDIR_TAKES_ONE_ARG], [
+AC_LANG_PUSH(C++)
+AC_CACHE_CHECK([if mkdir takes one argument], octave_cv_mkdir_takes_one_arg,
+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+#ifdef HAVE_DIRECT_H
+# include <direct.h>
+#endif]], [[mkdir ("foo", 0);]])],
+        octave_cv_mkdir_takes_one_arg=no, octave_cv_mkdir_takes_one_arg=yes)])
+AC_LANG_POP(C++)
+if test $octave_cv_mkdir_takes_one_arg = yes ; then
+  AC_DEFINE(MKDIR_TAKES_ONE_ARG, 1, [Define if host mkdir takes a single argument.])
+fi
+])
+dnl
+dnl Find find.
+dnl
+# Prefer GNU find if found.
+AN_MAKEVAR([FIND],  [OCTAVE_PROG_FIND])
+AN_PROGRAM([gfind], [OCTAVE_PROG_FIND])
+AN_PROGRAM([find],  [OCTAVE_PROG_FIND])
+AC_DEFUN([OCTAVE_PROG_FIND],
+[AC_CHECK_PROGS(FIND, gfind find, )])
+dnl
+dnl Find sed.
+dnl
+# Check for a fully-functional sed program, that truncates
+# as few characters as possible and that supports "\(X\|Y\)"
+# style regular expression alternation.  Prefer GNU sed if found.
+AC_DEFUN([OCTAVE_PROG_SED],
+[AC_MSG_CHECKING([for a usable sed])
+if test -z "$SED"; then
+  AC_CACHE_VAL(ac_cv_path_sed, [
+  # Loop through the user's path and test for sed and gsed.
+  # Then use that list of sed's as ones to test for truncation.
+  _AS_PATH_WALK([$PATH],
+    [for ac_prog in sed gsed; do
+      for ac_exec_ext in '' $ac_executable_extensions; do
+	if AS_EXECUTABLE_P(["$as_dir/$ac_prog$ac_exec_ext"]); then
+	  _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
+	fi
+      done
+    done
+    ])
+    AS_TMPDIR(sed)
+    _max=0
+    _count=0
+    # Add /usr/xpg4/bin/sed as it is typically found on Solaris
+    # along with /bin/sed that truncates output.
+    for _sed in $_sed_list /usr/xpg4/bin/sed; do
+      test ! -f ${_sed} && break
+      cat /dev/null > "$tmp/sed.in"
+      _count=0
+      echo $ECHO_N "0123456789$ECHO_C" >"$tmp/sed.in"
+      # Check for GNU sed and select it if it is found.
+      if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
+	octave_cv_path_sed=${_sed}
+	break;
+      fi
+      # Reject if RE alternation is not handled.
+      if test "`echo 'this and that' | ${_sed} -n 's/\(this\|that\).*$/\1/p'`" != "this"; then
+        continue;
+      fi
+      while true; do
+	cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
+	mv "$tmp/sed.tmp" "$tmp/sed.in"
+	cp "$tmp/sed.in" "$tmp/sed.nl"
+	echo >>"$tmp/sed.nl"
+	${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
+	cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
+	# 10000 chars as input seems more than enough
+	test $_count -gt 10 && break
+	_count=`expr $_count + 1`
+	if test $_count -gt $_max; then
+	  _max=$_count
+	  octave_cv_path_sed=$_sed
+	fi
+      done
+    done
+    rm -rf "$tmp"
+  ])
+  SED=$octave_cv_path_sed
+  if test -z "$SED"; then
+    AC_MSG_ERROR([no usable version of sed found])
+  fi
+fi
+AC_SUBST(SED)
+AC_MSG_RESULT([$SED])
+])
+dnl
+dnl Find Perl.
+dnl
+dnl OCTAVE_PROG_PERL
+AC_DEFUN([OCTAVE_PROG_PERL],
+[AC_CHECK_PROG(PERL, perl, perl, [])
+  AC_SUBST(PERL)
+])
+dnl
+dnl Find Python.
+dnl
+dnl OCTAVE_PROG_PYTHON
+AC_DEFUN([OCTAVE_PROG_PYTHON],
+[AC_CHECK_PROG(PYTHON, python, python, [])
+  AC_SUBST(PYTHON)
+])
+dnl
+dnl Find desktop-file-install.
+dnl
+dnl OCTAVE_PROG_DESKTOP_FILE_INSTALL
+AC_DEFUN([OCTAVE_PROG_DESKTOP_FILE_INSTALL],
+[AC_CHECK_PROG(DESKTOP_FILE_INSTALL, desktop-file-install, desktop-file-install, [])
+  AC_SUBST(DESKTOP_FILE_INSTALL)
+])
+dnl
+dnl Check for IEEE 754 data format.
+dnl
+AC_DEFUN([OCTAVE_IEEE754_DATA_FORMAT],
+[AC_MSG_CHECKING([for IEEE 754 data format])
+AC_CACHE_VAL(octave_cv_ieee754_data_format,
+[AC_RUN_IFELSE([AC_LANG_SOURCE([[
+int
+main (void) 
+{
+  typedef union { unsigned char c[8]; double d; } ieeebytes;
+   
+  ieeebytes l = {0x1c, 0xbc, 0x6e, 0xf2, 0x54, 0x8b, 0x11, 0x43};
+  ieeebytes b = {0x43, 0x11, 0x8b, 0x54, 0xf2, 0x6e, 0xbc, 0x1c};
+
+  return l.d != 1234567891234567.0 && b.d != 1234567891234567.0;
+}]])],
+  octave_cv_ieee754_data_format=yes,
+  octave_cv_ieee754_data_format=no,
+  octave_cv_ieee754_data_format=no)])
+if test "$cross_compiling" = yes; then
+  AC_MSG_RESULT([$octave_cv_ieee754_data_format assumed for cross compilation])
+else
+  AC_MSG_RESULT($octave_cv_ieee754_data_format)
+fi
+if test "$octave_cv_ieee754_data_format" = yes; then
+  AC_DEFINE(HAVE_IEEE754_DATA_FORMAT, 1, [Define if your system uses IEEE 754 data format.])
+fi
+])
+dnl
+dnl Check for UMFPACK seperately split complex matrix and RHS. Note
+dnl that as umfpack.h can be in three different places, rather than
+dnl include it, just declare the functions needed.
+dnl
+dnl Assumes that the check for umfpack has already been performed.
+dnl
+AC_DEFUN([OCTAVE_UMFPACK_SEPERATE_SPLIT],
+[AC_MSG_CHECKING([for UMFPACK seperate complex matrix and rhs split])
+AC_CACHE_VAL(octave_cv_umfpack_seperate_split,
+[AC_RUN_IFELSE([AC_LANG_SOURCE([[
+#include <stdlib.h>
+#if defined (HAVE_UFSPARSE_UMFPACK_h)
+#include <ufsparse/umfpack.h>
+#elif defined (HAVE_UMFPACK_UMFPACK_H)
+#include <umfpack/umfpack.h>
+#elif defined (HAVE_UMFPACK_H)
+#include <umfpack.h>
+#endif
+int n = 5;
+int Ap[] = {0, 2, 5, 9, 10, 12};
+int Ai[]  = {0, 1, 0, 2, 4, 1, 2, 3, 4, 2, 1, 4};
+double Ax[] = {2., 0., 3., 0., 3., 0., -1., 0., 4., 0., 4., 0., 
+	      -3., 0., 1., 0., 2., 0., 2., 0., 6., 0., 1., 0.};
+double br[] = {8., 45., -3., 3., 19.};
+double bi[] = {0., 0., 0., 0., 0.};
+int main (void)
+{
+  double *null = (double *) NULL ;
+  double *x = (double *)malloc (2 * n * sizeof(double));
+  int i ;
+  void *Symbolic, *Numeric ;
+  (void) umfpack_zi_symbolic (n, n, Ap, Ai, Ax, null, &Symbolic, null, null) ;
+  (void) umfpack_zi_numeric (Ap, Ai, Ax, null, Symbolic, &Numeric, null, null) ;
+  umfpack_zi_free_symbolic (&Symbolic) ;
+  (void) umfpack_zi_solve (0, Ap, Ai, Ax, null, x, null, br, bi, 
+		Numeric, null, null) ;
+  umfpack_zi_free_numeric (&Numeric) ;
+  for (i = 0; i < n; i++, x+=2) 
+    if (fabs(*x - i - 1.) > 1.e-13)
+      return (1);
+  return (0) ;
+}
+]])],
+  octave_cv_umfpack_seperate_split=yes,
+  octave_cv_umfpack_seperate_split=no,
+  octave_cv_umfpack_seperate_split=no)])
+if test "$cross_compiling" = yes; then
+  AC_MSG_RESULT([$octave_cv_umfpack_seperate_split assumed for cross compilation])
+else
+  AC_MSG_RESULT($octave_cv_umfpack_seperate_split)
+fi
+if test "$octave_cv_umfpack_seperate_split" = yes; then
+  AC_DEFINE(UMFPACK_SEPARATE_SPLIT, 1, [Define if the UMFPACK Complex solver allow matrix and RHS to be split independently])
+fi
+])
+dnl
+dnl Check whether using HDF5 DLL under Windows. This is done by
+dnl testing for a data symbol in the HDF5 library, which would
+dnl requires the definition of _HDF5USEDL_ under MSVC compiler.
+dnl
+AC_DEFUN([OCTAVE_HDF5_DLL], [
+  AC_CACHE_CHECK([if _HDF5USEDLL_ needs to be defined],octave_cv_hdf5_dll, [
+    AC_TRY_LINK([#include <hdf5.h>], [hid_t x = H5T_NATIVE_DOUBLE; return x],
+      octave_cv_hdf5_dll=no, [
+      save_CFLAGS="$CFLAGS"
+      CFLAGS="$CFLAGS -DWIN32 -D_HDF5USEDLL_"
+      save_LIBS="$LIBS"
+      LIBS="$HDF5_LIBS $LIBS"
+      AC_TRY_LINK([#include <hdf5.h>], [hid_t x = H5T_NATIVE_DOUBLE; return x],
+        octave_cv_hdf5_dll=yes,
+	octave_cv_hdf5_dll=no)
+      CFLAGS="$save_CFLAGS"
+      LIBS="$save_LIBS"])])
+  if test "$octave_cv_hdf5_dll" = yes; then
+    AC_DEFINE(_HDF5USEDLL_, 1, [Define if using HDF5 dll (Win32)])
+  fi])
+dnl
+dnl Check whether HDF5 library has version 1.6 API functions.
+dnl
+AC_DEFUN([OCTAVE_HDF5_HAS_REQUIRED_API], [
+  AC_CACHE_CHECK([whether HDF5 library has required API],
+    octave_cv_hdf5_has_required_api, [
+    AC_TRY_LINK([
+#define H5_USE_16_API 1
+#include <hdf5.h>
+], [
+  H5Eset_auto (0, 0);], [
+      octave_cv_hdf5_has_required_api=yes], [
+      octave_cv_hdf5_has_required_api=no])])
+  if test "$octave_cv_hdf5_has_required_api" = "no"; then
+    octave_hdf5_ok=no
+    warn_hdf5="HDF5 library does not provide the version 1.6 API.  Octave will not be able to save or load HDF5 data files."
+    AC_MSG_WARN($warn_hdf5)
+  fi
+])
+dnl
+dnl Check for the QHull version.
+dnl
+AC_DEFUN([OCTAVE_CHECK_QHULL_VERSION],
+  [AC_CACHE_CHECK([for qh_version in $QHULL_LIBS],
+    octave_cv_lib_qhull_version,  [
+      AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+#include <qhull/qhull_a.h>
+]], [[
+const char *tmp = qh_version;
+]])], [octave_cv_lib_qhull_version=yes], [octave_cv_lib_qhull_version=no])])
+  if test "$octave_cv_lib_qhull_version" = no; then
+    AC_DEFINE(NEED_QHULL_VERSION, 1,
+      [Define if the QHull library needs a qh_version variable defined.])
+  fi
+])
+dnl
+dnl Check whether QHull works (does not crash)
+dnl
+AC_DEFUN([OCTAVE_CHECK_QHULL_OK],
+  [AC_CACHE_CHECK([whether the qhull library works],
+    octave_cv_lib_qhull_ok, [
+      AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+#include <stdio.h>
+#include <qhull/qhull.h>
+#ifdef NEED_QHULL_VERSION
+char *qh_version = "version";
+#endif
+]], [[
+int dim = 2;
+int n = 4;
+coordT points[8] = { -0.5, -0.5, -0.5, 0.5, 0.5, -0.5, 0.5, 0.5 };
+boolT ismalloc = 0;
+return qh_new_qhull (dim, n, points, ismalloc, "qhull ", 0, stderr); 
+]])], [octave_cv_lib_qhull_ok=yes], [octave_cv_lib_qhull_ok=no])])
+  if test "$octave_cv_lib_qhull_ok" = "yes"; then
+    $1
+  else
+    $2
+  fi
+])
+dnl
+dnl Check for OpenGL. If found, define OPENGL_LIBS
+dnl
+AC_DEFUN([OCTAVE_OPENGL], [
+OPENGL_LIBS=
+
+### On MacOSX systems the OpenGL framework can be used
+OCTAVE_HAVE_FRAMEWORK(OpenGL, [
+#include <OpenGL/gl.h>
+#include <OpenGL/glu.h> ], [GLint par; glGetIntegerv (GL_VIEWPORT, &par);],
+  [have_framework_opengl="yes"], [have_framework_opengl="no"])
+
+if test $have_framework_opengl = "yes"; then
+  AC_DEFINE(HAVE_FRAMEWORK_OPENGL, 1, [Define if framework OPENGL is available.])
+  OPENGL_LIBS="-Wl,-framework -Wl,OpenGL"
+  AC_MSG_NOTICE([adding -Wl,-framework -Wl,OpenGL to OPENGL_LIBS])
+  OCTAVE_GLUTESSCALLBACK_THREEDOTS
+else
+  case $canonical_host_type in
+    *-*-mingw32* | *-*-msdosmsvc)
+      AC_CHECK_HEADERS(windows.h)
+    ;;
+  esac
+  have_opengl_incs=no
+  AC_CHECK_HEADERS([GL/gl.h OpenGL/gl.h], [
+    AC_CHECK_HEADERS([GL/glu.h OpenGL/glu.h], [
+      have_opengl_incs=yes; break], [], [
+#ifdef HAVE_WINDOWS_H
+#include <windows.h>
+#endif
+    ])
+    break
+    ], [], [
+#ifdef HAVE_WINDOWS_H
+#include <windows.h>
+#endif
+    ])
+
+  if test "$have_opengl_incs" = "yes"; then
+    case $canonical_host_type in
+      *-*-mingw32* | *-*-msdosmsvc)
+        save_LIBS="$LIBS"
+        LIBS="$LIBS -lopengl32"
+        AC_MSG_CHECKING([for glEnable in -lopengl32])
+        AC_TRY_LINK([
+#if HAVE_WINDOWS_H
+#include <windows.h>
+#endif
+#if defined (HAVE_GL_GL_H)
+#include <GL/gl.h>
+#elif defined (HAVE_OPENGL_GL_H)
+#include <OpenGL/gl.h>
+#endif
+], [glEnable(GL_SMOOTH);], OPENGL_LIBS="-lopengl32 -lglu32")
+        LIBS="$save_LIBS"
+        if test "x$OPENGL_LIBS" != "x"; then
+          AC_MSG_RESULT(yes)
+        else
+          AC_MSG_RESULT(no)
+        fi
+        ;;
+      *)
+        save_LDFLAGS="$LDFLAGS"
+        LDFLAGS="$LDFLAGS -L/usr/X11R6/lib"
+        AC_CHECK_LIB(GL, glEnable, OPENGL_LIBS="-L/usr/X11R6/lib -lGL -lGLU")
+        LDFLAGS="$save_LDFLAGS"
+        ;;
+    esac
+  fi
+fi
+AC_SUBST(OPENGL_LIBS)
+])
+dnl
+dnl See if function gluTessCallback is called with "(...)"
+dnl
+dnl OCTAVE_GLUTESSCALLBACK_THREEDOTS
+AC_DEFUN([OCTAVE_GLUTESSCALLBACK_THREEDOTS],
+[AC_CACHE_CHECK([whether gluTessCallback is called with "(...)"],
+octave_cv_glutesscallback_threedots,
+[AC_LANG_PUSH(C++)
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#ifdef HAVE_GL_GLU_H
+#include <GL/glu.h>
+#elif defined HAVE_OPENGL_GLU_H || defined HAVE_FRAMEWORK_OPENGL
+#include <OpenGL/glu.h>
+#endif]],
+[[GLvoid (*func)(...); gluTessCallback(0, 0, func);]])],
+octave_cv_glutesscallback_threedots="yes", octave_cv_glutesscallback_threedots="no")])
+AC_LANG_POP(C++)
+if test $octave_cv_glutesscallback_threedots = "yes"; then
+  AC_DEFINE(HAVE_GLUTESSCALLBACK_THREEDOTS, 1, 
+    [Define if gluTessCallback is called with (...)])
+fi
+])
+dnl
+dnl Configure paths for FreeType2
+dnl Marcelo Magallon 2001-10-26, based on gtk.m4 by Owen Taylor
+dnl
+dnl Copyright 2001, 2003 by
+dnl David Turner, Robert Wilhelm, and Werner Lemberg.
+dnl
+dnl This file is part of the FreeType project, and may only be used, modified,
+dnl and distributed under the terms of the FreeType project license,
+dnl LICENSE.TXT.  By continuing to use, modify, or distribute this file you
+dnl indicate that you have read the license and understand and accept it
+dnl fully.
+dnl
+dnl As a special exception to the FreeType project license, this file may be
+dnl distributed as part of a program that contains a configuration script
+dnl generated by Autoconf, under the same distribution terms as the rest of
+dnl that program.
+dnl
+dnl serial 2
+dnl
+dnl AC_CHECK_FT2([MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
+dnl Test for FreeType 2, and define FT2_CFLAGS and FT2_LIBS.
+dnl MINIMUM-VERSION is what libtool reports; the default is `7.0.1' (this is
+dnl FreeType 2.0.4).
+dnl
+AC_DEFUN([AC_CHECK_FT2],
+  [dnl Get the cflags and libraries from the freetype-config script
+   dnl
+   AC_ARG_WITH([ft-prefix],
+     dnl don't quote AS_HELP_STRING!
+     AS_HELP_STRING([--with-ft-prefix=PREFIX],
+                    [Prefix where FreeType is installed (optional)]),
+     [ft_config_prefix="$withval"],
+     [ft_config_prefix=""])
+  
+   AC_ARG_WITH([ft-exec-prefix],
+     dnl don't quote AS_HELP_STRING!
+     AS_HELP_STRING([--with-ft-exec-prefix=PREFIX],
+                    [Exec prefix where FreeType is installed (optional)]),
+     [ft_config_exec_prefix="$withval"],
+     [ft_config_exec_prefix=""])
+
+   AC_ARG_ENABLE([freetypetest],
+     dnl don't quote AS_HELP_STRING!
+     AS_HELP_STRING([--disable-freetypetest],
+                    [Do not try to compile and run a test FreeType program]),
+     [],
+     [enable_fttest=yes])
+
+   if test x$ft_config_exec_prefix != x ; then
+     ft_config_args="$ft_config_args --exec-prefix=$ft_config_exec_prefix"
+     if test x${FT2_CONFIG+set} != xset ; then
+       FT2_CONFIG=$ft_config_exec_prefix/bin/freetype-config
+     fi
+   fi
+
+   if test x$ft_config_prefix != x ; then
+     ft_config_args="$ft_config_args --prefix=$ft_config_prefix"
+     if test x${FT2_CONFIG+set} != xset ; then
+       FT2_CONFIG=$ft_config_prefix/bin/freetype-config
+     fi
+   fi
+
+   AC_PATH_PROG([FT2_CONFIG], [freetype-config], [no])
+
+   min_ft_version=m4_if([$1], [], [7.0.1], [$1])
+   AC_MSG_CHECKING([for FreeType -- version >= $min_ft_version])
+   no_ft=""
+   if test "$FT2_CONFIG" = "no" ; then
+     no_ft=yes
+   else
+     FT2_CFLAGS=`$FT2_CONFIG $ft_config_args --cflags`
+     FT2_LIBS=`$FT2_CONFIG $ft_config_args --libs`
+     ft_config_major_version=`$FT2_CONFIG $ft_config_args --version | \
+       sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
+     ft_config_minor_version=`$FT2_CONFIG $ft_config_args --version | \
+       sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
+     ft_config_micro_version=`$FT2_CONFIG $ft_config_args --version | \
+       sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
+     ft_min_major_version=`echo $min_ft_version | \
+       sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
+     ft_min_minor_version=`echo $min_ft_version | \
+       sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
+     ft_min_micro_version=`echo $min_ft_version | \
+       sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
+     if test x$enable_fttest = xyes ; then
+       ft_config_is_lt=""
+       if test $ft_config_major_version -lt $ft_min_major_version ; then
+         ft_config_is_lt=yes
+       else
+         if test $ft_config_major_version -eq $ft_min_major_version ; then
+           if test $ft_config_minor_version -lt $ft_min_minor_version ; then
+             ft_config_is_lt=yes
+           else
+            if test $ft_config_minor_version -eq $ft_min_minor_version ; then
+               if test $ft_config_micro_version -lt $ft_min_micro_version ; then
+                 ft_config_is_lt=yes
+               fi
+             fi
+           fi
+         fi
+       fi
+       if test x$ft_config_is_lt = xyes ; then
+         no_ft=yes
+       else
+         ac_save_CFLAGS="$CFLAGS"
+         ac_save_LIBS="$LIBS"
+         CFLAGS="$CFLAGS $FT2_CFLAGS"
+         LIBS="$FT2_LIBS $LIBS"
+
+         dnl
+         dnl Sanity checks for the results of freetype-config to some extent.
+         dnl
+         AC_RUN_IFELSE([
+             AC_LANG_SOURCE([[
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+#include <stdio.h>
+#include <stdlib.h>
+
+int
+main()
+{
+  FT_Library library;
+  FT_Error  error;
+
+  error = FT_Init_FreeType(&library);
+
+  if (error)
+    return 1;
+  else
+  {
+    FT_Done_FreeType(library);
+    return 0;
+  }
+}
+
+             ]])
+           ],
+           [],
+           [no_ft=yes],
+           [echo $ECHO_N "cross compiling; assuming OK... $ECHO_C"])
+
+         CFLAGS="$ac_save_CFLAGS"
+         LIBS="$ac_save_LIBS"
+       fi             dnl test $ft_config_version -lt $ft_min_version
+     fi               dnl test x$enable_fttest = xyes
+   fi                 dnl test "$FT2_CONFIG" = "no"
+
+   if test x$no_ft = x ; then
+     AC_MSG_RESULT([yes])
+     m4_if([$2], [], [:], [$2])
+   else
+     AC_MSG_RESULT([no])
+     if test "$FT2_CONFIG" = "no" ; then
+       AC_MSG_WARN([
+
+  The freetype-config script installed by FreeType 2 could not be found.
+  If FreeType 2 was installed in PREFIX, make sure PREFIX/bin is in
+  your path, or set the FT2_CONFIG environment variable to the
+  full path to freetype-config.
+       ])
+     else
+       if test x$ft_config_is_lt = xyes ; then
+         AC_MSG_WARN([
+
+  Your installed version of the FreeType 2 library is too old.
+  If you have different versions of FreeType 2, make sure that
+  correct values for --with-ft-prefix or --with-ft-exec-prefix
+  are used, or set the FT2_CONFIG environment variable to the
+  full path to freetype-config.
+         ])
+       else
+         AC_MSG_WARN([
+
+  The FreeType test program failed to run.  If your system uses
+  shared libraries and they are installed outside the normal
+  system library path, make sure the variable LD_LIBRARY_PATH
+  (or whatever is appropiate for your system) is correctly set.
+         ])
+       fi
+     fi
+
+     FT2_CFLAGS=""
+     FT2_LIBS=""
+     m4_if([$3], [], [:], [$3])
+   fi
+
+   AC_SUBST([FT2_CFLAGS])
+   AC_SUBST([FT2_LIBS])])
+dnl end of freetype2.m4
+
+dnl Check whether a math mapper function is available in <cmath>.
+dnl Will define HAVE_CMATH_FUNC if there is a double variant and
+dnl HAVE_CMATH_FUNCF if there is a float variant.
+dnl Currently capable of checking for functions with single 
+dnl argument and returning bool/int/real.
+AC_DEFUN([OCTAVE_CMATH_FUNC],[
+AC_MSG_CHECKING([for std::$1 in <cmath>])
+AC_LANG_PUSH(C++)
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <cmath>
+void take_func (bool (*func) (double x));
+void take_func (int (*func) (double x));
+void take_func (double (*func) (double x));
+]],
+[[
+take_func(std::$1);
+]])],
+[AC_MSG_RESULT([yes])
+ AC_DEFINE(HAVE_CMATH_[]AS_TR_CPP($1),1,[Define if <cmath> provides $1])],
+[AC_MSG_RESULT([no])])
+AC_MSG_CHECKING([for std::$1 (float variant) in <cmath>])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <cmath>
+void take_func (bool (*func) (float x));
+void take_func (int (*func) (float x));
+void take_func (float (*func) (float x));
+]],
+[[
+take_func(std::$1);
+]])],
+[AC_MSG_RESULT([yes])
+ AC_DEFINE(HAVE_CMATH_[]AS_TR_CPP($1)F,1,[Define if <cmath> provides float variant of $1])],
+[AC_MSG_RESULT([no])])
+AC_LANG_POP(C++)
+])
+
+dnl Check whether fast signed integer arithmetics using bit tricks
+dnl can be used in oct-inttypes.h. Defines HAVE_FAST_INT_OPS if
+dnl the following conditions hold:
+dnl 1. Signed numbers are represented by twos complement
+dnl    (see <http://en.wikipedia.org/wiki/Two%27s_complement>)
+dnl 2. static_cast to unsigned int counterpart works like interpreting
+dnl    the signed bit pattern as unsigned (and is thus zero-cost).
+dnl 3. Signed addition and subtraction yield the same bit results as unsigned.
+dnl    (We use casts to prevent optimization interference, so there is no
+dnl     need for things like -ftrapv).
+dnl 4. Bit operations on signed integers work like on unsigned integers,
+dnl    except for the shifts. Shifts are arithmetic.
+dnl
+AC_DEFUN([OCTAVE_FAST_INT_OPS],[
+AC_MSG_CHECKING([whether fast integer arithmetics is usable])
+AC_LANG_PUSH(C++)
+AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+#include <limits>
+template<class UT, class ST>
+static bool 
+do_test (UT, ST)
+{
+  volatile ST s = std::numeric_limits<ST>::min () / 3;
+  volatile UT u = static_cast<UT> (s);
+  if (*(reinterpret_cast<volatile ST *> (&u)) != s) return true;
+  
+  u = 0; u = ~u;
+  if (*(reinterpret_cast<volatile ST *> (&u)) != -1) return true;
+  
+  ST sx, sy;
+  sx = std::numeric_limits<ST>::max () / 2 + 1;
+  sy = std::numeric_limits<ST>::max () / 2 + 2;
+  if (static_cast<ST> (static_cast<UT> (sx) + static_cast<UT> (sy))
+      != std::numeric_limits<ST>::min () + 1) return true;
+  if (static_cast<ST> (static_cast<UT> (sx) - static_cast<UT> (sy))
+      != -1) return true;
+  
+  if ((sx & sy) != (static_cast<UT> (sx) & static_cast<UT> (sy)))
+    return true;
+  if ((sx | sy) != (static_cast<UT> (sx) | static_cast<UT> (sy)))
+    return true;
+  if ((sx ^ sy) != (static_cast<UT> (sx) ^ static_cast<UT> (sy)))
+    return true;
+  if ((-1 >> 1) != -1) return true;
+  return false;
+}
+
+#define DO_TEST(T) \
+if (do_test (static_cast<unsigned T> (0), static_cast<signed T> (0))) \
+  return sizeof (T);
+]],[[
+  DO_TEST(char)
+  DO_TEST(short)
+  DO_TEST(int)
+  DO_TEST(long)
+#if (defined(HAVE_LONG_LONG_INT) && defined(HAVE_UNSIGNED_LONG_LONG_INT))
+  DO_TEST(long long)
+#endif
+]])],
+[AC_MSG_RESULT([yes])
+ AC_DEFINE(HAVE_FAST_INT_OPS,1,[Define if signed integers use two's complement])],
+[AC_MSG_RESULT([no])])
+AC_LANG_POP(C++)])
+dnl
+dnl Check to see if the compiler and the linker can handle the flags
+dnl "-framework $1" for the given prologue $2 and the given body $3 of
+dnl a source file.  Arguments 2 and 3 optionally can also be empty.
+dnl Add options (lower case letters $1) "--with-framework-$1" and
+dnl "--without-framework-$1". If this test is successful then perform
+dnl $4, otherwise do $5.
+dnl
+dnl OCTAVE_HAVE_FRAMEWORK
+AC_DEFUN([OCTAVE_HAVE_FRAMEWORK], [
+  AC_MSG_CHECKING(whether ${LD-ld} accepts -framework $1)
+  AC_CACHE_VAL(octave_cv_framework_$1, [
+    XLDFLAGS="$LDFLAGS"
+    LDFLAGS="$LDFLAGS -framework $1"
+    AC_LANG_PUSH(C++)
+    AC_LINK_IFELSE([AC_LANG_PROGRAM([$2], [$3])],
+      eval "octave_cv_framework_$1=yes",
+      eval "octave_cv_framework_$1=no")
+    AC_LANG_POP(C++)
+    LDFLAGS="$XLDFLAGS"
+  ])
+  if test "$octave_cv_framework_$1" = "yes"; then
+    AC_MSG_RESULT(yes)
+    AC_ARG_WITH(framework-m4_tolower($1),
+      [AS_HELP_STRING([--without-framework-m4_tolower($1)], 
+        [don't use framework $1])],
+         with_have_framework=$withval, with_have_framework="yes")
+    if test "$with_have_framework" = "yes"; then
+      [$4]
+    else
+      AC_MSG_NOTICE([framework rejected by --without-framework-m4_tolower($1)])
+      [$5]
+    fi
+  else
+    AC_MSG_RESULT(no)
+    [$5]
+  fi
+])
+dnl
+dnl Do we have a working c99 vsnprintf function?
+dnl
+dnl OCTAVE_HAVE_C99_VSNPRINTF
+AC_DEFUN([OCTAVE_HAVE_C99_VSNPRINTF], [
+  AC_CACHE_CHECK([for c99 vsnprintf], [oct_cv_c99_vsnprintf],
+    [AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>
+#include <stdarg.h>
+#include <stdlib.h>
+
+int
+doit(char * s, ...)
+{
+  char buffer[32];
+  va_list args;
+  int r;
+
+  va_start(args, s);
+  r = vsnprintf(buffer, 5, s, args);
+  va_end(args);
+
+  if (r != 7)
+    exit(1);
+
+  exit(0);
+}
+  ]],[
+doit("1234567");])],
+  [oct_cv_c99_vsnprintf=yes],
+  [oct_cv_c99_vsnprintf=no],
+  [oct_cv_c99_vsnprintf="guessing no"])])
+
+case $oct_cv_c99_vsnprintf in
+yes)
+    AC_DEFINE([HAVE_C99_VSNPRINTF], [1], [Define if you have a c99 vsnprintf])
+  ;;
+esac
+])
+
+##############################################################################
+##############################################################################
+
+# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
+# 
+# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# PKG_PROG_PKG_CONFIG([MIN-VERSION])
+# ----------------------------------
+AC_DEFUN([PKG_PROG_PKG_CONFIG],
+[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
+m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
+AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
+fi
+if test -n "$PKG_CONFIG"; then
+	_pkg_min_version=m4_default([$1], [0.9.0])
+	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
+	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+		AC_MSG_RESULT([yes])
+	else
+		AC_MSG_RESULT([no])
+		PKG_CONFIG=""
+	fi
+		
+fi[]dnl
+])# PKG_PROG_PKG_CONFIG
+
+# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+#
+# Check to see whether a particular set of modules exists.  Similar
+# to PKG_CHECK_MODULES(), but does not set variables or print errors.
+#
+#
+# Similar to PKG_CHECK_MODULES, make sure that the first instance of
+# this or PKG_CHECK_MODULES is called, or make sure to call
+# PKG_CHECK_EXISTS manually
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_EXISTS],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+if test -n "$PKG_CONFIG" && \
+    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
+  m4_ifval([$2], [$2], [:])
+m4_ifvaln([$3], [else
+  $3])dnl
+fi])
+
+
+# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
+# ---------------------------------------------
+m4_define([_PKG_CONFIG],
+[if test -n "$PKG_CONFIG"; then
+    if test -n "$$1"; then
+        pkg_cv_[]$1="$$1"
+    else
+        PKG_CHECK_EXISTS([$3],
+                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
+			 [pkg_failed=yes])
+    fi
+else
+	pkg_failed=untried
+fi[]dnl
+])# _PKG_CONFIG
+
+# _PKG_SHORT_ERRORS_SUPPORTED
+# -----------------------------
+AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi[]dnl
+])# _PKG_SHORT_ERRORS_SUPPORTED
+
+
+# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+# [ACTION-IF-NOT-FOUND])
+#
+#
+# Note that if there is a possibility the first call to
+# PKG_CHECK_MODULES might not happen, you should be sure to include an
+# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
+#
+#
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_MODULES],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
+AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
+
+pkg_failed=no
+AC_MSG_CHECKING([for $1])
+
+_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
+_PKG_CONFIG([$1][_LIBS], [libs], [$2])
+
+m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
+and $1[]_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.])
+
+if test $pkg_failed = yes; then
+        _PKG_SHORT_ERRORS_SUPPORTED
+        if test $_pkg_short_errors_supported = yes; then
+	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
+        else 
+	        $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
+
+	ifelse([$4], , [AC_MSG_ERROR(dnl
+[Package requirements ($2) were not met:
+
+$$1_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+_PKG_TEXT
+])],
+		[AC_MSG_RESULT([no])
+                $4])
+elif test $pkg_failed = untried; then
+	ifelse([$4], , [AC_MSG_FAILURE(dnl
+[The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+_PKG_TEXT
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
+		[$4])
+else
+	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
+	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
+        AC_MSG_RESULT([yes])
+	ifelse([$3], , :, [$3])
+fi[]dnl
+])# PKG_CHECK_MODULES
+
+dnl
+dnl External macros.
+dnl
+
+m4_include([m4/acx_pthread.m4])
+m4_include([m4/acx_blas.m4])
+m4_include([m4/acx_blas_f77_func.m4])
+m4_include([m4/acx_lapack.m4])
--- a/aclocal.m4	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1751 +0,0 @@
-dnl aclocal.m4 -- extra macros for configuring Octave
-dnl
-dnl Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-dnl               2003, 2004, 2005, 2006, 2007, 2008, 2009 John W. Eaton
-dnl 
-dnl This file is part of Octave.
-dnl 
-dnl Octave is free software; you can redistribute it and/or modify it
-dnl under the terms of the GNU General Public License as published by the
-dnl Free Software Foundation; either version 3 of the License, or (at
-dnl your option) any later version.
-dnl 
-dnl Octave is distributed in the hope that it will be useful, but WITHOUT
-dnl ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-dnl FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-dnl for more details.
-dnl 
-dnl You should have received a copy of the GNU General Public License
-dnl along with Octave; see the file COPYING.  If not, see
-dnl <http://www.gnu.org/licenses/>.
-dnl
-dnl
-dnl Copyright (C) 2008 - 2009 Free Software Foundation, Inc.
-dnl
-dnl If needed, define the m4_ifblank and m4_ifnblank macros from autoconf 2.64
-dnl This allows us to run with earlier Autoconfs as well.
-dnl FIXME: these should go away once Autoconf 2.64 is required or ubiquitous.
-dnl
-ifdef([m4_ifblank],[],[
-m4_define([m4_ifblank],
-[m4_if(m4_translit([[$1]],  [ ][	][
-]), [], [$2], [$3])])])
-dnl
-ifdef([m4_ifnblank],[],[
-m4_define([m4_ifnblank],
-[m4_if(m4_translit([[$1]],  [ ][	][
-]), [], [$3], [$2])])])
-dnl
-dnl ----------------------------------------------------------------------
-dnl
-dnl Figure out the hardware-vendor-os info.
-dnl
-dnl OCTAVE_HOST_TYPE
-AC_DEFUN([OCTAVE_HOST_TYPE],
-[AC_CANONICAL_HOST
-if test -z "$host"; then
-  host=unknown
-fi
-canonical_host_type=$host
-if test "$host" = unknown; then
-  AC_MSG_WARN([configuring Octave for unknown system type
-])
-fi
-AC_SUBST(canonical_host_type)])
-dnl
-dnl Set default value for a variable and substitute it.
-dnl
-dnl OCTAVE_SET_DEFAULT
-AC_DEFUN([OCTAVE_SET_DEFAULT],
-[ifelse($#, 2, [: ${$1=$2}
-])dnl
-AC_MSG_RESULT([defining $1 to be $$1])
-AC_SUBST($1)])
-dnl
-dnl Check for ar.
-dnl
-AC_DEFUN([OCTAVE_PROG_AR],
-[if test -z "$AR"; then
-  AR=ar
-fi
-AC_SUBST(AR)
-
-if test -z "$ARFLAGS"; then
-  ARFLAGS="rc"
-fi
-AC_SUBST(ARFLAGS)
-])
-dnl
-dnl See if the compiler supports placement delete
-dnl
-AC_DEFUN([OCTAVE_PLACEMENT_DELETE],
-[AC_CACHE_CHECK([whether <new> defines placement delete operator],
-octave_cv_placement_delete,
-[AC_LANG_PUSH(C++)
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <new>]],
-[[operator delete((void *)0, (void *)0);]])],
-octave_cv_placement_delete=yes, octave_cv_placement_delete=no)])
-if test $octave_cv_placement_delete = yes; then
-AC_DEFINE(HAVE_PLACEMENT_DELETE,1,[Define if C++ supports operator delete(void *, void *)])
-fi
-AC_LANG_POP(C++)
-])
-dnl
-dnl See if the compiler dynamic auto arrays
-dnl
-AC_DEFUN([OCTAVE_DYNAMIC_AUTO_ARRAYS],
-[AC_CACHE_CHECK([whether C++ supports dynamic auto arrays],
-octave_cv_dynamic_auto_arrays,
-[AC_LANG_PUSH(C++)
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],
-[[void test(char *); int length(); char x[length()]; test(x);]])],
-octave_cv_dynamic_auto_arrays=yes, octave_cv_dynamic_auto_arrays=no)])
-if test $octave_cv_dynamic_auto_arrays = yes; then
-AC_DEFINE(HAVE_DYNAMIC_AUTO_ARRAYS,1,[Define if C++ supports dynamic auto arrays])
-fi
-AC_LANG_POP(C++)
-])
-dnl
-dnl Check for broken strptime
-dnl
-AC_DEFUN([OCTAVE_STRPTIME_BROKEN],
-[AC_CACHE_CHECK([whether strptime is broken],
-octave_cv_strptime_broken,
-[AC_LANG_PUSH(C)
-AC_RUN_IFELSE([AC_LANG_PROGRAM([[
-#define _XOPEN_SOURCE
-#if defined (HAVE_SYS_TYPES_H)
-#include <sys/types.h>
-#if defined (HAVE_UNISTD_H)
-#include <unistd.h>
-#endif
-#endif
-#include <stdio.h>
-#include <time.h>
-]], [[
-struct tm t;
-char *q = strptime ("09/13", "%m/%d/%y", &t);
-return q ? 1 : 0;
-]])], [octave_cv_strptime_broken=no], [octave_cv_strptime_broken=yes])])
-if test $octave_cv_strptime_broken = yes; then
-AC_DEFINE(OCTAVE_HAVE_BROKEN_STRPTIME, 1, [Define if strptime is broken on your system])
-fi
-AC_LANG_POP(C)
-])
-dnl
-dnl The following test is from Karl Berry's Kpathseach library.  I'm
-dnl including it here in case we someday want to make the use of
-dnl kpathsea optional.
-dnl
-dnl Some BSD putenv's, e.g., FreeBSD, do malloc/free's on the environment.
-dnl This test program is due to Mike Hibler <mike@cs.utah.edu>.
-dnl We don't actually need to run this if we don't have putenv, but it
-dnl doesn't hurt.
-AC_DEFUN([OCTAVE_SMART_PUTENV],
-[AC_MSG_CHECKING(whether putenv uses malloc)
-AC_CACHE_VAL(octave_cv_func_putenv_malloc,
-[AC_RUN_IFELSE([AC_LANG_SOURCE([[
-#define VAR	"YOW_VAR"
-#define STRING1 "GabbaGabbaHey"
-#define STRING2 "Yow!!"		/* should be shorter than STRING1 */
-extern char *getenv (); /* in case char* and int don't mix gracefully */
-main ()
-{
-  char *str1, *rstr1, *str2, *rstr2;
-  str1 = getenv (VAR);
-  if (str1)
-    exit (1);
-  str1 = malloc (strlen (VAR) + 1 + strlen (STRING1) + 1);
-  if (str1 == 0)
-    exit (2);
-  strcpy (str1, VAR);
-  strcat (str1, "=");
-  strcat (str1, STRING1);
-  if (putenv (str1) < 0)
-    exit (3);
-  rstr1 = getenv (VAR);
-  if (rstr1 == 0)
-    exit (4);
-  rstr1 -= strlen (VAR) + 1;
-  if (strncmp (rstr1, VAR, strlen (VAR)))
-    exit (5);
-  str2 = malloc (strlen (VAR) + 1 + strlen (STRING2) + 1);
-  if (str2 == 0 || str1 == str2)
-    exit (6);
-  strcpy (str2, VAR);
-  strcat (str2, "=");
-  strcat (str2, STRING2);
-  if (putenv (str2) < 0)
-    exit (7);
-  rstr2 = getenv (VAR);
-  if (rstr2 == 0)
-    exit (8);
-  rstr2 -= strlen (VAR) + 1;
-#if 0
-  printf ("rstr1=0x%x, rstr2=0x%x\n", rstr1, rstr2);
-  /*
-   * If string from first call was reused for the second call,
-   * you had better not do a free on the first string!
-   */
-  if (rstr1 == rstr2)
-          printf ("#define SMART_PUTENV\n");
-  else
-          printf ("#undef SMART_PUTENV\n");
-#endif
-  exit (rstr1 == rstr2 ? 0 : 1);
-}]])], octave_cv_func_putenv_malloc=yes, octave_cv_func_putenv_malloc=no,
-    octave_cv_func_putenv_malloc=no)])dnl
-AC_MSG_RESULT($octave_cv_func_putenv_malloc)
-if test $octave_cv_func_putenv_malloc = yes; then
-  AC_DEFINE(SMART_PUTENV,1,[To quiet autoheader.])
-fi])
-dnl
-dnl These two checks for signal functions were originally part of the
-dnl aclocal.m4 file distributed with bash 2.0.
-dnl
-dnl Check type of signal routines (posix, 4.2bsd, 4.1bsd or v7)
-AC_DEFUN([OCTAVE_SIGNAL_CHECK],
-[AC_REQUIRE([AC_TYPE_SIGNAL])
-AC_MSG_CHECKING(for type of signal functions)
-AC_CACHE_VAL(octave_cv_signal_vintage,
-[
-  AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <signal.h>]],
-    [[sigset_t ss;
-      struct sigaction sa;
-      sigemptyset (&ss);
-      sigsuspend (&ss);
-      sigaction (SIGINT, &sa, (struct sigaction *) 0);
-      sigprocmask (SIG_BLOCK, &ss, (sigset_t *) 0);]])],
-    [octave_cv_signal_vintage=posix],
-    [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <signal.h>]],
-       [[int mask = sigmask (SIGINT);
-	 sigsetmask (mask);
-         sigblock (mask);
-         sigpause (mask);]])],
-       [octave_cv_signal_vintage=4.2bsd],
-       [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <signal.h>
-          RETSIGTYPE foo() { }]],
-          [[int mask = sigmask (SIGINT);
-	    sigset (SIGINT, foo);
-            sigrelse (SIGINT);
-	    sighold (SIGINT);
-            sigpause (SIGINT);]])],
-          [octave_cv_signal_vintage=svr3],
-          [octave_cv_signal_vintage=v7])])])])
-AC_MSG_RESULT($octave_cv_signal_vintage)
-if test "$octave_cv_signal_vintage" = posix; then
-AC_DEFINE(HAVE_POSIX_SIGNALS, 1, [Define if you have POSIX style signals.])
-elif test "$octave_cv_signal_vintage" = "4.2bsd"; then
-AC_DEFINE(HAVE_BSD_SIGNALS, 1, [Define if you have BSD style signals.])
-elif test "$octave_cv_signal_vintage" = svr3; then
-AC_DEFINE(HAVE_USG_SIGHOLD, 1, [Define if you have System V Release 3 signals.])
-fi
-])
-dnl
-AC_DEFUN([OCTAVE_REINSTALL_SIGHANDLERS],
-[AC_REQUIRE([AC_TYPE_SIGNAL])
-AC_REQUIRE([OCTAVE_SIGNAL_CHECK])
-AC_MSG_CHECKING([if signal handlers must be reinstalled when invoked])
-AC_CACHE_VAL(octave_cv_must_reinstall_sighandlers,
-[AC_RUN_IFELSE([AC_LANG_SOURCE([[
-#include <signal.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-typedef RETSIGTYPE sigfunc();
-int nsigint;
-#ifdef HAVE_POSIX_SIGNALS
-sigfunc *
-set_signal_handler(sig, handler)
-     int sig;
-     sigfunc *handler;
-{
-  struct sigaction act, oact;
-  act.sa_handler = handler;
-  act.sa_flags = 0;
-  sigemptyset (&act.sa_mask);
-  sigemptyset (&oact.sa_mask);
-  sigaction (sig, &act, &oact);
-  return (oact.sa_handler);
-}
-#else
-#define set_signal_handler(s, h) signal(s, h)
-#endif
-RETSIGTYPE
-sigint(s)
-    int s;
-{
-  nsigint++;
-}
-main()
-{
-  nsigint = 0;
-  set_signal_handler(SIGINT, sigint);
-  kill((int)getpid(), SIGINT);
-  kill((int)getpid(), SIGINT);
-  exit(nsigint != 2);
-}
-]])],
-  octave_cv_must_reinstall_sighandlers=no,
-  octave_cv_must_reinstall_sighandlers=yes,
-if test "$octave_cv_signal_vintage" = svr3; then
-  octave_cv_must_reinstall_sighandlers=yes
-else
-  octave_cv_must_reinstall_sighandlers=no
-fi)])
-if test "$cross_compiling" = yes; then
-  AC_MSG_RESULT([$octave_cv_must_reinstall_sighandlers assumed for cross compilation])
-else
-  AC_MSG_RESULT($octave_cv_must_reinstall_sighandlers)
-fi
-if test "$octave_cv_must_reinstall_sighandlers" = yes; then
-  AC_DEFINE(MUST_REINSTALL_SIGHANDLERS,1,[Define if signal handlers must be reinstalled after they are called.])
-fi
-])
-dnl
-dnl Check to see if C++ compiler needs the new friend template declaration 
-dnl syntax. 
-dnl
-dnl OCTAVE_CXX_NEW_FRIEND_TEMPLATE_DECL
-AC_DEFUN([OCTAVE_CXX_NEW_FRIEND_TEMPLATE_DECL], [
-  AC_REQUIRE([AC_PROG_CXX])
-  AC_MSG_CHECKING([for C++ support for new friend template declaration])
-  AC_CACHE_VAL(octave_cv_cxx_new_friend_template_decl, [
-    AC_LANG_PUSH(C++)
-    rm -f conftest.h
-    cat > conftest.h <<EOB
-       struct A {
-	 friend int operator== (const A&, const A&);
-	 A (int) { }
-       };
-
-       template <class T> int
-       operator== (const T&, const T&)
-       {
-	 return 0;
-       }
-EOB
-    AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include "conftest.h"]],
-      [[A a (1);
-        return a == A(1);]])],
-      [octave_cv_cxx_new_friend_template_decl=no],
-      [octave_cv_cxx_new_friend_template_decl=yes])
-    AC_LANG_POP(C++)
-  ])
-  AC_MSG_RESULT($octave_cv_cxx_new_friend_template_decl)
-  if test $octave_cv_cxx_new_friend_template_decl = yes; then
-    AC_DEFINE(CXX_NEW_FRIEND_TEMPLATE_DECL,1,[Define if your compiler supports `<>' stuff for template friends.])
-  fi
-])
-dnl
-dnl Check to see if C compiler handles FLAG command line option.  If
-dnl two arguments are specified, execute the second arg as shell
-dnl commands.  Otherwise, add FLAG to CFLAGS if the compiler accepts
-dnl the flag.
-dnl
-dnl OCTAVE_CC_FLAG
-AC_DEFUN([OCTAVE_CC_FLAG], [
-  ac_safe=`echo "$1" | sed 'y%./+-:=%__p___%'`
-  AC_MSG_CHECKING(whether ${CC-cc} accepts $1)
-  AC_CACHE_VAL(octave_cv_cc_flag_$ac_safe, [
-    AC_LANG_PUSH(C)
-    XCFLAGS="$CFLAGS"
-    CFLAGS="$CFLAGS $1"
-    AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
-      eval "octave_cv_cc_flag_$ac_safe=yes",
-      eval "octave_cv_cc_flag_$ac_safe=no")
-    CFLAGS="$XCFLAGS"
-    AC_LANG_POP(C)
-  ])
-  if eval "test \"`echo '$octave_cv_cc_flag_'$ac_safe`\" = yes"; then
-    AC_MSG_RESULT(yes)
-    ifelse([$2], , [
-      CFLAGS="$CFLAGS $1"
-      AC_MSG_RESULT([adding $1 to CFLAGS])], [$2])
-  else
-    AC_MSG_RESULT(no)
-    ifelse([$3], , , [$3])
-  fi
-])
-dnl
-dnl Check to see if C++ compiler handles FLAG command line option.  If
-dnl two arguments are specified, execute the second arg as shell
-dnl commands.  Otherwise, add FLAG to CXXFLAGS if the compiler accepts
-dnl the flag.
-dnl
-dnl OCTAVE_CXX_FLAG
-AC_DEFUN([OCTAVE_CXX_FLAG], [
-  ac_safe=`echo "$1" | sed 'y%./+-:=%__p___%'`
-  AC_MSG_CHECKING(whether ${CXX-g++} accepts $1)
-  AC_CACHE_VAL(octave_cv_cxx_flag_$ac_safe, [
-    AC_LANG_PUSH(C++)
-    XCXXFLAGS="$CXXFLAGS"
-    CXXFLAGS="$CXXFLAGS $1"
-    AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
-      eval "octave_cv_cxx_flag_$ac_safe=yes",
-      eval "octave_cv_cxx_flag_$ac_safe=no")
-    CXXFLAGS="$XCXXFLAGS"
-    AC_LANG_POP(C++)
-  ])
-  if eval "test \"`echo '$octave_cv_cxx_flag_'$ac_safe`\" = yes"; then
-    AC_MSG_RESULT(yes)
-    ifelse([$2], , [
-      CXXFLAGS="$CXXFLAGS $1"
-      AC_MSG_RESULT([adding $1 to CXXFLAGS])], [$2])
-  else
-    AC_MSG_RESULT(no)
-    ifelse([$3], , , [$3])
-  fi
-])
-dnl
-dnl Check to see if Fortran compiler handles FLAG command line option.  If
-dnl two arguments are specified, execute the second arg as shell
-dnl commands.  Otherwise, add FLAG to FFLAGS if the compiler accepts
-dnl the flag.
-dnl
-dnl OCTAVE_F77_FLAG
-AC_DEFUN([OCTAVE_F77_FLAG], [
-  ac_safe=`echo "$1" | sed 'y%./+-:=%__p___%'`
-  AC_MSG_CHECKING(whether ${F77-g77} accepts $1)
-  AC_CACHE_VAL(octave_cv_f77_flag_$ac_safe, [
-    AC_LANG_PUSH(Fortran 77)
-    XFFLAGS="$FFLAGS"
-    FFLAGS="$FFLAGS $1"
-    AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
-      eval "octave_cv_f77_flag_$ac_safe=yes",
-      eval "octave_cv_f77_flag_$ac_safe=no")
-    FFLAGS="$XFFLAGS"
-    AC_LANG_POP(Fortran 77)
-  ])
-  if eval "test \"`echo '$octave_cv_f77_flag_'$ac_safe`\" = yes"; then
-    AC_MSG_RESULT(yes)
-    ifelse([$2], , [
-      FFLAGS="$FFLAGS $1"
-      AC_MSG_RESULT([adding $1 to FFLAGS])], [$2])
-  else
-    AC_MSG_RESULT(no)
-    ifelse([$3], , , [$3])
-  fi
-])
-dnl
-dnl Check to see whether the default Fortran INTEGER is 64 bits wide.
-dnl
-AC_DEFUN([OCTAVE_CHECK_FORTRAN_INTEGER_SIZE], [
-  AC_LANG_PUSH(Fortran 77)
-  AC_CACHE_CHECK([whether $F77 generates correct size integers],
-                 [octave_cv_fortran_integer_size],
-[AC_COMPILE_IFELSE(
-[      subroutine foo(n, in, out)
-      integer n, in(n), out(n)
-      integer i
-      do 10 i = 1, n
-        out(i) = in(i)
-   10 continue
-      return
-      end],
-[mv conftest.$ac_objext fintsize.$ac_objext
-
-  octave_fintsize_save_LIBS="$LIBS"
-  LIBS="fintsize.$ac_objext $[]_AC_LANG_PREFIX[]LIBS"
-  AC_LANG_PUSH(C)dnl
-  AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <assert.h>]], [[
-#ifdef USE_64_BIT_IDX_T
-#if IDX_TYPE_LONG
-  typedef long octave_idx_type;
-#else
-  typedef int octave_idx_type;
-#endif
-#else
-  typedef int octave_idx_type;
-#endif
-  octave_idx_type n = 2;
-  octave_idx_type in[2];
-  octave_idx_type out[2];
-  in[0] = 13;
-  in[0] = 42;
-  F77_FUNC(foo,FOO) (&n, &in, &out);
-  assert (in[0] == out[0] && in[1] == out[1]);
-]])],
-  [octave_cv_fortran_integer_size=yes],
-  [octave_cv_fortran_integer_size=no])
-  AC_LANG_POP(C)dnl
-
-LIBS="$octave_fintsize_save_LIBS"
-rm -f conftest.$ac_objext fintsize.$ac_objext
-], [
-  rm -f conftest.$ac_objext
-  AC_MSG_FAILURE([cannot compile a simple Fortran program])
-  octave_cv_fortran_integer_size=no])])
-  AC_LANG_POP(Fortran 77)
-])
-dnl
-dnl
-dnl
-dnl OCTAVE_CHECK_LIBRARY(LIBRARY, DOC-NAME, WARN-MSG, HEADER, FUNC,
-dnl                      LANG, DOC-STRING, EXTRA-CHECK)
-AC_DEFUN([OCTAVE_CHECK_LIBRARY], [
-  AC_ARG_WITH([$1-includedir],
-    [AS_HELP_STRING([--with-$1-includedir=DIR],
-      [look for $2 include files in DIR])],
-    [m4_toupper([$1])_CPPFLAGS="-I$withval"])
-  AC_SUBST(m4_toupper([$1])_CPPFLAGS)
-
-  AC_ARG_WITH([$1-libdir],
-    [AS_HELP_STRING([--with-$1-libdir=DIR],
-      [look for $2 libraries in DIR])],
-    [m4_toupper([$1])_LDFLAGS="-L$withval"])
-  AC_SUBST(m4_toupper([$1])_LDFLAGS)
-
-  AC_ARG_WITH([$1],
-    [m4_ifblank([$7],
-      [AS_HELP_STRING([--without-$1], [don't use $2 library])],
-      [AS_HELP_STRING([--without-$1], [$7])])],
-    with_$1=$withval, with_$1=yes)
-
-  m4_toupper([$1])_LIBS=
-  case $with_$1 in
-    no)
-      m4_toupper([$1])_LIBS=
-    ;;
-    yes | "")
-      m4_toupper([$1])_LIBS="-l$1"
-    ;;
-    -* | */* | *.a | *.so | *.so.* | *.o)
-      m4_toupper([$1])_LIBS="$with_$1"
-    ;;
-    *)
-      m4_toupper([$1])_LIBS="-l$with_$1"
-    ;;
-  esac
-
-  [TEXINFO_]m4_toupper([$1])=
-  warn_$1="$3"
-  if test -n "$m4_toupper([$1])_LIBS"; then
-    octave_check_library_save_CPPFLAGS="$CPPFLAGS"
-    CPPFLAGS="$m4_toupper([$1])_CPPFLAGS $CPPFLAGS"
-    m4_ifnblank([$6], [AC_LANG_PUSH($6)])
-    octave_$1_check_for_lib=false
-    m4_ifblank([$4], [octave_$1_check_for_lib=true],
-               [AC_CHECK_HEADERS($4, [octave_$1_check_for_lib=true; break])])
-    if $octave_$1_check_for_lib; then
-      octave_check_library_save_LDFLAGS="$LDFLAGS"
-      LDFLAGS="$m4_toupper([$1])_LDFLAGS $LDFLAGS"
-      octave_check_library_save_LIBS="$LIBS"
-      LIBS="$m4_toupper([$1])_LIBS $LIBS"
-      octave_$1_ok=no
-      AC_MSG_CHECKING([for $5 in $m4_toupper([$1])_LIBS])
-      AC_LINK_IFELSE([AC_LANG_CALL([], [$5])],
-	[octave_$1_ok=yes])
-      AC_MSG_RESULT($octave_$1_ok)
-      if test $octave_$1_ok = yes; then
-	m4_ifblank([$8], [
-	  warn_$1=
-	  AC_DEFINE([HAVE_]m4_toupper([$1]), 1,
-            [Define if $2 is available.])
-	  [TEXINFO_]m4_toupper([$1])="@set [HAVE_]m4_toupper([$1])"], [$8])
-      fi
-      LIBS="$octave_check_library_save_LIBS"
-      LDFLAGS="$octave_check_library_save_LDFLAGS"
-    fi
-    m4_ifnblank([$6], [AC_LANG_POP($6)])
-    CPPFLAGS="$octave_check_library_save_CPPFLAGS"
-  fi
-  AC_SUBST(m4_toupper([$1])_LIBS)
-  AC_SUBST([TEXINFO_]m4_toupper([$1]))
-  if test -n "$warn_$1"; then
-    AC_MSG_WARN($warn_$1)
-    m4_toupper([$1])_LIBS=
-  fi
-])
-dnl
-dnl Check for flex
-dnl
-AC_DEFUN([OCTAVE_PROG_FLEX], [
-### For now, don't define LEXLIB to be -lfl -- we don't use anything in
-### it, and it might not be installed.
-###
-### Also make sure that we generate an interactive scanner if we are
-### using flex.
-  AC_PROG_LEX
-  case "$LEX" in
-    flex*)
-      LFLAGS="-t -I"
-      AC_MSG_RESULT([defining LFLAGS to be $LFLAGS])
-      LEXLIB=
-    ;;
-    *)
-      LEX='$(top_srcdir)/missing flex'
-      warn_flex="I didn't find flex, but it's only a problem if you need to reconstruct lex.cc"
-      AC_MSG_WARN($warn_flex)
-    ;;
-  esac
-  AC_SUBST(LFLAGS)
-])
-dnl
-dnl Check for bison
-dnl
-AC_DEFUN([OCTAVE_PROG_BISON], [
-  AC_PROG_YACC
-  case "$YACC" in
-    bison*)
-    ;;
-    *)
-      YACC='$(top_srcdir)/missing bison'
-      warn_bison="I didn't find bison, but it's only a problem if you need to reconstruct parse.cc"
-      AC_MSG_WARN($warn_bison)
-    ;;
-  esac
-])
-dnl
-dnl What pager should we use?
-dnl
-AC_DEFUN([OCTAVE_PROG_PAGER],
-[if test "$cross_compiling" = yes; then
-  DEFAULT_PAGER=less
-  AC_MSG_RESULT(assuming $DEFAULT_PAGER exists on $canonical_host_type host)
-  AC_SUBST(DEFAULT_PAGER)
-else
-  octave_possible_pagers="less more page pg"
-  case "$canonical_host_type" in
-    *-*-cygwin* | *-*-mingw32* | *-*-msdosmsvc)
-      octave_possible_pagers="$octave_possible_pagers more.com"
-    ;;
-  esac
-
-  AC_CHECK_PROGS(DEFAULT_PAGER, $octave_possible_pagers, [])
-  if test -z "$DEFAULT_PAGER"; then
-    warn_less="I couldn't find \`less', \`more', \`page', or \`pg'"
-    AC_MSG_WARN($warn_less)
-  fi
-fi
-])
-dnl
-dnl Does gnuplot exist?
-dnl
-AC_DEFUN([OCTAVE_PROG_GNUPLOT], [
-case "$canonical_host_type" in
-  *-*-cygwin* | *-*-mingw32* | *-*-msdosmsvc)
-    gp_names="pgnuplot pipe-gnuplot gnuplot"
-    gp_default=pgnuplot
-  ;;
-  *)
-    gp_names=gnuplot
-    gp_default=gnuplot
-  ;;
-esac
-if test "$cross_compiling" = yes; then
-  GNUPLOT="$gp_default"
-  AC_MSG_RESULT(assuming $GNUPLOT exists on $canonical_host_type host)
-else
-  AC_CHECK_PROGS(GNUPLOT, $gp_names)
-  if test -z "$GNUPLOT"; then
-    warn_gnuplot=yes
-
-    GNUPLOT="$gp_default"
-
-    ## If you change this text, be sure to also copy it to the set of
-    ## warnings at the end of the script
-
-    AC_MSG_WARN([I didn't find gnuplot.  It isn't necessary to have gnuplot])
-    AC_MSG_WARN([installed, but you won't be able to use any of Octave's])
-    AC_MSG_WARN([plotting commands without it.])
-    AC_MSG_WARN([])
-    AC_MSG_WARN([If gnuplot is installed but it isn't in your path, you can])
-    AC_MSG_WARN([tell Octave where to find it by typing the command])
-    AC_MSG_WARN([])
-    AC_MSG_WARN([gnuplot_binary = "/full/path/to/gnuplot/binary"])
-    AC_MSG_WARN([])
-    AC_MSG_WARN([at the Octave prompt.])
-    AC_MSG_WARN([])
-    AC_MSG_WARN([Setting default value to $GNUPLOT])
-  fi
-fi
-AC_SUBST(GNUPLOT)
-])
-dnl
-dnl Is gperf installed?
-dnl
-dnl OCTAVE_PROG_GPERF
-AC_DEFUN([OCTAVE_PROG_GPERF], [
-  AC_CHECK_PROG(GPERF, gperf, gperf, [])
-  if test -z "$GPERF"; then
-    GPERF='$(top_srcdir)/missing gperf'
-    warn_gperf="I didn't find gperf, but it's only a problem if you need to reconstruct oct-gperf.h"
-    AC_MSG_WARN($warn_gperf)
-  fi
-  AC_SUBST(GPERF)
-])
-dnl
-dnl Is ghostscript installed?
-dnl
-dnl OCTAVE_PROG_GHOSTSCRIPT
-AC_DEFUN([OCTAVE_PROG_GHOSTSCRIPT], [
-  case "$canonical_host_type" in
-    *-*-cygwin* | *-*-mingw32* | *-*-msdosmsvc)
-      gs_names="gs gswin32"
-    ;;
-    *)
-      gs_names=gs
-    ;;
-  esac
-  AC_CHECK_PROGS(GHOSTSCRIPT, $gs_names)
-  if test -z "$GHOSTSCRIPT"; then
-    GHOSTSCRIPT='$(top_srcdir)/missing gs'
-    warn_ghostscript="I didn't find ghostscript, but it's only a problem if you need to reconstruct figures for the manual"
-    AC_MSG_WARN($warn_ghostscript)
-  fi
-  AC_SUBST(GHOSTSCRIPT)
-])
-dnl
-dnl Is makeinfo installed?
-dnl
-dnl OCTAVE_PROG_MAKEINFO
-AC_DEFUN([OCTAVE_PROG_MAKEINFO], [
-  AC_CHECK_PROG(MAKEINFO, makeinfo, makeinfo, [])
-  if test -z "$MAKEINFO"; then
-    MAKEINFO='$(top_srcdir)/missing makeinfo'
-    warn_makeinfo="I didn't find makeinfo, but it's only a problem if you need to reconstruct the Info version of the manual"
-    AC_MSG_WARN($warn_makeinfo)
-  fi
-  AC_SUBST(MAKEINFO)
-])
-dnl
-dnl Is texi2dvi installed?
-dnl
-dnl OCTAVE_PROG_TEXI2DVI
-AC_DEFUN([OCTAVE_PROG_TEXI2DVI], [
-  AC_CHECK_PROG(TEXI2DVI, texi2dvi, texi2dvi, [])
-  if test -z "$TEXI2DVI"; then
-    TEXI2DVI='$(top_srcdir)/missing texi2dvi'
-    warn_texi2dvi="I didn't find texi2dvi, but it's only a problem if you need to reconstruct the DVI version of the manual"
-    AC_MSG_WARN($warn_texi2dvi)
-  fi
-  AC_SUBST(TEXI2DVI)
-])
-dnl
-dnl Is texi2pdf installed?
-dnl
-dnl OCTAVE_PROG_TEXI2PDF
-AC_DEFUN([OCTAVE_PROG_TEXI2PDF], [
-  AC_REQUIRE([OCTAVE_PROG_TEXI2DVI])
-  AC_CHECK_PROG(TEXI2PDF, texi2pdf, texi2pdf, [])
-  if test -z "$TEXI2PDF"; then
-    missing=true;
-    if test -n "$TEXI2DVI"; then
-      TEXI2PDF="$TEXI2DVI --pdf"
-      missing=false;
-    fi
-  else
-    missing=false;
-  fi
-  if $missing; then
-    TEXI2PDF='$(top_srcdir)/missing texi2pdf'
-    warn_texi2pdf="I didn't find texi2pdf, but it's only a problem if you need to reconstruct the PDF version of the manual"
-    AC_MSG_WARN($warn_texi2pdf)
-  fi
-  AC_SUBST(TEXI2PDF)
-])
-dnl
-dnl See if the C++ library is ISO compliant.
-dnl FIXME: This is obviously very simplistic, and trivially fooled.
-dnl
-dnl OCTAVE_CXX_ISO_COMPLIANT_LIBRARY
-AC_DEFUN([OCTAVE_CXX_ISO_COMPLIANT_LIBRARY], [
-  AC_REQUIRE([AC_PROG_CXX])
-  AC_MSG_CHECKING([if C++ library is ISO compliant])
-  AC_CACHE_VAL(octave_cv_cxx_iso_compliant_library, [
-    AC_LANG_PUSH(C++)
-    rm -f conftest.h
-### Omitting cwctype for now, since it is broken with gcc-3.0.x and
-### possibly other versions...
-    for inc in algorithm bitset cassert cctype cerrno cfloat ciso646 \
-	climits clocale cmath complex csetjmp csignal cstdarg cstddef \
-	cstdio cstdlib cstring ctime cwchar deque exception \
-	fstream functional iomanip ios iosfwd iostream istream iterator \
-	limits list locale map memory new numeric ostream queue set \
-	sstream stack stdexcept streambuf string strstream typeinfo \
-	utility valarray vector; do
-      echo "#include <$inc>" >> conftest.h
-    done
-    AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include "conftest.h"]],
-      [[std::bitset<50> flags;
-        flags.set();
-        int digits = std::numeric_limits<unsigned long>::digits;
-        digits = 0;]])],
-      [octave_cv_cxx_iso_compliant_library=yes],
-      [octave_cv_cxx_iso_compliant_library=no])
-    AC_LANG_POP(C++)
-  ])
-  AC_MSG_RESULT($octave_cv_cxx_iso_compliant_library)
-  if test $octave_cv_cxx_iso_compliant_library = yes; then
-    AC_DEFINE(CXX_ISO_COMPLIANT_LIBRARY, 1, [Define if your C++ runtime library is ISO compliant.])
-  fi
-])
-dnl
-dnl Allow the user disable support for command line editing using GNU
-dnl readline.
-dnl
-dnl OCTAVE_ENABLE_READLINE
-AC_DEFUN([OCTAVE_ENABLE_READLINE], [
-  USE_READLINE=true
-  READLINE_LIBS=
-  AC_ARG_ENABLE(readline,
-    [  --enable-readline       use readline library (default is yes)],
-    [if test "$enableval" = no; then
-       USE_READLINE=false
-       warn_readline="command editing and history features require GNU Readline"
-     fi])
-  if $USE_READLINE; then
-    save_LIBS="$LIBS"
-    LIBS="$TERM_LIBS"
-    AC_CHECK_LIB(readline, rl_set_keyboard_input_timeout, [
-      READLINE_LIBS="-lreadline"
-      AC_DEFINE(USE_READLINE, 1, [Define to use the readline library.])
-    ], [
-      AC_MSG_WARN([I need GNU Readline 4.2 or later])
-      AC_MSG_ERROR([this is fatal unless you specify --disable-readline])
-    ])
-    LIBS="$save_LIBS"
-  fi
-  AC_SUBST(READLINE_LIBS)
-])
-dnl
-dnl Check to see if C++ reintrepret cast works for function pointers.
-dnl
-dnl OCTAVE_CXX_BROKEN_REINTERPRET_CAST
-dnl
-AC_DEFUN([OCTAVE_CXX_BROKEN_REINTERPRET_CAST], [
-  AC_REQUIRE([AC_PROG_CXX])
-  AC_LANG_PUSH(C++)
-  AC_CACHE_CHECK([for broken C++ reinterpret_cast],
-    octave_cv_cxx_broken_reinterpret_cast, [
-    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <cmath>]], [[
-      typedef double (*fptr) (double);
-      fptr psin = sin;
-      void *vptr = reinterpret_cast<void *> (psin);
-      psin = reinterpret_cast<fptr> (vptr);]])],
-      octave_cv_cxx_broken_reinterpret_cast=no,
-      octave_cv_cxx_broken_reinterpret_cast=yes)])
-  if test $octave_cv_cxx_broken_reinterpret_cast = yes ; then
-    AC_DEFINE(CXX_BROKEN_REINTERPRET_CAST, 1, [Define if C++ reinterpret_cast fails for function pointers.])
-fi
-  AC_LANG_POP(C++)])
-dnl
-dnl Determine if mkdir accepts only one argument instead dnl of the usual 2.
-dnl
-AC_DEFUN([OCTAVE_MKDIR_TAKES_ONE_ARG], [
-AC_LANG_PUSH(C++)
-AC_CACHE_CHECK([if mkdir takes one argument], octave_cv_mkdir_takes_one_arg,
-[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
-#ifdef HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-#ifdef HAVE_DIRECT_H
-# include <direct.h>
-#endif]], [[mkdir ("foo", 0);]])],
-        octave_cv_mkdir_takes_one_arg=no, octave_cv_mkdir_takes_one_arg=yes)])
-AC_LANG_POP(C++)
-if test $octave_cv_mkdir_takes_one_arg = yes ; then
-  AC_DEFINE(MKDIR_TAKES_ONE_ARG, 1, [Define if host mkdir takes a single argument.])
-fi
-])
-dnl
-dnl Find find.
-dnl
-# Prefer GNU find if found.
-AN_MAKEVAR([FIND],  [OCTAVE_PROG_FIND])
-AN_PROGRAM([gfind], [OCTAVE_PROG_FIND])
-AN_PROGRAM([find],  [OCTAVE_PROG_FIND])
-AC_DEFUN([OCTAVE_PROG_FIND],
-[AC_CHECK_PROGS(FIND, gfind find, )])
-dnl
-dnl Find sed.
-dnl
-# Check for a fully-functional sed program, that truncates
-# as few characters as possible and that supports "\(X\|Y\)"
-# style regular expression alternation.  Prefer GNU sed if found.
-AC_DEFUN([OCTAVE_PROG_SED],
-[AC_MSG_CHECKING([for a usable sed])
-if test -z "$SED"; then
-  AC_CACHE_VAL(ac_cv_path_sed, [
-  # Loop through the user's path and test for sed and gsed.
-  # Then use that list of sed's as ones to test for truncation.
-  _AS_PATH_WALK([$PATH],
-    [for ac_prog in sed gsed; do
-      for ac_exec_ext in '' $ac_executable_extensions; do
-	if AS_EXECUTABLE_P(["$as_dir/$ac_prog$ac_exec_ext"]); then
-	  _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
-	fi
-      done
-    done
-    ])
-    AS_TMPDIR(sed)
-    _max=0
-    _count=0
-    # Add /usr/xpg4/bin/sed as it is typically found on Solaris
-    # along with /bin/sed that truncates output.
-    for _sed in $_sed_list /usr/xpg4/bin/sed; do
-      test ! -f ${_sed} && break
-      cat /dev/null > "$tmp/sed.in"
-      _count=0
-      echo $ECHO_N "0123456789$ECHO_C" >"$tmp/sed.in"
-      # Check for GNU sed and select it if it is found.
-      if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
-	octave_cv_path_sed=${_sed}
-	break;
-      fi
-      # Reject if RE alternation is not handled.
-      if test "`echo 'this and that' | ${_sed} -n 's/\(this\|that\).*$/\1/p'`" != "this"; then
-        continue;
-      fi
-      while true; do
-	cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
-	mv "$tmp/sed.tmp" "$tmp/sed.in"
-	cp "$tmp/sed.in" "$tmp/sed.nl"
-	echo >>"$tmp/sed.nl"
-	${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
-	cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
-	# 10000 chars as input seems more than enough
-	test $_count -gt 10 && break
-	_count=`expr $_count + 1`
-	if test $_count -gt $_max; then
-	  _max=$_count
-	  octave_cv_path_sed=$_sed
-	fi
-      done
-    done
-    rm -rf "$tmp"
-  ])
-  SED=$octave_cv_path_sed
-  if test -z "$SED"; then
-    AC_MSG_ERROR([no usable version of sed found])
-  fi
-fi
-AC_SUBST(SED)
-AC_MSG_RESULT([$SED])
-])
-dnl
-dnl Find Perl.
-dnl
-dnl OCTAVE_PROG_PERL
-AC_DEFUN([OCTAVE_PROG_PERL],
-[AC_CHECK_PROG(PERL, perl, perl, [])
-  AC_SUBST(PERL)
-])
-dnl
-dnl Find Python.
-dnl
-dnl OCTAVE_PROG_PYTHON
-AC_DEFUN([OCTAVE_PROG_PYTHON],
-[AC_CHECK_PROG(PYTHON, python, python, [])
-  AC_SUBST(PYTHON)
-])
-dnl
-dnl Find desktop-file-install.
-dnl
-dnl OCTAVE_PROG_DESKTOP_FILE_INSTALL
-AC_DEFUN([OCTAVE_PROG_DESKTOP_FILE_INSTALL],
-[AC_CHECK_PROG(DESKTOP_FILE_INSTALL, desktop-file-install, desktop-file-install, [])
-  AC_SUBST(DESKTOP_FILE_INSTALL)
-])
-dnl
-dnl Check for IEEE 754 data format.
-dnl
-AC_DEFUN([OCTAVE_IEEE754_DATA_FORMAT],
-[AC_MSG_CHECKING([for IEEE 754 data format])
-AC_CACHE_VAL(octave_cv_ieee754_data_format,
-[AC_RUN_IFELSE([AC_LANG_SOURCE([[
-int
-main (void) 
-{
-  typedef union { unsigned char c[8]; double d; } ieeebytes;
-   
-  ieeebytes l = {0x1c, 0xbc, 0x6e, 0xf2, 0x54, 0x8b, 0x11, 0x43};
-  ieeebytes b = {0x43, 0x11, 0x8b, 0x54, 0xf2, 0x6e, 0xbc, 0x1c};
-
-  return l.d != 1234567891234567.0 && b.d != 1234567891234567.0;
-}]])],
-  octave_cv_ieee754_data_format=yes,
-  octave_cv_ieee754_data_format=no,
-  octave_cv_ieee754_data_format=no)])
-if test "$cross_compiling" = yes; then
-  AC_MSG_RESULT([$octave_cv_ieee754_data_format assumed for cross compilation])
-else
-  AC_MSG_RESULT($octave_cv_ieee754_data_format)
-fi
-if test "$octave_cv_ieee754_data_format" = yes; then
-  AC_DEFINE(HAVE_IEEE754_DATA_FORMAT, 1, [Define if your system uses IEEE 754 data format.])
-fi
-])
-dnl
-dnl Check for UMFPACK seperately split complex matrix and RHS. Note
-dnl that as umfpack.h can be in three different places, rather than
-dnl include it, just declare the functions needed.
-dnl
-dnl Assumes that the check for umfpack has already been performed.
-dnl
-AC_DEFUN([OCTAVE_UMFPACK_SEPERATE_SPLIT],
-[AC_MSG_CHECKING([for UMFPACK seperate complex matrix and rhs split])
-AC_CACHE_VAL(octave_cv_umfpack_seperate_split,
-[AC_RUN_IFELSE([AC_LANG_SOURCE([[
-#include <stdlib.h>
-#if defined (HAVE_UFSPARSE_UMFPACK_h)
-#include <ufsparse/umfpack.h>
-#elif defined (HAVE_UMFPACK_UMFPACK_H)
-#include <umfpack/umfpack.h>
-#elif defined (HAVE_UMFPACK_H)
-#include <umfpack.h>
-#endif
-int n = 5;
-int Ap[] = {0, 2, 5, 9, 10, 12};
-int Ai[]  = {0, 1, 0, 2, 4, 1, 2, 3, 4, 2, 1, 4};
-double Ax[] = {2., 0., 3., 0., 3., 0., -1., 0., 4., 0., 4., 0., 
-	      -3., 0., 1., 0., 2., 0., 2., 0., 6., 0., 1., 0.};
-double br[] = {8., 45., -3., 3., 19.};
-double bi[] = {0., 0., 0., 0., 0.};
-int main (void)
-{
-  double *null = (double *) NULL ;
-  double *x = (double *)malloc (2 * n * sizeof(double));
-  int i ;
-  void *Symbolic, *Numeric ;
-  (void) umfpack_zi_symbolic (n, n, Ap, Ai, Ax, null, &Symbolic, null, null) ;
-  (void) umfpack_zi_numeric (Ap, Ai, Ax, null, Symbolic, &Numeric, null, null) ;
-  umfpack_zi_free_symbolic (&Symbolic) ;
-  (void) umfpack_zi_solve (0, Ap, Ai, Ax, null, x, null, br, bi, 
-		Numeric, null, null) ;
-  umfpack_zi_free_numeric (&Numeric) ;
-  for (i = 0; i < n; i++, x+=2) 
-    if (fabs(*x - i - 1.) > 1.e-13)
-      return (1);
-  return (0) ;
-}
-]])],
-  octave_cv_umfpack_seperate_split=yes,
-  octave_cv_umfpack_seperate_split=no,
-  octave_cv_umfpack_seperate_split=no)])
-if test "$cross_compiling" = yes; then
-  AC_MSG_RESULT([$octave_cv_umfpack_seperate_split assumed for cross compilation])
-else
-  AC_MSG_RESULT($octave_cv_umfpack_seperate_split)
-fi
-if test "$octave_cv_umfpack_seperate_split" = yes; then
-  AC_DEFINE(UMFPACK_SEPARATE_SPLIT, 1, [Define if the UMFPACK Complex solver allow matrix and RHS to be split independently])
-fi
-])
-dnl
-dnl Check whether using HDF5 DLL under Windows. This is done by
-dnl testing for a data symbol in the HDF5 library, which would
-dnl requires the definition of _HDF5USEDL_ under MSVC compiler.
-dnl
-AC_DEFUN([OCTAVE_HDF5_DLL], [
-  AC_CACHE_CHECK([if _HDF5USEDLL_ needs to be defined],octave_cv_hdf5_dll, [
-    AC_TRY_LINK([#include <hdf5.h>], [hid_t x = H5T_NATIVE_DOUBLE; return x],
-      octave_cv_hdf5_dll=no, [
-      save_CFLAGS="$CFLAGS"
-      CFLAGS="$CFLAGS -DWIN32 -D_HDF5USEDLL_"
-      save_LIBS="$LIBS"
-      LIBS="$HDF5_LIBS $LIBS"
-      AC_TRY_LINK([#include <hdf5.h>], [hid_t x = H5T_NATIVE_DOUBLE; return x],
-        octave_cv_hdf5_dll=yes,
-	octave_cv_hdf5_dll=no)
-      CFLAGS="$save_CFLAGS"
-      LIBS="$save_LIBS"])])
-  if test "$octave_cv_hdf5_dll" = yes; then
-    AC_DEFINE(_HDF5USEDLL_, 1, [Define if using HDF5 dll (Win32)])
-  fi])
-dnl
-dnl Check whether HDF5 library has version 1.6 API functions.
-dnl
-AC_DEFUN([OCTAVE_HDF5_HAS_REQUIRED_API], [
-  AC_CACHE_CHECK([whether HDF5 library has required API],
-    octave_cv_hdf5_has_required_api, [
-    AC_TRY_LINK([
-#define H5_USE_16_API 1
-#include <hdf5.h>
-], [
-  H5Eset_auto (0, 0);], [
-      octave_cv_hdf5_has_required_api=yes], [
-      octave_cv_hdf5_has_required_api=no])])
-  if test "$octave_cv_hdf5_has_required_api" = "no"; then
-    octave_hdf5_ok=no
-    warn_hdf5="HDF5 library does not provide the version 1.6 API.  Octave will not be able to save or load HDF5 data files."
-    AC_MSG_WARN($warn_hdf5)
-  fi
-])
-dnl
-dnl Check for the QHull version.
-dnl
-AC_DEFUN([OCTAVE_CHECK_QHULL_VERSION],
-  [AC_CACHE_CHECK([for qh_version in $QHULL_LIBS],
-    octave_cv_lib_qhull_version,  [
-      AC_LINK_IFELSE([AC_LANG_PROGRAM([[
-#include <qhull/qhull_a.h>
-]], [[
-const char *tmp = qh_version;
-]])], [octave_cv_lib_qhull_version=yes], [octave_cv_lib_qhull_version=no])])
-  if test "$octave_cv_lib_qhull_version" = no; then
-    AC_DEFINE(NEED_QHULL_VERSION, 1,
-      [Define if the QHull library needs a qh_version variable defined.])
-  fi
-])
-dnl
-dnl Check whether QHull works (does not crash)
-dnl
-AC_DEFUN([OCTAVE_CHECK_QHULL_OK],
-  [AC_CACHE_CHECK([whether the qhull library works],
-    octave_cv_lib_qhull_ok, [
-      AC_RUN_IFELSE([AC_LANG_PROGRAM([[
-#include <stdio.h>
-#include <qhull/qhull.h>
-#ifdef NEED_QHULL_VERSION
-char *qh_version = "version";
-#endif
-]], [[
-int dim = 2;
-int n = 4;
-coordT points[8] = { -0.5, -0.5, -0.5, 0.5, 0.5, -0.5, 0.5, 0.5 };
-boolT ismalloc = 0;
-return qh_new_qhull (dim, n, points, ismalloc, "qhull ", 0, stderr); 
-]])], [octave_cv_lib_qhull_ok=yes], [octave_cv_lib_qhull_ok=no])])
-  if test "$octave_cv_lib_qhull_ok" = "yes"; then
-    $1
-  else
-    $2
-  fi
-])
-dnl
-dnl Check for OpenGL. If found, define OPENGL_LIBS
-dnl
-AC_DEFUN([OCTAVE_OPENGL], [
-OPENGL_LIBS=
-
-### On MacOSX systems the OpenGL framework can be used
-OCTAVE_HAVE_FRAMEWORK(OpenGL, [
-#include <OpenGL/gl.h>
-#include <OpenGL/glu.h> ], [GLint par; glGetIntegerv (GL_VIEWPORT, &par);],
-  [have_framework_opengl="yes"], [have_framework_opengl="no"])
-
-if test $have_framework_opengl = "yes"; then
-  AC_DEFINE(HAVE_FRAMEWORK_OPENGL, 1, [Define if framework OPENGL is available.])
-  OPENGL_LIBS="-Wl,-framework -Wl,OpenGL"
-  AC_MSG_NOTICE([adding -Wl,-framework -Wl,OpenGL to OPENGL_LIBS])
-  OCTAVE_GLUTESSCALLBACK_THREEDOTS
-else
-  case $canonical_host_type in
-    *-*-mingw32* | *-*-msdosmsvc)
-      AC_CHECK_HEADERS(windows.h)
-    ;;
-  esac
-  have_opengl_incs=no
-  AC_CHECK_HEADERS([GL/gl.h OpenGL/gl.h], [
-    AC_CHECK_HEADERS([GL/glu.h OpenGL/glu.h], [
-      have_opengl_incs=yes; break], [], [
-#ifdef HAVE_WINDOWS_H
-#include <windows.h>
-#endif
-    ])
-    break
-    ], [], [
-#ifdef HAVE_WINDOWS_H
-#include <windows.h>
-#endif
-    ])
-
-  if test "$have_opengl_incs" = "yes"; then
-    case $canonical_host_type in
-      *-*-mingw32* | *-*-msdosmsvc)
-        save_LIBS="$LIBS"
-        LIBS="$LIBS -lopengl32"
-        AC_MSG_CHECKING([for glEnable in -lopengl32])
-        AC_TRY_LINK([
-#if HAVE_WINDOWS_H
-#include <windows.h>
-#endif
-#if defined (HAVE_GL_GL_H)
-#include <GL/gl.h>
-#elif defined (HAVE_OPENGL_GL_H)
-#include <OpenGL/gl.h>
-#endif
-], [glEnable(GL_SMOOTH);], OPENGL_LIBS="-lopengl32 -lglu32")
-        LIBS="$save_LIBS"
-        if test "x$OPENGL_LIBS" != "x"; then
-          AC_MSG_RESULT(yes)
-        else
-          AC_MSG_RESULT(no)
-        fi
-        ;;
-      *)
-        save_LDFLAGS="$LDFLAGS"
-        LDFLAGS="$LDFLAGS -L/usr/X11R6/lib"
-        AC_CHECK_LIB(GL, glEnable, OPENGL_LIBS="-L/usr/X11R6/lib -lGL -lGLU")
-        LDFLAGS="$save_LDFLAGS"
-        ;;
-    esac
-  fi
-fi
-AC_SUBST(OPENGL_LIBS)
-])
-dnl
-dnl See if function gluTessCallback is called with "(...)"
-dnl
-dnl OCTAVE_GLUTESSCALLBACK_THREEDOTS
-AC_DEFUN([OCTAVE_GLUTESSCALLBACK_THREEDOTS],
-[AC_CACHE_CHECK([whether gluTessCallback is called with "(...)"],
-octave_cv_glutesscallback_threedots,
-[AC_LANG_PUSH(C++)
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-#ifdef HAVE_GL_GLU_H
-#include <GL/glu.h>
-#elif defined HAVE_OPENGL_GLU_H || defined HAVE_FRAMEWORK_OPENGL
-#include <OpenGL/glu.h>
-#endif]],
-[[GLvoid (*func)(...); gluTessCallback(0, 0, func);]])],
-octave_cv_glutesscallback_threedots="yes", octave_cv_glutesscallback_threedots="no")])
-AC_LANG_POP(C++)
-if test $octave_cv_glutesscallback_threedots = "yes"; then
-  AC_DEFINE(HAVE_GLUTESSCALLBACK_THREEDOTS, 1, 
-    [Define if gluTessCallback is called with (...)])
-fi
-])
-dnl
-dnl Configure paths for FreeType2
-dnl Marcelo Magallon 2001-10-26, based on gtk.m4 by Owen Taylor
-dnl
-dnl Copyright 2001, 2003 by
-dnl David Turner, Robert Wilhelm, and Werner Lemberg.
-dnl
-dnl This file is part of the FreeType project, and may only be used, modified,
-dnl and distributed under the terms of the FreeType project license,
-dnl LICENSE.TXT.  By continuing to use, modify, or distribute this file you
-dnl indicate that you have read the license and understand and accept it
-dnl fully.
-dnl
-dnl As a special exception to the FreeType project license, this file may be
-dnl distributed as part of a program that contains a configuration script
-dnl generated by Autoconf, under the same distribution terms as the rest of
-dnl that program.
-dnl
-dnl serial 2
-dnl
-dnl AC_CHECK_FT2([MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
-dnl Test for FreeType 2, and define FT2_CFLAGS and FT2_LIBS.
-dnl MINIMUM-VERSION is what libtool reports; the default is `7.0.1' (this is
-dnl FreeType 2.0.4).
-dnl
-AC_DEFUN([AC_CHECK_FT2],
-  [dnl Get the cflags and libraries from the freetype-config script
-   dnl
-   AC_ARG_WITH([ft-prefix],
-     dnl don't quote AS_HELP_STRING!
-     AS_HELP_STRING([--with-ft-prefix=PREFIX],
-                    [Prefix where FreeType is installed (optional)]),
-     [ft_config_prefix="$withval"],
-     [ft_config_prefix=""])
-  
-   AC_ARG_WITH([ft-exec-prefix],
-     dnl don't quote AS_HELP_STRING!
-     AS_HELP_STRING([--with-ft-exec-prefix=PREFIX],
-                    [Exec prefix where FreeType is installed (optional)]),
-     [ft_config_exec_prefix="$withval"],
-     [ft_config_exec_prefix=""])
-
-   AC_ARG_ENABLE([freetypetest],
-     dnl don't quote AS_HELP_STRING!
-     AS_HELP_STRING([--disable-freetypetest],
-                    [Do not try to compile and run a test FreeType program]),
-     [],
-     [enable_fttest=yes])
-
-   if test x$ft_config_exec_prefix != x ; then
-     ft_config_args="$ft_config_args --exec-prefix=$ft_config_exec_prefix"
-     if test x${FT2_CONFIG+set} != xset ; then
-       FT2_CONFIG=$ft_config_exec_prefix/bin/freetype-config
-     fi
-   fi
-
-   if test x$ft_config_prefix != x ; then
-     ft_config_args="$ft_config_args --prefix=$ft_config_prefix"
-     if test x${FT2_CONFIG+set} != xset ; then
-       FT2_CONFIG=$ft_config_prefix/bin/freetype-config
-     fi
-   fi
-
-   AC_PATH_PROG([FT2_CONFIG], [freetype-config], [no])
-
-   min_ft_version=m4_if([$1], [], [7.0.1], [$1])
-   AC_MSG_CHECKING([for FreeType -- version >= $min_ft_version])
-   no_ft=""
-   if test "$FT2_CONFIG" = "no" ; then
-     no_ft=yes
-   else
-     FT2_CFLAGS=`$FT2_CONFIG $ft_config_args --cflags`
-     FT2_LIBS=`$FT2_CONFIG $ft_config_args --libs`
-     ft_config_major_version=`$FT2_CONFIG $ft_config_args --version | \
-       sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
-     ft_config_minor_version=`$FT2_CONFIG $ft_config_args --version | \
-       sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
-     ft_config_micro_version=`$FT2_CONFIG $ft_config_args --version | \
-       sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
-     ft_min_major_version=`echo $min_ft_version | \
-       sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
-     ft_min_minor_version=`echo $min_ft_version | \
-       sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
-     ft_min_micro_version=`echo $min_ft_version | \
-       sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
-     if test x$enable_fttest = xyes ; then
-       ft_config_is_lt=""
-       if test $ft_config_major_version -lt $ft_min_major_version ; then
-         ft_config_is_lt=yes
-       else
-         if test $ft_config_major_version -eq $ft_min_major_version ; then
-           if test $ft_config_minor_version -lt $ft_min_minor_version ; then
-             ft_config_is_lt=yes
-           else
-            if test $ft_config_minor_version -eq $ft_min_minor_version ; then
-               if test $ft_config_micro_version -lt $ft_min_micro_version ; then
-                 ft_config_is_lt=yes
-               fi
-             fi
-           fi
-         fi
-       fi
-       if test x$ft_config_is_lt = xyes ; then
-         no_ft=yes
-       else
-         ac_save_CFLAGS="$CFLAGS"
-         ac_save_LIBS="$LIBS"
-         CFLAGS="$CFLAGS $FT2_CFLAGS"
-         LIBS="$FT2_LIBS $LIBS"
-
-         dnl
-         dnl Sanity checks for the results of freetype-config to some extent.
-         dnl
-         AC_RUN_IFELSE([
-             AC_LANG_SOURCE([[
-
-#include <ft2build.h>
-#include FT_FREETYPE_H
-#include <stdio.h>
-#include <stdlib.h>
-
-int
-main()
-{
-  FT_Library library;
-  FT_Error  error;
-
-  error = FT_Init_FreeType(&library);
-
-  if (error)
-    return 1;
-  else
-  {
-    FT_Done_FreeType(library);
-    return 0;
-  }
-}
-
-             ]])
-           ],
-           [],
-           [no_ft=yes],
-           [echo $ECHO_N "cross compiling; assuming OK... $ECHO_C"])
-
-         CFLAGS="$ac_save_CFLAGS"
-         LIBS="$ac_save_LIBS"
-       fi             dnl test $ft_config_version -lt $ft_min_version
-     fi               dnl test x$enable_fttest = xyes
-   fi                 dnl test "$FT2_CONFIG" = "no"
-
-   if test x$no_ft = x ; then
-     AC_MSG_RESULT([yes])
-     m4_if([$2], [], [:], [$2])
-   else
-     AC_MSG_RESULT([no])
-     if test "$FT2_CONFIG" = "no" ; then
-       AC_MSG_WARN([
-
-  The freetype-config script installed by FreeType 2 could not be found.
-  If FreeType 2 was installed in PREFIX, make sure PREFIX/bin is in
-  your path, or set the FT2_CONFIG environment variable to the
-  full path to freetype-config.
-       ])
-     else
-       if test x$ft_config_is_lt = xyes ; then
-         AC_MSG_WARN([
-
-  Your installed version of the FreeType 2 library is too old.
-  If you have different versions of FreeType 2, make sure that
-  correct values for --with-ft-prefix or --with-ft-exec-prefix
-  are used, or set the FT2_CONFIG environment variable to the
-  full path to freetype-config.
-         ])
-       else
-         AC_MSG_WARN([
-
-  The FreeType test program failed to run.  If your system uses
-  shared libraries and they are installed outside the normal
-  system library path, make sure the variable LD_LIBRARY_PATH
-  (or whatever is appropiate for your system) is correctly set.
-         ])
-       fi
-     fi
-
-     FT2_CFLAGS=""
-     FT2_LIBS=""
-     m4_if([$3], [], [:], [$3])
-   fi
-
-   AC_SUBST([FT2_CFLAGS])
-   AC_SUBST([FT2_LIBS])])
-dnl end of freetype2.m4
-
-dnl Check whether a math mapper function is available in <cmath>.
-dnl Will define HAVE_CMATH_FUNC if there is a double variant and
-dnl HAVE_CMATH_FUNCF if there is a float variant.
-dnl Currently capable of checking for functions with single 
-dnl argument and returning bool/int/real.
-AC_DEFUN([OCTAVE_CMATH_FUNC],[
-AC_MSG_CHECKING([for std::$1 in <cmath>])
-AC_LANG_PUSH(C++)
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-#include <cmath>
-void take_func (bool (*func) (double x));
-void take_func (int (*func) (double x));
-void take_func (double (*func) (double x));
-]],
-[[
-take_func(std::$1);
-]])],
-[AC_MSG_RESULT([yes])
- AC_DEFINE(HAVE_CMATH_[]AS_TR_CPP($1),1,[Define if <cmath> provides $1])],
-[AC_MSG_RESULT([no])])
-AC_MSG_CHECKING([for std::$1 (float variant) in <cmath>])
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-#include <cmath>
-void take_func (bool (*func) (float x));
-void take_func (int (*func) (float x));
-void take_func (float (*func) (float x));
-]],
-[[
-take_func(std::$1);
-]])],
-[AC_MSG_RESULT([yes])
- AC_DEFINE(HAVE_CMATH_[]AS_TR_CPP($1)F,1,[Define if <cmath> provides float variant of $1])],
-[AC_MSG_RESULT([no])])
-AC_LANG_POP(C++)
-])
-
-dnl Check whether fast signed integer arithmetics using bit tricks
-dnl can be used in oct-inttypes.h. Defines HAVE_FAST_INT_OPS if
-dnl the following conditions hold:
-dnl 1. Signed numbers are represented by twos complement
-dnl    (see <http://en.wikipedia.org/wiki/Two%27s_complement>)
-dnl 2. static_cast to unsigned int counterpart works like interpreting
-dnl    the signed bit pattern as unsigned (and is thus zero-cost).
-dnl 3. Signed addition and subtraction yield the same bit results as unsigned.
-dnl    (We use casts to prevent optimization interference, so there is no
-dnl     need for things like -ftrapv).
-dnl 4. Bit operations on signed integers work like on unsigned integers,
-dnl    except for the shifts. Shifts are arithmetic.
-dnl
-AC_DEFUN([OCTAVE_FAST_INT_OPS],[
-AC_MSG_CHECKING([whether fast integer arithmetics is usable])
-AC_LANG_PUSH(C++)
-AC_RUN_IFELSE([AC_LANG_PROGRAM([[
-#include <limits>
-template<class UT, class ST>
-static bool 
-do_test (UT, ST)
-{
-  volatile ST s = std::numeric_limits<ST>::min () / 3;
-  volatile UT u = static_cast<UT> (s);
-  if (*(reinterpret_cast<volatile ST *> (&u)) != s) return true;
-  
-  u = 0; u = ~u;
-  if (*(reinterpret_cast<volatile ST *> (&u)) != -1) return true;
-  
-  ST sx, sy;
-  sx = std::numeric_limits<ST>::max () / 2 + 1;
-  sy = std::numeric_limits<ST>::max () / 2 + 2;
-  if (static_cast<ST> (static_cast<UT> (sx) + static_cast<UT> (sy))
-      != std::numeric_limits<ST>::min () + 1) return true;
-  if (static_cast<ST> (static_cast<UT> (sx) - static_cast<UT> (sy))
-      != -1) return true;
-  
-  if ((sx & sy) != (static_cast<UT> (sx) & static_cast<UT> (sy)))
-    return true;
-  if ((sx | sy) != (static_cast<UT> (sx) | static_cast<UT> (sy)))
-    return true;
-  if ((sx ^ sy) != (static_cast<UT> (sx) ^ static_cast<UT> (sy)))
-    return true;
-  if ((-1 >> 1) != -1) return true;
-  return false;
-}
-
-#define DO_TEST(T) \
-if (do_test (static_cast<unsigned T> (0), static_cast<signed T> (0))) \
-  return sizeof (T);
-]],[[
-  DO_TEST(char)
-  DO_TEST(short)
-  DO_TEST(int)
-  DO_TEST(long)
-#if (defined(HAVE_LONG_LONG_INT) && defined(HAVE_UNSIGNED_LONG_LONG_INT))
-  DO_TEST(long long)
-#endif
-]])],
-[AC_MSG_RESULT([yes])
- AC_DEFINE(HAVE_FAST_INT_OPS,1,[Define if signed integers use two's complement])],
-[AC_MSG_RESULT([no])])
-AC_LANG_POP(C++)])
-dnl
-dnl Check to see if the compiler and the linker can handle the flags
-dnl "-framework $1" for the given prologue $2 and the given body $3 of
-dnl a source file.  Arguments 2 and 3 optionally can also be empty.
-dnl Add options (lower case letters $1) "--with-framework-$1" and
-dnl "--without-framework-$1". If this test is successful then perform
-dnl $4, otherwise do $5.
-dnl
-dnl OCTAVE_HAVE_FRAMEWORK
-AC_DEFUN([OCTAVE_HAVE_FRAMEWORK], [
-  AC_MSG_CHECKING(whether ${LD-ld} accepts -framework $1)
-  AC_CACHE_VAL(octave_cv_framework_$1, [
-    XLDFLAGS="$LDFLAGS"
-    LDFLAGS="$LDFLAGS -framework $1"
-    AC_LANG_PUSH(C++)
-    AC_LINK_IFELSE([AC_LANG_PROGRAM([$2], [$3])],
-      eval "octave_cv_framework_$1=yes",
-      eval "octave_cv_framework_$1=no")
-    AC_LANG_POP(C++)
-    LDFLAGS="$XLDFLAGS"
-  ])
-  if test "$octave_cv_framework_$1" = "yes"; then
-    AC_MSG_RESULT(yes)
-    AC_ARG_WITH(framework-m4_tolower($1),
-      [AS_HELP_STRING([--without-framework-m4_tolower($1)], 
-        [don't use framework $1])],
-         with_have_framework=$withval, with_have_framework="yes")
-    if test "$with_have_framework" = "yes"; then
-      [$4]
-    else
-      AC_MSG_NOTICE([framework rejected by --without-framework-m4_tolower($1)])
-      [$5]
-    fi
-  else
-    AC_MSG_RESULT(no)
-    [$5]
-  fi
-])
-dnl
-dnl Do we have a working c99 vsnprintf function?
-dnl
-dnl OCTAVE_HAVE_C99_VSNPRINTF
-AC_DEFUN([OCTAVE_HAVE_C99_VSNPRINTF], [
-  AC_CACHE_CHECK([for c99 vsnprintf], [oct_cv_c99_vsnprintf],
-    [AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>
-#include <stdarg.h>
-#include <stdlib.h>
-
-int
-doit(char * s, ...)
-{
-  char buffer[32];
-  va_list args;
-  int r;
-
-  va_start(args, s);
-  r = vsnprintf(buffer, 5, s, args);
-  va_end(args);
-
-  if (r != 7)
-    exit(1);
-
-  exit(0);
-}
-  ]],[
-doit("1234567");])],
-  [oct_cv_c99_vsnprintf=yes],
-  [oct_cv_c99_vsnprintf=no],
-  [oct_cv_c99_vsnprintf="guessing no"])])
-
-case $oct_cv_c99_vsnprintf in
-yes)
-    AC_DEFINE([HAVE_C99_VSNPRINTF], [1], [Define if you have a c99 vsnprintf])
-  ;;
-esac
-])
-
-##############################################################################
-##############################################################################
-
-# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
-# 
-# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# PKG_PROG_PKG_CONFIG([MIN-VERSION])
-# ----------------------------------
-AC_DEFUN([PKG_PROG_PKG_CONFIG],
-[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
-m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
-AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
-if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
-	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
-fi
-if test -n "$PKG_CONFIG"; then
-	_pkg_min_version=m4_default([$1], [0.9.0])
-	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
-	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
-		AC_MSG_RESULT([yes])
-	else
-		AC_MSG_RESULT([no])
-		PKG_CONFIG=""
-	fi
-		
-fi[]dnl
-])# PKG_PROG_PKG_CONFIG
-
-# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
-#
-# Check to see whether a particular set of modules exists.  Similar
-# to PKG_CHECK_MODULES(), but does not set variables or print errors.
-#
-#
-# Similar to PKG_CHECK_MODULES, make sure that the first instance of
-# this or PKG_CHECK_MODULES is called, or make sure to call
-# PKG_CHECK_EXISTS manually
-# --------------------------------------------------------------
-AC_DEFUN([PKG_CHECK_EXISTS],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
-if test -n "$PKG_CONFIG" && \
-    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
-  m4_ifval([$2], [$2], [:])
-m4_ifvaln([$3], [else
-  $3])dnl
-fi])
-
-
-# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
-# ---------------------------------------------
-m4_define([_PKG_CONFIG],
-[if test -n "$PKG_CONFIG"; then
-    if test -n "$$1"; then
-        pkg_cv_[]$1="$$1"
-    else
-        PKG_CHECK_EXISTS([$3],
-                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
-			 [pkg_failed=yes])
-    fi
-else
-	pkg_failed=untried
-fi[]dnl
-])# _PKG_CONFIG
-
-# _PKG_SHORT_ERRORS_SUPPORTED
-# -----------------------------
-AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi[]dnl
-])# _PKG_SHORT_ERRORS_SUPPORTED
-
-
-# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
-# [ACTION-IF-NOT-FOUND])
-#
-#
-# Note that if there is a possibility the first call to
-# PKG_CHECK_MODULES might not happen, you should be sure to include an
-# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
-#
-#
-# --------------------------------------------------------------
-AC_DEFUN([PKG_CHECK_MODULES],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
-AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
-AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
-
-pkg_failed=no
-AC_MSG_CHECKING([for $1])
-
-_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
-_PKG_CONFIG([$1][_LIBS], [libs], [$2])
-
-m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
-and $1[]_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.])
-
-if test $pkg_failed = yes; then
-        _PKG_SHORT_ERRORS_SUPPORTED
-        if test $_pkg_short_errors_supported = yes; then
-	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
-        else 
-	        $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
-        fi
-	# Put the nasty error message in config.log where it belongs
-	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
-
-	ifelse([$4], , [AC_MSG_ERROR(dnl
-[Package requirements ($2) were not met:
-
-$$1_PKG_ERRORS
-
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
-_PKG_TEXT
-])],
-		[AC_MSG_RESULT([no])
-                $4])
-elif test $pkg_failed = untried; then
-	ifelse([$4], , [AC_MSG_FAILURE(dnl
-[The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-_PKG_TEXT
-
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
-		[$4])
-else
-	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
-	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
-        AC_MSG_RESULT([yes])
-	ifelse([$3], , :, [$3])
-fi[]dnl
-])# PKG_CHECK_MODULES
-
-dnl
-dnl External macros.
-dnl
-
-m4_include([m4/acx_pthread.m4])
-m4_include([m4/acx_blas.m4])
-m4_include([m4/acx_blas_f77_func.m4])
-m4_include([m4/acx_lapack.m4])
--- a/autogen.sh	Tue Nov 10 13:25:57 2009 -0500
+++ b/autogen.sh	Tue Nov 10 15:02:25 2009 -0500
@@ -2,9 +2,88 @@
 # autogen.sh
 # Run this to generate all the initial makefiles, etc.
 
-# copied from the accelerated glx project
+set -e
+
+# Originally copied from the accelerated glx project.
+
+acincludeflags="-I m4"
+
+echo "calling libtoolize..."
+
+(libtoolize --version) < /dev/null > /dev/null 2>&1 || {
+	echo
+        echo "You must have libtoolize (part of the libtool package)"
+	echo "installed to build Octave.  Download the appropriate"
+	echo "package for your distribution, or get the source"
+	echo "tarball at ftp://ftp.gnu.org/pub/gnu/"
+        exit 1
+}
+
+libtoolize
+
+echo "calling aclocal..."
+
+(aclocal --version) < /dev/null > /dev/null 2>&1 || {
+	echo
+        echo "You must have aclocal (part of the automake package)"
+	echo "installed to build Octave.  Download the appropriate"
+	echo "package for your distribution, or get the source"
+	echo "tarball at ftp://ftp.gnu.org/pub/gnu/"
+        exit 1
+}
+
+aclocal $acincludeflags
+
+echo "generating source lists for liboctave/Makefile..."
+
+(cd liboctave; ./config-ops.sh)
+
+echo "generating doc/interpreter/images.mk..."
+
+(cd doc/interpreter; ./config-images.sh)
 
-echo "calling autoconf and autoheader..."
+echo "generating src/DLD-FUNCTIONS/module.mk..."
+
+(cd src/DLD-FUNCTIONS; ./config-module.sh)
+
+echo "calling autoheader..."
+
+(autoheader --version) < /dev/null > /dev/null 2>&1 || {
+	echo
+        echo "You must have autoheader (part of the autoconf package)"
+	echo "installed to build Octave.  Download the appropriate"
+	echo "package for your distribution, or get the source"
+	echo "tarball at ftp://ftp.gnu.org/pub/gnu/"
+        exit 1
+}
+
+autoheader $acincludeflags --force
+
+echo "calling automake..."
+
+(automake --version) < /dev/null > /dev/null 2>&1 || {
+	echo
+        echo "You must have automake installed to build Octave."
+        echo "Download the appropriate package for your distribution,"
+        echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
+        exit 1
+}
+
+automake --warnings=no-portability --add-missing \
+  Makefile \
+  doc/Makefile \
+  doc/faq/Makefile \
+  doc/interpreter/Makefile \
+  doc/liboctave/Makefile \
+  doc/refcard/Makefile \
+  examples/Makefile \
+  libcruft/Makefile \
+  liboctave/Makefile \
+  scripts/Makefile \
+  src/Makefile \
+  test/Makefile
+
+echo "calling autoconf..."
 
 (autoconf --version) < /dev/null > /dev/null 2>&1 || {
 	echo
@@ -14,28 +93,4 @@
         exit 1
 }
 
-(autoheader --version) < /dev/null > /dev/null 2>&1 || {
-	echo
-        echo "You must have autoheader installed to build Octave."
-        echo "Download the appropriate package for your distribution,"
-        echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
-        exit 1
-}
-
-for i in `find . -name configure.ac -print`; do (
-    dir=`dirname $i`
-    cd $dir
-    pwd
-    if [ -f skip-autoconf ]; then
-      echo "skipping autoconf in $dir"
-    else
-      autoconf --force
-    fi
-    if [ -f skip-autoheader ]; then
-      echo "skipping autoheader in $dir"
-    else
-      autoheader --force
-    fi
-); done
-
-echo done
+autoconf $acincludeflags --force
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/common.mk	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,676 @@
+SHELL = /bin/sh
+
+AWK = @AWK@
+export AWK
+
+SED = @SED@
+export SED
+
+FIND = @FIND@
+export FIND
+
+PERL = @PERL@
+export PERL
+
+PYTHON = @PYTHON@
+
+GNUPLOT = @GNUPLOT@
+
+DESKTOP_FILE_INSTALL = @DESKTOP_FILE_INSTALL@
+
+version = @OCTAVE_VERSION@
+api_version = @OCTAVE_API_VERSION@
+
+## AM_LIBTOOLFLAGS = --silent
+
+#### Start of system configuration section. ####
+
+EXEEXT = @EXEEXT@
+
+BUILD_EXEEXT = @BUILD_EXEEXT@
+
+LEX = @LEX@
+AM_LFLAGS = @LFLAGS@
+LEXLIB = @LEXLIB@
+
+YACC = @YACC@
+AM_YFLAGS = -dv
+
+GPERF = @GPERF@
+
+AR = @AR@
+ARFLAGS = @ARFLAGS@ 
+
+TEMPLATE_AR = @TEMPLATE_AR@
+TEMPLATE_ARFLAGS = @TEMPLATE_ARFLAGS@
+
+RANLIB = @RANLIB@
+
+LN_S = @LN_S@
+
+MAKEINFO = @MAKEINFO@
+TEXI2DVI = @TEXI2DVI@
+TEXI2PDF = @TEXI2PDF@
+
+GHOSTSCRIPT = @GHOSTSCRIPT@
+
+DEFAULT_PAGER = @DEFAULT_PAGER@
+
+ENABLE_DYNAMIC_LINKING = @ENABLE_DYNAMIC_LINKING@
+
+SHLEXT = @SHLEXT@
+SHLEXT_VER = @SHLEXT_VER@
+SHLLIB = @SHLLIB@
+SHLLIB_VER = @SHLLIB_VER@
+SHLBIN = @SHLBIN@
+SHLBIN_VER = @SHLBIN_VER@
+SHLLINKEXT=
+
+LIBEXT = a
+LIBPRE = @LIBPRE@
+SHLPRE = @SHLPRE@
+SHLLIBPRE = @SHLLIBPRE@
+SHLBINPRE = @SHLBINPRE@
+
+# Fortran compiler flags.
+
+FC = @FC@
+F77 = @F77@
+AM_FFLAGS = @FFLAGS@
+FPICFLAG = @FPICFLAG@
+ALL_FFLAGS = $(FFLAGS)
+F77_FLOAT_STORE_FLAG = @F77_FLOAT_STORE_FLAG@
+
+F77_TOLOWER=@F77_TOLOWER@
+F77_APPEND_UNDERSCORE=@F77_TOLOWER@
+F77_APPEND_EXTRA_UNDERSCORE=@F77_TOLOWER@
+
+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$(TOPDIR)
+
+DEFS = @DEFS@
+
+UGLY_DEFS = @UGLY_DEFS@
+
+CC = @CC@
+CC_VERSION = @CC_VERSION@
+AM_CFLAGS = @CFLAGS@
+CPICFLAG = @CPICFLAG@
+XTRA_CFLAGS = @XTRA_CFLAGS@
+WARN_CFLAGS = @WARN_CFLAGS@
+ALL_CFLAGS = $(INCFLAGS) $(DLL_CDEFS) $(DEFS) $(XTRA_CFLAGS) $(WARN_CFLAGS) $(CFLAGS) $(PTHREAD_CFLAGS)
+BUG_CFLAGS = $(DEFS) $(XTRA_CFLAGS) $(WARN_CFLAGS) $(CFLAGS)
+
+BUILD_CC = @BUILD_CC@
+BUILD_CFLAGS = @BUILD_CFLAGS@
+
+DEPEND_FLAGS = @DEPEND_FLAGS@
+DEPEND_EXTRA_SED_PATTERN = @DEPEND_EXTRA_SED_PATTERN@
+INCLUDE_DEPS = @INCLUDE_DEPS@
+# ifeq ($(INCLUDE_DEPS),false)
+#   omit_deps = true;
+# endif
+
+GRAPHICS_CFLAGS = @GRAPHICS_CFLAGS@
+
+CXX = @CXX@
+CXX_VERSION = @CXX_VERSION@
+CXXCPP = @CXXCPP@
+CONFIGURE_CXXFLAGS = @CXXFLAGS@
+CXXPICFLAG = @CXXPICFLAG@
+XTRA_CXXFLAGS = @XTRA_CXXFLAGS@
+WARN_CXXFLAGS = @WARN_CXXFLAGS@
+AM_CXXFLAGS = $(CONFIGURE_CXXFLAGS) \
+  $(INCFLAGS) $(DLL_CXXDEFS) $(DEFS) $(XTRA_CXXFLAGS) $(WARN_CXXFLAGS) $(CXXFLAGS) $(PTHREAD_CFLAGS)
+BUG_CXXFLAGS = $(DEFS) $(XTRA_CXXFLAGS) $(WARN_CXXFLAGS) $(CXXFLAGS)
+
+BUILD_CXX = @BUILD_CXX@
+BUILD_CXXFLAGS = @BUILD_CXXFLAGS@
+
+NO_UNDEFINED_LDFLAG = @NO_UNDEFINED_LDFLAG@
+
+LD_CXX = @LD_CXX@
+LD_STATIC_FLAG = @LD_STATIC_FLAG@
+#ALL_LDFLAGS = $(LIBFLAGS) $(LD_STATIC_FLAG) $(CPICFLAG) $(LDFLAGS)
+
+BUILD_LDFLAGS = @BUILD_LDFLAGS@
+
+SH_LD = @SH_LD@
+SH_LDFLAGS = @SH_LDFLAGS@
+
+DL_LD = @DL_LD@
+DL_LDFLAGS = @DL_LDFLAGS@
+
+SONAME_FLAGS = @SONAME_FLAGS@
+
+RDYNAMIC_FLAG = @RDYNAMIC_FLAG@
+
+RLD_FLAG = @RLD_FLAG@
+
+FLIBS = @FLIBS@
+
+LIBGLOB = @LIBGLOB@
+LIBOCTINTERP = @LIBOCTINTERP@
+LIBOCTAVE = @LIBOCTAVE@
+LIBCRUFT = @LIBCRUFT@
+
+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@
+
+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@
+
+AMD_CPPFLAGS = @AMD_CPPFLAGS@
+AMD_LDFLAGS = @AMD_LDFLAGS@
+AMD_LIBS = @AMD_LIBS@
+
+CAMD_CPPFLAGS = @CAMD_CPPFLAGS@
+CAMD_LDFLAGS = @CAMD_LDFLAGS@
+CAMD_LIBS = @CAMD_LIBS@
+
+COLAMD_CPPFLAGS = @COLAMD_CPPFLAGS@
+COLAMD_LDFLAGS = @COLAMD_LDFLAGS@
+COLAMD_LIBS = @COLAMD_LIBS@
+
+CCOLAMD_CPPFLAGS = @CCOLAMD_CPPFLAGS@
+CCOLAMD_LDFLAGS = @CCOLAMD_LDFLAGS@
+CCOLAMD_LIBS = @CCOLAMD_LIBS@
+
+CHOLMOD_CPPFLAGS = @CHOLMOD_CPPFLAGS@
+CHOLMOD_LDFLAGS = @CHOLMOD_LDFLAGS@
+CHOLMOD_LIBS = @CHOLMOD_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@
+
+OPENGL_LIBS = @OPENGL_LIBS@
+
+QRUPDATE_CPPFLAGS = @QRUPDATE_CPPFLAGS@
+QRUPDATE_LDFLAGS = @QRUPDATE_LDFLAGS@
+QRUPDATE_LIBS = @QRUPDATE_LIBS@
+
+READLINE_LIBS = @READLINE_LIBS@
+TERM_LIBS = @TERM_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)
+
+SPARSE_XCPPFLAGS = \
+  $(CHOLMOD_CPPFLAGS) $(UMFPACK_CPPFLAGS) \
+  $(AMD_CPPFLAGS) $(CAMD_CPPFLAGS) $(COLAMD_CPPFLAGS) \
+  $(CCOLAMD_CPPFLAGS) $(CXSPARSE_CPPFLAGS)
+
+SPARSE_XLDFLAGS = \
+  $(CHOLMOD_LDFLAGS) $(UMFPACK_LDFLAGS) \
+  $(AMD_LDFLAGS) $(CAMD_LDFLAGS) $(COLAMD_LDFLAGS) \
+  $(CCOLAMD_LDFLAGS) $(CXSPARSE_LDFLAGS)
+
+## Order matters, at least on some systems (Cygwin, for example).
+SPARSE_XLIBS = \
+    $(CHOLMOD_LIBS) $(UMFPACK_LIBS) \
+    $(AMD_LIBS) $(CAMD_LIBS) $(COLAMD_LIBS) \
+    $(CCOLAMD_LIBS) $(CXSPARSE_LIBS)
+
+FFTW_XCPPFLAGS = $(FFTW3_CPPFLAGS) $(FFTW3F_CPPFLAGS)
+
+FFTW_XLDFLAGS = $(FFTW3_LDFLAGS) $(FFTW3F_LDFLAGS)
+
+FFTW_XLIBS = $(FFTW3_LIBS) $(FFTW3F_LIBS)
+
+USE_64_BIT_IDX_T = @USE_64_BIT_IDX_T@
+
+TEXINFO_COLAMD = @TEXINFO_COLAMD@
+TEXINFO_CHOLMOD = @TEXINFO_CHOLMOD@
+TEXINFO_UMFPACK = @TEXINFO_UMFPACK@
+TEXINFO_QHULL = @TEXINFO_QHULL@
+
+# The arguments passed to configure.
+config_opts = @config_opts@
+
+CONFIG_SUBDIRS = @subdirs@
+
+# ==================== Where To Install Things ====================
+
+# The default location for installation.  Everything is placed in
+# subdirectories of this directory.  The default values for many of
+# the variables below are expressed in terms of this one, so you may
+# not need to change them.  This defaults to /usr/local.
+prefix = @prefix@
+
+# Like `prefix', but used for architecture-specific files.
+exec_prefix = @exec_prefix@
+
+# Where to install Octave and other binaries that people will want to
+# run directly.
+bindir = @bindir@
+
+# Normally the directory for installing executables that system
+# administrators run.  This is the same as libexecdir on Cygwin systems.
+sbindir = @sbindir@
+
+# The root of the directory tree for read-only
+# architecture-independent data files.
+datarootdir = @datarootdir@
+
+# Where to install architecture-independent data files.  ${fcnfiledir}
+# and ${localfcnfiledir} are subdirectories of this.
+datadir = @datadir@
+
+libdir = @libdir@
+
+# Where to install and expect extra files like NEWS and doc-cache.
+octetcdir = @octetcdir@
+
+# Where to install and expect libraries like libcruft.a, liboctave.a,
+# and other architecture-dependent data.
+octlibdir = @octlibdir@
+
+# Where to install and expect executable programs to be run by Octave
+# rather than directly by users.
+libexecdir = @libexecdir@
+
+# The prefix for Octave's include file directory.  The default is
+# ${prefix}/include
+includedir = @includedir@
+
+# Where to install Octave's man pages, and what extension they should
+# have.  The default is ${prefix}/man/man1
+mandir = @mandir@
+man1dir = @man1dir@
+man1ext = @man1ext@
+
+# The full path to the default doc cache file.
+doc_cache_file = @doc_cache_file@
+
+# Where to install and expect the info files describing Octave..
+infodir = @infodir@
+
+# The full path to the default info file.
+infofile = @infofile@
+
+# ==================== Octave-specific directories ====================
+
+# These variables hold the values specific to Octave.  They are
+# based on the values of the standard Make variables above.
+
+# What is the path separation character
+sepchar = @sepchar@
+
+# Where to install Octave's include files.  The default is
+# ${includedir}/octave-${version}/octave
+octincludedir = @octincludedir@
+
+# Where to install the function file distributed with
+# Octave.  This includes the Octave version, so that the
+# function files for different versions of Octave will install
+# themselves in separate directories.
+fcnfiledir = @fcnfiledir@
+
+# Directories Octave should search for function files specific
+# to this site (i.e. customizations), before consulting
+# ${fcnfiledir}.  This should be a colon-separated list of
+# directories.
+localfcnfiledir = @localfcnfiledir@
+localapifcnfiledir = @localapifcnfiledir@
+localverfcnfiledir = @localverfcnfiledir@
+
+# Where to put executables to be run by Octave rather than
+# the user.  This path usually includes the Octave version
+# and configuration name, so that multiple configurations
+# for multiple versions of Octave may be installed at once.
+archlibdir = @archlibdir@
+
+# Where to put executables to be run by Octave rather than by the
+# user that are specific to this site.
+localarchlibdir = @localarchlibdir@
+localapiarchlibdir = @localapiarchlibdir@
+localverarchlibdir = @localverarchlibdir@
+
+# Where to put object files that will by dynamically loaded.
+# This path usually includes the Octave version and configuration
+# name, so that multiple configurations for multiple versions of
+# Octave may be installed at once. 
+octfiledir = @octfiledir@
+
+# Directories Octave should search for object files that will be
+# dynamically loaded and that are specific to this site
+# (i.e. customizations), before consulting ${octfiledir}.  This should
+# be a colon-separated list of directories.
+localoctfiledir = @localoctfiledir@
+localapioctfiledir = @localapioctfiledir@
+localveroctfiledir = @localveroctfiledir@
+
+# Where Octave will search to find image files.
+imagedir = @imagedir@
+
+# The type of computer we are running on.
+canonical_host_type = @canonical_host_type@
+
+# Where Octave will look for startup files
+startupfiledir = ${fcnfiledir}/startup
+localstartupfiledir = ${localfcnfiledir}/startup
+
+# LD_LIBRARY_PATH, DYLD_LIBRARY_PATH, PATH, ...
+library_path_var = @library_path_var@
+
+# The separator used for elements of the LD_PRELOAD variable (might be
+# a space, so protect with $(null))
+null =
+ldpreloadsep = $(null)@ldpreloadsep@$(null)
+
+NO_OCT_FILE_STRIP = @NO_OCT_FILE_STRIP@
+
+# The following pattern rules and the substitution functions require
+# GNU make.  If you don't have it, get it!
+
+define simple_move_if_change_rule
+if [ -s $@-t ]; then \
+  $(top_srcdir)/move-if-change $@-t $@; \
+else \
+  echo "$@-t is empty!" 1>&2; \
+  rm -f $@-t; \
+  exit 1; \
+fi
+endef
+
+# Yes, the second sed command near the end is needed, to avoid limits
+# in command lengths for some versions of sed.  UGLY_DEFS is often
+# quite large, so it makes sense to split this command there.
+
+define do_subst_config_vals
+echo "making $@ from $<"
+$(SED) < $< \
+  -e "s|%NO_OCT_FILE_STRIP%|${NO_OCT_FILE_STRIP}|" \
+  -e "s|%OCTAVE_BINDIR%|\"${bindir}\"|" \
+  -e "s|%OCTAVE_CONF_ALL_CFLAGS%|\"${ALL_CFLAGS}\"|" \
+  -e "s|%OCTAVE_CONF_ALL_CXXFLAGS%|\"${ALL_CXXFLAGS}\"|" \
+  -e "s|%OCTAVE_CONF_ALL_FFLAGS%|\"${ALL_FFLAGS}\"|" \
+  -e "s|%OCTAVE_CONF_ALL_LDFLAGS%|\"${ALL_LDFLAGS}\"|" \
+  -e "s|%OCTAVE_CONF_AMD_CPPFLAGS%|\"${AMD_CPPFLAGS}\"|" \
+  -e "s|%OCTAVE_CONF_AMD_LDFLAGS%|\"${AMD_LDFLAGS}\"|" \
+  -e "s|%OCTAVE_CONF_AMD_LIBS%|\"${AMD_LIBS}\"|" \
+  -e "s|%OCTAVE_CONF_AR%|\"${AR}\"|" \
+  -e "s|%OCTAVE_CONF_ARFLAGS%|\"${ARFLAGS}\"|" \
+  -e "s|%OCTAVE_CONF_ARPACK_CPPFLAGS%|\"${ARPACK_CPPFLAGS}\"|" \
+  -e "s|%OCTAVE_CONF_ARPACK_LDFLAGS%|\"${ARPACK_LDFLAGS}\"|" \
+  -e "s|%OCTAVE_CONF_ARPACK_LIBS%|\"${ARPACK_LIBS}\"|" \
+  -e "s|%OCTAVE_CONF_BLAS_LIBS%|\"${BLAS_LIBS}\"|" \
+  -e "s|%OCTAVE_CONF_CAMD_CPPFLAGS%|\"${CAMD_CPPFLAGS}\"|" \
+  -e "s|%OCTAVE_CONF_CAMD_LDFLAGS%|\"${CAMD_LDFLAGS}\"|" \
+  -e "s|%OCTAVE_CONF_CAMD_LIBS%|\"${CAMD_LIBS}\"|" \
+  -e "s|%OCTAVE_CONF_CANONICAL_HOST_TYPE%|\"${canonical_host_type}\"|" \
+  -e "s|%OCTAVE_CONF_CARBON_LIBS%|\"${CARBON_LIBS}\"|" \
+  -e "s|%OCTAVE_CONF_CC%|\"${CC}\"|" \
+  -e "s|%OCTAVE_CONF_CC_VERSION%|\"${CC_VERSION}\"|" \
+  -e "s|%OCTAVE_CONF_CCOLAMD_CPPFLAGS%|\"${CCOLAMD_CPPFLAGS}\"|" \
+  -e "s|%OCTAVE_CONF_CCOLAMD_LDFLAGS%|\"${CCOLAMD_LDFLAGS}\"|" \
+  -e "s|%OCTAVE_CONF_CCOLAMD_LIBS%|\"${CCOLAMD_LIBS}\"|" \
+  -e "s|%OCTAVE_CONF_CFLAGS%|\"${CFLAGS}\"|" \
+  -e "s|%OCTAVE_CONF_CHOLMOD_CPPFLAGS%|\"${CHOLMOD_CPPFLAGS}\"|" \
+  -e "s|%OCTAVE_CONF_CHOLMOD_LDFLAGS%|\"${CHOLMOD_LDFLAGS}\"|" \
+  -e "s|%OCTAVE_CONF_CHOLMOD_LIBS%|\"${CHOLMOD_LIBS}\"|" \
+  -e "s|%OCTAVE_CONF_COLAMD_CPPFLAGS%|\"${COLAMD_CPPFLAGS}\"|" \
+  -e "s|%OCTAVE_CONF_COLAMD_LDFLAGS%|\"${COLAMD_LDFLAGS}\"|" \
+  -e "s|%OCTAVE_CONF_COLAMD_LIBS%|\"${COLAMD_LIBS}\"|" \
+  -e "s|%OCTAVE_CONF_CPICFLAG%|\"${CPICFLAG}\"|" \
+  -e "s|%OCTAVE_CONF_CPPFLAGS%|\"${CPPFLAGS}\"|" \
+  -e "s|%OCTAVE_CONF_CURL_CPPFLAGS%|\"${CURL_CPPFLAGS}\"|" \
+  -e "s|%OCTAVE_CONF_CURL_LDFLAGS%|\"${CURL_LDFLAGS}\"|" \
+  -e "s|%OCTAVE_CONF_CURL_LIBS%|\"${CURL_LIBS}\"|" \
+  -e "s|%OCTAVE_CONF_CXSPARSE_CPPFLAGS%|\"${CXSPARSE_CPPFLAGS}\"|" \
+  -e "s|%OCTAVE_CONF_CXSPARSE_LDFLAGS%|\"${CXSPARSE_LDFLAGS}\"|" \
+  -e "s|%OCTAVE_CONF_CXSPARSE_LIBS%|\"${CXSPARSE_LIBS}\"|" \
+  -e "s|%OCTAVE_CONF_CXX%|\"${CXX}\"|" \
+  -e "s|%OCTAVE_CONF_CXXCPP%|\"${CXXCPP}\"|" \
+  -e "s|%OCTAVE_CONF_CXXFLAGS%|\"${CXXFLAGS}\"|" \
+  -e "s|%OCTAVE_CONF_CXXPICFLAG%|\"${CXXPICFLAG}\"|" \
+  -e "s|%OCTAVE_CONF_CXX_VERSION%|\"${CXX_VERSION}\"|" \
+  -e "s|%OCTAVE_CONF_DEFAULT_PAGER%|\"${DEFAULT_PAGER}\"|" \
+  -e "s|%OCTAVE_CONF_DEPEND_FLAGS%|\"${DEPEND_FLAGS}\"|" \
+  -e "s|%OCTAVE_CONF_DEPEND_EXTRA_SED_PATTERN%|\"${DEPEND_EXTRA_SED_PATTERN}\"|" \
+  -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_EXEEXT%|\"${EXEEXT}\"|" \
+  -e "s|%OCTAVE_CONF_F77%|\"${F77}\"|" \
+  -e "s|%OCTAVE_CONF_F77_FLOAT_STORE_FLAG%|\"${F77_FLOAT_STORE_FLAG}\"|" \
+  -e "s|%OCTAVE_CONF_FC%|\"${FC}\"|" \
+  -e "s|%OCTAVE_CONF_FFLAGS%|\"${FFLAGS}\"|" \
+  -e "s|%OCTAVE_CONF_FFTW3_CPPFLAGS%|\"${FFTW3_CPPFLAGS}\"|" \
+  -e "s|%OCTAVE_CONF_FFTW3_LDFLAGS%|\"${FFTW3_LDFLAGS}\"|" \
+  -e "s|%OCTAVE_CONF_FFTW3_LIBS%|\"${FFTW3_LIBS}\"|" \
+  -e "s|%OCTAVE_CONF_FFTW3F_CPPFLAGS%|\"${FFTW3F_CPPFLAGS}\"|" \
+  -e "s|%OCTAVE_CONF_FFTW3F_LDFLAGS%|\"${FFTW3F_LDFLAGS}\"|" \
+  -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_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_LIBS%|\"${GRAPHICS_LIBS}\"|" \
+  -e "s|%OCTAVE_CONF_HDF5_CPPFLAGS%|\"${HDF5_CPPFLAGS}\"|" \
+  -e "s|%OCTAVE_CONF_HDF5_LDFLAGS%|\"${HDF5_LDFLAGS}\"|" \
+  -e "s|%OCTAVE_CONF_HDF5_LIBS%|\"${HDF5_LIBS}\"|" \
+  -e "s|%OCTAVE_CONF_INCFLAGS%|\"${INCFLAGS}\"|" \
+  -e "s|%OCTAVE_CONF_INCLUDEDIR%|\"${includedir}\"|" \
+  -e "s|%OCTAVE_CONF_LAPACK_LIBS%|\"${LAPACK_LIBS}\"|" \
+  -e "s|%OCTAVE_CONF_LD_CXX%|\"${LD_CXX}\"|" \
+  -e "s|%OCTAVE_CONF_LDFLAGS%|\"${LDFLAGS}\"|" \
+  -e "s|%OCTAVE_CONF_LD_STATIC_FLAG%|\"${LD_STATIC_FLAG}\"|" \
+  -e "s|%OCTAVE_CONF_LEX%|\"${LEX}\"|" \
+  -e "s|%OCTAVE_CONF_LEXLIB%|\"${LEXLIB}\"|" \
+  -e "s|%OCTAVE_CONF_LFLAGS%|\"${LFLAGS}\"|" \
+  -e "s|%OCTAVE_CONF_LIBCRUFT%|\"${LIBCRUFT}\"|" \
+  -e "s|%OCTAVE_CONF_LIBDIR%|\"${libdir}\"|" \
+  -e "s|%OCTAVE_CONF_LIBEXT%|\"${LIBEXT}\"|" \
+  -e "s|%OCTAVE_CONF_LIBFLAGS%|\"${LIBFLAGS}\"|" \
+  -e "s|%OCTAVE_CONF_LIBGLOB%|\"${LIBGLOB}\"|" \
+  -e "s|%OCTAVE_CONF_LIBOCTAVE%|\"${LIBOCTAVE}\"|" \
+  -e "s|%OCTAVE_CONF_LIBOCTINTERP%|\"${LIBOCTINTERP}\"|" \
+  -e "s|%OCTAVE_CONF_LIBS%|\"${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_MKOCTFILE_DL_LDFLAGS%|\"@MKOCTFILE_DL_LDFLAGS@\"|' \
+  -e "s|%OCTAVE_CONF_OCTINCLUDEDIR%|\"${octincludedir}\"|" \
+  -e "s|%OCTAVE_CONF_OCTLIBDIR%|\"${octlibdir}\"|" \
+  -e "s|%OCTAVE_CONF_OPENGL_LIBS%|\"${OPENGL_LIBS}\"|" \
+  -e "s|%OCTAVE_CONF_PREFIX%|\"${prefix}\"|" \
+  -e "s|%OCTAVE_CONF_PTHREAD_CFLAGS%|\"${PTHREAD_CFLAGS}\"|" \
+  -e "s|%OCTAVE_CONF_PTHREAD_LIBS%|\"${PTHREAD_LIBS}\"|" \
+  -e "s|%OCTAVE_CONF_QHULL_CPPFLAGS%|\"${QHULL_CPPFLAGSS}\"|" \
+  -e "s|%OCTAVE_CONF_QHULL_LDFLAGS%|\"${QHULL_LDFLAGSS}\"|" \
+  -e "s|%OCTAVE_CONF_QHULL_LIBS%|\"${QHULL_LIBS}\"|" \
+  -e "s|%OCTAVE_CONF_QRUPDATE_CPPFLAGS%|\"${QRUPDATE_CPPFLAGS}\"|" \
+  -e "s|%OCTAVE_CONF_QRUPDATE_LDFLAGS%|\"${QRUPDATE_LDFLAGS}\"|" \
+  -e "s|%OCTAVE_CONF_QRUPDATE_LIBS%|\"${QRUPDATE_LIBS}\"|" \
+  -e "s|%OCTAVE_CONF_RANLIB%|\"${RANLIB}\"|" \
+  -e "s|%OCTAVE_CONF_RDYNAMIC_FLAG%|\"${RDYNAMIC_FLAG}\"|" \
+  -e "s|%OCTAVE_CONF_READLINE_LIBS%|\"${READLINE_LIBS}\"|" \
+  -e "s|%OCTAVE_CONF_REGEX_LIBS%|\"${REGEX_LIBS}\"|" \
+  -e "s|%OCTAVE_CONF_RLD_FLAG%|\"${RLD_FLAG}\"|" \
+  -e "s|%OCTAVE_CONF_SED%|\"${SED}\"|" \
+  -e "s|%OCTAVE_CONF_SHARED_LIBS%|\"${SHARED_LIBS}\"|" \
+  -e "s|%OCTAVE_CONF_SHLEXT%|\"${SHLEXT}\"|" \
+  -e "s|%OCTAVE_CONF_SHLLINKEXT%|\"${SHLLINKEXT}\"|" \
+  -e "s|%OCTAVE_CONF_SHLEXT_VER%|\"${SHLEXT_VER}\"|" \
+  -e "s|%OCTAVE_CONF_SH_LD%|\"${SH_LD}\"|" \
+  -e "s|%OCTAVE_CONF_SH_LDFLAGS%|\"${SH_LDFLAGS}\"|" \
+  -e "s|%OCTAVE_CONF_SONAME_FLAGS%|\"${SONAME_FLAGS}\"|" \
+  -e "s|%OCTAVE_CONF_STATIC_LIBS%|\"${STATIC_LIBS}\"|" \
+  -e "s|%OCTAVE_CONF_TERM_LIBS%|\"${TERM_LIBS}\"|" \
+  -e "s|%OCTAVE_CONF_UGLY_DEFS%|\"${UGLY_DEFS}\"|" \
+  -e "s|%OCTAVE_CONF_UMFPACK_CPPFLAGS%|\"${UMFPACK_CPPFLAGS}\"|" \
+  -e "s|%OCTAVE_CONF_UMFPACK_LDFLAGS%|\"${UMFPACK_LDFLAGS}\"|" \
+  -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_X11_INCFLAGS%|\"${X11_INCFLAGS}\"|" \
+  -e "s|%OCTAVE_CONF_X11_LIBS%|\"${X11_LIBS}\"|" \
+  -e "s|%OCTAVE_CONF_XTRA_CFLAGS%|\"${XTRA_CFLAGS}\"|" \
+  -e "s|%OCTAVE_CONF_XTRA_CXXFLAGS%|\"${XTRA_CXXFLAGS}\"|" \
+  -e "s|%OCTAVE_CONF_YACC%|\"${YACC}\"|" \
+  -e "s|%OCTAVE_CONF_YFLAGS%|\"${YFLAGS}\"|" \
+  -e "s|%OCTAVE_CONF_Z_CPPFLAGS%|\"${Z_CPPFLAGS}\"|" \
+  -e "s|%OCTAVE_CONF_Z_LDFLAGS%|\"${Z_LDFLAGS}\"|" \
+  -e "s|%OCTAVE_CONF_Z_LIBS%|\"${Z_LIBS}\"|" \
+  -e "s|%OCTAVE_CONF_config_opts%|\"${config_opts}\"|" | \
+  $(SED)  -e "s|%OCTAVE_CONF_DEFS%|\"${UGLY_DEFS}\"|" > $@-t
+$(simple_move_if_change_rule)
+endef
+
+define do_subst_default_vals
+echo "making $@ from $<"
+$(SED) < $< > $@-t \
+  -e "s|%OCTAVE_ARCHLIBDIR%|\"${archlibdir}\"|" \
+  -e "s|%OCTAVE_BINDIR%|\"${bindir}\"|" \
+  -e "s|%OCTAVE_CANONICAL_HOST_TYPE%|\"${canonical_host_type}\"|" \
+  -e "s|%OCTAVE_DATADIR%|\"${datadir}\"|" \
+  -e "s|%OCTAVE_DATAROOTDIR%|\"${datarootdir}\"|" \
+  -e "s|%OCTAVE_DEFAULT_PAGER%|\"${DEFAULT_PAGER}\"|" \
+  -e "s|%OCTAVE_DOC_CACHE_FILE%|\"${doc_cache_file}\"|" \
+  -e "s|%OCTAVE_EXEC_PREFIX%|\"${exec_prefix}\"|" \
+  -e "s|%OCTAVE_FCNFILEDIR%|\"${fcnfiledir}\"|" \
+  -e "s|%OCTAVE_IMAGEDIR%|\"${imagedir}\"|" \
+  -e "s|%OCTAVE_INCLUDEDIR%|\"${includedir}\"|" \
+  -e "s|%OCTAVE_INFODIR%|\"${infodir}\"|" \
+  -e "s|%OCTAVE_INFOFILE%|\"${infofile}\"|" \
+  -e "s|%OCTAVE_LIBDIR%|\"${libdir}\"|" \
+  -e "s|%OCTAVE_LIBEXECDIR%|\"${libexecdir}\"|" \
+  -e "s|%OCTAVE_LOCALAPIFCNFILEDIR%|\"${localapifcnfiledir}\"|" \
+  -e "s|%OCTAVE_LOCALAPIOCTFILEDIR%|\"${localapioctfiledir}\"|" \
+  -e "s|%OCTAVE_LOCALARCHLIBDIR%|\"${localarchlibdir}\"|" \
+  -e "s|%OCTAVE_LOCALFCNFILEDIR%|\"${localfcnfiledir}\"|" \
+  -e "s|%OCTAVE_LOCALOCTFILEDIR%|\"${localoctfiledir}\"|" \
+  -e "s|%OCTAVE_LOCALSTARTUPFILEDIR%|\"${localstartupfiledir}\"|" \
+  -e "s|%OCTAVE_LOCALAPIARCHLIBDIR%|\"${localapiarchlibdir}\"|" \
+  -e "s|%OCTAVE_LOCALVERARCHLIBDIR%|\"${localverarchlibdir}\"|" \
+  -e "s|%OCTAVE_LOCALVERFCNFILEDIR%|\"${localverfcnfiledir}\"|" \
+  -e "s|%OCTAVE_LOCALVEROCTFILEDIR%|\"${localveroctfiledir}\"|" \
+  -e "s|%OCTAVE_MAN1DIR%|\"${man1dir}\"|" \
+  -e "s|%OCTAVE_MAN1EXT%|\"${man1ext}\"|" \
+  -e "s|%OCTAVE_MANDIR%|\"${mandir}\"|" \
+  -e "s|%OCTAVE_OCTFILEDIR%|\"${octfiledir}\"|" \
+  -e "s|%OCTAVE_OCTETCDIR%|\"${octetcdir}\"|" \
+  -e "s|%OCTAVE_OCTINCLUDEDIR%|\"${octincludedir}\"|" \
+  -e "s|%OCTAVE_OCTLIBDIR%|\"${octlibdir}\"|" \
+  -e "s|%OCTAVE_STARTUPFILEDIR%|\"${startupfiledir}\"|" \
+  -e "s|%OCTAVE_PREFIX%|\"${prefix}\"|" \
+  -e "s|%OCTAVE_API_VERSION%|\"${api_version}\"|" \
+  -e "s|%OCTAVE_RELEASE%|\"${OCTAVE_RELEASE}\"|" \
+  -e "s|%OCTAVE_VERSION%|\"${version}\"|"
+$(simple_move_if_change_rule)
+endef
+
+define do_subst_texinfo_vals
+echo "making $@ from $<"
+$(SED) < $< \
+  -e "s|%abs_top_srcdir%|${abs_top_srcdir}|" \
+  -e "s|%top_srcdir%|${top_srcdir}|" \
+  -e "s|%OCTAVE_HOME%|${prefix}|" \
+  -e "s|%OCTAVE_VERSION%|${version}|" \
+  -e "s|%TEXINFO_COLAMD%|${TEXINFO_COLAMD}|" \
+  -e "s|%TEXINFO_CHOLMOD%|${TEXINFO_CHOLMOD}|" \
+  -e "s|%TEXINFO_UMFPACK%|${TEXINFO_UMFPACK}|" \
+  -e "s|%TEXINFO_QHULL%|${TEXINFO_QHULL}|" | \
+  $(SED) -e "s|%OCTAVE_CONF_DEFS%|\"${UGLY_DEFS}\"|" > $@-t
+$(simple_move_if_change_rule)
+endef
+
+define do_subst_script_vals
+echo "making $@ from $<"
+$(SED) < $< \
+  -e "s|%AWK%|${AWK}|g" \
+  -e "s|%FIND%|${FIND}|g" \
+  -e "s|%SED%|${SED}|g" \
+  -e "s|%library_path_var%|${library_path_var}|g" \
+  -e "s|%liboctinterp%|${SHLPRE}octinterp.${SHLEXT}|g" \
+  -e "s|%liboctave%|${SHLPRE}octave.${SHLEXT}|g" \
+  -e "s|%libcruft%|${SHLPRE}cruft.${SHLEXT}|g" \
+  -e "s|%ldpreloadsep%|${ldpreloadsep}|g" \
+  -e "s|%srcdir%|${srcdir}|" \
+  -e "s|%top_srcdir%|${top_srcdir}|" \
+  -e "s|%abs_top_srcdir%|${abs_top_srcdir}|" \
+  -e "s|%builddir%|$(shell pwd)|" > $@-t
+$(simple_move_if_change_rule)
+endef
+
+define do_script_install
+$(top_srcdir)/mkinstalldirs $(DESTDIR)$(fcnfiledir)/$(script_sub_dir)
+for f in $(FCN_FILES); do \
+  fbase=`basename $$f`; \
+  rm -f $(DESTDIR)$(fcnfiledir)/$(script_sub_dir)/$$fbase; \
+  $(INSTALL_DATA) $$f $(DESTDIR)$(fcnfiledir)/$(script_sub_dir)/$$fbase; \
+done
+$(top_srcdir)/mkpkgadd $(DESTDIR)$(fcnfiledir)/$(script_sub_dir) > $(DESTDIR)$(fcnfiledir)/$(script_sub_dir)/PKG_ADD.t
+if [ -n "`cat $(DESTDIR)$(fcnfiledir)/$(script_sub_dir)/PKG_ADD.t`" ]; then \
+  $(INSTALL_DATA) $(DESTDIR)$(fcnfiledir)/$(script_sub_dir)/PKG_ADD.t $(DESTDIR)$(fcnfiledir)/$(script_sub_dir)/PKG_ADD ; \
+else \
+  rm -f $(DESTDIR)$(fcnfiledir)/$(script_sub_dir)/PKG_ADD.t ; \
+fi
+endef
+
+define do_script_uninstall
+for f in $(FCN_FILES_NO_DIR); \
+  do rm -f $(DESTDIR)$(fcnfiledir)/$(script_sub_dir)/$$f; \
+done
+rm -f $(DESTDIR)$(fcnfiledir)/$(script_sub_dir)/PKG_ADD
+-rmdir $(DESTDIR)$(fcnfiledir)/$(script_sub_dir)
+endef
--- a/configure.ac	Tue Nov 10 13:25:57 2009 -0500
+++ b/configure.ac	Tue Nov 10 15:02:25 2009 -0500
@@ -29,11 +29,24 @@
 EXTERN_CFLAGS="$CFLAGS"
 EXTERN_CXXFLAGS="$CXXFLAGS"
 
-AC_INIT
+AC_INIT([GNU Octave], [3.3.50+], [bug@octave.org], [octave], [http://www.octave.org])
+
+dnl PACKAGE_VERSION is set by the AC_INIT VERSION arg
+OCTAVE_VERSION="$PACKAGE_VERSION"
+OCTAVE_API_VERSION="api-v38+"
+OCTAVE_RELEASE_DATE="2009-09-12"
+OCTAVE_COPYRIGHT="Copyright (C) 2009 John W. Eaton and others."
+AC_SUBST(OCTAVE_VERSION)
+AC_SUBST(OCTAVE_API_VERSION)
+AC_SUBST(OCTAVE_RELEASE_DATE)
+AC_SUBST(OCTAVE_COPYRIGHT)
+
+AM_INIT_AUTOMAKE([1.11 tar-ustar])
 AC_REVISION($Revision: 1.603 $)
 AC_PREREQ(2.60)
 AC_CONFIG_SRCDIR([src/octave.cc])
 AC_CONFIG_HEADER(config.h)
+AC_CONFIG_MACRO_DIR([m4])
 
 OCTAVE_HOST_TYPE
 
@@ -87,7 +100,7 @@
 OCTAVE_SET_DEFAULT(man1ext, '.1')
 OCTAVE_SET_DEFAULT(doc_cache_file, '$(octetcdir)/doc-cache')
 OCTAVE_SET_DEFAULT(infofile, '$(infodir)/octave.info')
-OCTAVE_SET_DEFAULT(octincludedir, '$(includedir)/octave-$(version)')
+OCTAVE_SET_DEFAULT(octincludedir, '$(includedir)/octave-$(version)/octave')
 OCTAVE_SET_DEFAULT(fcnfiledir, '$(datadir)/octave/$(version)/m')
 OCTAVE_SET_DEFAULT(localfcnfiledir, '$(datadir)/octave/site/m')
 OCTAVE_SET_DEFAULT(localapifcnfiledir,
@@ -217,13 +230,7 @@
 gcc_version=`$CC -v 2>&1 | grep "^.*gcc version" | \
   sed -e 's/^.*g.. version *//' -e 's/cygnus-//' -e 's/egcs-//'`
 case "$gcc_version" in
-  2.*)
-    if test -z "$LDFLAGS"; then
-      LDFLAGS="-g"
-      AC_MSG_NOTICE([defining LDFLAGS to be $LDFLAGS])
-    fi
-  ;;
-  1.*)
+  [12].*)
     warn_gcc_version="gcc version $gcc_version is likely to cause problems"
     AC_MSG_WARN($warn_gcc_version)
   ;;
@@ -654,9 +661,8 @@
   [FFTW3F library not found.  The slower FFTPACK library will be used instead.],
   [fftw3.h], [fftwf_plan_dft_1d])
 
-if test -n "$FFTW3_LIBS" && test -n "$FFTW3F_LIBS"; then
-  FFT_DIR=
-fi
+AM_CONDITIONAL([AMCOND_HAVE_FFTW],
+  [test -n "$FFTW3_LIBS" && test -n "$FFTW3F_LIBS"])
 
 # Checks for GLPK header and library.
 
@@ -873,7 +879,20 @@
 
 OCTAVE_PROG_AR
 
-AC_PROG_RANLIB
+LT_PREREQ([2.2.2])
+LT_INIT([disable-static dlopen win32-dll])
+
+if test x$enable_shared = xyes; then
+  SHARED_LIBS=true
+else
+  SHARED_LIBS=false
+fi
+
+if test x$enable_static = xyes; then
+  STATIC_LIBS=true
+else
+  STATIC_LIBS=false
+fi
 
 XTRA_CRUFT_SH_LDFLAGS=
 case "$canonical_host_type" in
@@ -886,10 +905,11 @@
 
 ### Checks for BLAS and LAPACK libraries:
 # (Build subdirectories of libcruft if they aren't found on the system.)
-ACX_BLAS_WITH_F77_FUNC([], [BLAS_DIR="blas"])
-ACX_LAPACK([BLAS_LIBS="$LAPACK_LIBS $BLAS_LIBS"], [LAPACK_DIR="lapack"])
-AC_SUBST(BLAS_DIR)
-AC_SUBST(LAPACK_DIR)
+ACX_BLAS_WITH_F77_FUNC([:], [:])
+ACX_LAPACK([:], [:])
+
+AM_CONDITIONAL([AMCOND_HAVE_BLAS], [test x$acx_blas_ok = xyes])
+AM_CONDITIONAL([AMCOND_HAVE_LAPACK], [test x$acx_lapack_ok = xyes])
 
 if test "x$acx_blas_f77_func_ok" = "xno"; then
   warn_blas_f77_incompatible="A BLAS library was detected but found incompatible with your Fortran 77 compiler.  The reference BLAS implementation will be used. To improve performance, consider using a different Fortran compiler or a switch like -ff2c to make your Fortran compiler use a calling convention compatible with the way your BLAS library was compiled, or use a different BLAS library."
@@ -899,7 +919,7 @@
 # Check for the qrupdate library
 
 save_LIBS="$LIBS"
-LIBS="$BLAS_LIBS $FLIBS $LIBS"
+LIBS="$LAPACK_LIBS $BLAS_LIBS $FLIBS $LIBS"
 OCTAVE_CHECK_LIBRARY(qrupdate, qrupdate,
   [qrupdate not found.  The QR & Cholesky updating functions will be slow.],
   [],
@@ -957,7 +977,7 @@
 # then you will need to configure with --with-cholmod="-lcholmod -lcblas".
 
 save_LIBS="$LIBS"
-LIBS="$BLAS_LIBS $FLIBS $LIBS"
+LIBS="$LAPACK_LIBS $BLAS_LIBS $FLIBS $LIBS"
 OCTAVE_CHECK_LIBRARY(cholmod, CHOLMOD,
   [CHOLMOD library not found.  This will result in some lack of functionality for sparse matrices.],
   [suitesparse/cholmod.h ufsparse/cholmod.h cholmod/cholmod.h cholmod.h],
@@ -1019,39 +1039,19 @@
   [Fortran 77], [don't use the ARPACK library, disable eigs function])
 LIBS="$save_LIBS"
 
-### Handle shared library options.
-
-### Enable creation of static libraries.
-
-AC_ARG_ENABLE(static,
-  [AS_HELP_STRING([--enable-static], [create static libraries])],
-  [if test "$enableval" = no; then STATIC_LIBS=false;
-   else STATIC_LIBS=true; fi],
-  STATIC_LIBS=false)
-AC_SUBST(STATIC_LIBS)
-
-### Enable creation of shared libraries.  Currently only works with
-### gcc on some systems.
-
-AC_ARG_ENABLE(shared,
-  [AS_HELP_STRING([--enable-shared],
-     [create shared libraries (not all systems)])],
-  [if test "$enableval" = no; then SHARED_LIBS=false;
-   else SHARED_LIBS=true; fi],
-  SHARED_LIBS=true)
-AC_SUBST(SHARED_LIBS)
-
 ### Enable dynamic linking.  --enable-shared implies this, so
 ### --enable-dl is only need if you are only building static libraries
 ### and want to try dynamic linking too (works on some systems, for
 ### example, OS X and Windows).
 
-AC_ARG_ENABLE(dl,
-  [AS_HELP_STRING([--enable-dl],
-     [create shared libraries (not all systems)])],
-  [if test "$enableval" = no; then ENABLE_DYNAMIC_LINKING=false;
-   else ENABLE_DYNAMIC_LINKING=true; fi],
-  ENABLE_DYNAMIC_LINKING=true)
+AC_ARG_ENABLE([dl], [
+  AS_HELP_STRING([--enable-dl],
+    [create shared libraries (not all systems)])], [
+  case "${enableval}" in
+    yes) ENABLE_DYNAMIC_LINKING=true ;;
+    no) ENABLE_DYNAMIC_LINKING=false ;;
+    *) AC_MSG_ERROR([bad value ${enableval} for --enable-dl]) ;;
+  esac], [ENABLE_DYNAMIC_LINKING=true])
 
 if $STATIC_LIBS || $SHARED_LIBS; then
   true
@@ -1352,15 +1352,18 @@
 AC_CHECK_FUNCS(gethostname, [], [AC_CHECK_LIB(socket, gethostname)])
 AC_CHECK_FUNCS(getpwnam, [], [AC_CHECK_LIB(sun, getpwnam)])
 
+NO_UNDEFINED_LDFLAG=
 case "$canonical_host_type" in
   *-*-cygwin*)
    AC_CHECK_LIB(wsock32, gethostname)
    LIBS="$LIBS -lwsock32"
   ;;
   *-*-msdosmsvc* | *-*-mingw*)
-  LIBS="$LIBS -lgdi32 -lws2_32 -luser32 -lkernel32"
+    LIBS="$LIBS -lgdi32 -lws2_32 -luser32 -lkernel32"
+    NO_UNDEFINED_LDFLAG=-no-undefined
   ;;
 esac
+AC_SUBST(NO_UNDEFINED_LDFLAG)
 
 ### Type stuff.
 
@@ -1569,6 +1572,9 @@
 ### Dynamic linking is now enabled only if we are building shared
 ### libs and some API for dynamic linking is detected.
 
+## FIXME -- a lot of the following duplicates the functionality of
+## code generated by the dlopen option for LT_INIT.
+
 LD_CXX='$(CXX)'
 RDYNAMIC_FLAG=
 DL_API_MSG=""
@@ -1608,20 +1614,27 @@
       if test "$ac_cv_func_loadlibrary" = yes; then
         loadlibrary_api=true
       else
-        AC_CHECK_LIB(dl, dlopen, [DL_LIBS=-ldl; LIBS="$LIBS $DL_LIBS"])
-        AC_CHECK_FUNCS(dlopen dlsym dlerror dlclose)
-        if test "$ac_cv_func_dlclose" = yes \
-          && test "$ac_cv_func_dlerror" = yes \
-          && test "$ac_cv_func_dlopen" = yes \
-          && test "$ac_cv_func_dlsym" = yes; then
-          dlopen_api=true
-        else
-	  case "$canonical_host_type" in
-	    i[[3456]]86-*-sco3.2v5*)
-	      LD_CXX='LD_RUN_PATH=$LD_RUN_PATH:$(octlibdir) $(CXX)'
-	      dlopen_api=true
-	    ;;
-	  esac
+        ## With the dlopen option, LT_INIT has already checked for
+	## dlopen and the -ldl library.  So we just look at cache values.
+        if test "x$ac_cv_lib_dl_dlopen" = xyes; then
+	  DL_LIBS=-ldl;
+	  LIBS="$LIBS $DL_LIBS"
+        fi
+	if test "x$ac_cv_func_dlopen" = xyes \
+          || test "x$ac_cv_lib_dl_dlopen" = xyes; then
+          AC_CHECK_FUNCS(dlsym dlerror dlclose)
+          if test "x$ac_cv_func_dlclose" = xyes \
+            && test "x$ac_cv_func_dlerror" = xyes \
+            && test "x$ac_cv_func_dlsym" = xyes; then
+            dlopen_api=true
+          else
+	    case "$canonical_host_type" in
+	      i[[3456]]86-*-sco3.2v5*)
+	        LD_CXX='LD_RUN_PATH=$LD_RUN_PATH:$(octlibdir) $(CXX)'
+	        dlopen_api=
+	      ;;
+	    esac
+          fi
 	fi
       fi
     fi
@@ -1661,6 +1674,9 @@
   fi
 fi
 
+AM_CONDITIONAL([AMCOND_ENABLE_DYNAMIC_LINKING],
+  [test x$ENABLE_DYNAMIC_LINKING = xtrue])
+
 if $SHARED_LIBS; then
    LIBOCTINTERP=-loctinterp$SHLLINKEXT
    LIBOCTAVE=-loctave$SHLLINKEXT
@@ -1836,6 +1852,8 @@
 OCTAVE_PROG_PYTHON
 
 OCTAVE_PROG_FLEX
+AC_SUBST([LEX_OUTPUT_ROOT], [lex.octave_])
+
 OCTAVE_PROG_BISON
 
 AC_PROG_LN_S
@@ -1946,8 +1964,6 @@
 export CXX
 export F77
 
-AC_CONFIG_SUBDIRS(scripts)
-
 ### Some things to add to the bottom of config.h.
 
 AH_BOTTOM([
@@ -2154,28 +2170,24 @@
 
 ### Do the substitutions in all the Makefiles.
 
-AC_CONFIG_COMMANDS([Makefile], [if test "$ac_srcdir" != "."; then
-  cp $srcdir/Makefile .
-fi])
-
 AC_SUBST(ac_config_files)
 AC_SUBST(ac_config_headers)
 
-AC_CONFIG_FILES([octMakefile Makeconf m4/Makefile test/Makefile
-  doc/Makefile doc/faq/Makefile doc/interpreter/Makefile
-  doc/liboctave/Makefile doc/refcard/Makefile emacs/Makefile
-  examples/Makefile examples/@polynomial/Makefile 
-  examples/@FIRfilter/Makefile liboctave/Makefile
-  src/Makefile src/mxarray.h libcruft/Makefile
-  libcruft/Makerules libcruft/amos/Makefile libcruft/blas/Makefile
-  libcruft/daspk/Makefile libcruft/dasrt/Makefile
-  libcruft/dassl/Makefile libcruft/fftpack/Makefile
-  libcruft/lapack/Makefile 
-  libcruft/misc/Makefile libcruft/odepack/Makefile
-  libcruft/ordered-qz/Makefile libcruft/quadpack/Makefile
-  libcruft/ranlib/Makefile libcruft/slatec-fn/Makefile
-  libcruft/slatec-err/Makefile libcruft/villad/Makefile
-  libcruft/blas-xtra/Makefile libcruft/lapack-xtra/Makefile])
+AC_CONFIG_FILES([
+  Makefile 
+  doc/Makefile
+  doc/faq/Makefile
+  doc/interpreter/Makefile
+  doc/liboctave/Makefile
+  doc/refcard/Makefile
+  examples/Makefile
+  libcruft/Makefile
+  liboctave/Makefile
+  scripts/Makefile
+  src/Makefile
+  src/mxarray.h
+  src/version.h
+  test/Makefile])
 
 AC_OUTPUT
 
@@ -2185,77 +2197,77 @@
 
 Octave is now configured for $canonical_host_type
 
-  Source directory:     $srcdir
-  Installation prefix:  $prefix
-  C compiler:           $CC $XTRA_CFLAGS $WARN_CFLAGS $CFLAGS
-  C++ compiler:         $CXX $XTRA_CXXFLAGS $WARN_CXXFLAGS $CXXFLAGS
-  Fortran compiler:     $F77 $FFLAGS
-  Fortran libraries:    $FLIBS
-  Glob libraries:       $LIBGLOB
-  Lex libraries:        $LEXLIB
-  LIBS:                 $LIBS
+  Source directory:            $srcdir
+  Installation prefix:         $prefix
+  C compiler:                  $CC $XTRA_CFLAGS $WARN_CFLAGS $CFLAGS
+  C++ compiler:                $CXX $XTRA_CXXFLAGS $WARN_CXXFLAGS $CXXFLAGS
+  Fortran compiler:            $F77 $FFLAGS
+  Fortran libraries:           $FLIBS
+  Glob libraries:              $LIBGLOB
+  Lex libraries:               $LEXLIB
+  LIBS:                        $LIBS
 
-  AMD CPPFLAGS:         $AMD_CPPFLAGS
-  AMD LDFLAGS:          $AMD_LDFLAGS
-  AMD libraries:        $AMD_LIBS
-  ARPACK libraries:     $ARPACK_LIBS
-  BLAS libraries:       $BLAS_LIBS
-  CAMD CPPFLAGS:        $CAMD_CPPFLAGS
-  CAMD LDFLAGS:         $CAMD_LDFLAGS
-  CAMD libraries:       $CAMD_LIBS
-  CARBON libraries:     $CARBON_LIBS
-  CCOLAMD CPPFLAGS:     $CCOLAMD_CPPFLAGS
-  CCOLAMD LDFLAGS:      $CCOLAMD_LDFLAGS
-  CCOLAMD libraries:    $CCOLAMD_LIBS
-  CHOLMOD CPPFLAGS:     $CHOLMOD_CPPFLAGS
-  CHOLMOD LDFLAGS:      $CHOLMOD_LDFLAGS
-  CHOLMOD libraries:    $CHOLMOD_LIBS
-  COLAMD CPPFLAGS:      $COLAMD_CPPFLAGS
-  COLAMD LDFLAGS:       $COLAMD_LDFLAGS
-  COLAMD libraries:     $COLAMD_LIBS
-  CURL CPPFLAGS:        $CURL_CPPFLAGS
-  CURL LDFLAGS:         $CURL_LDFLAGS
-  CURL libraries:       $CURL_LIBS
-  CXSPARSE CPPFLAGS:    $CXSPARSE_CPPFLAGS
-  CXSPARSE LDFLAGS:     $CXSPARSE_LDFLAGS
-  CXSPARSE libraries:   $CXSPARSE_LIBS
-  DL libraries:         $DL_LIBS
-  FFTW3 CPPFLAGS:       $FFTW3_CPPFLAGS
-  FFTW3 LDFLAGS:        $FFTW3_LDFLAGS
-  FFTW3 libraries:      $FFTW3_LIBS
-  FFTW3F CPPFLAGS:      $FFTW3F_CPPFLAGS
-  FFTW3F LDFLAGS:       $FFTW3F_LDFLAGS
-  FFTW3F libraries:     $FFTW3F_LIBS
-  FLTK backend libs:    $GRAPHICS_LIBS
-  GLPK CPPFLAGS:        $GLPK_CPPFLAGS
-  GLPK LDFLAGS:         $GLPK_LDFLAGS
-  GLPK libraries:       $GLPK_LIBS
-  GraphicsMagick++
-    CPPFLAGS:           $MAGICK_CPPFLAGS
-    LDFLAGS:            $MAGICK_LDFLAGS
-    libraries:          $MAGICK_LIBS
-  HDF5 CPPFLAGS:        $HDF5_CPPFLAGS
-  HDF5 LDFLAGS:         $HDF5_LDFLAGS
-  HDF5 libraries:       $HDF5_LIBS
-  OPENGL libraries:     $OPENGL_LIBS
-  PTHREAD flags:        $PTHREAD_CFLAGS
-  PTHREAD libraries:    $PTHREAD_LIBS
-  QHULL CPPFLAGS:       $QHULL_CPPFLAGS
-  QHULL LDFLAGS:        $QHULL_LDFLAGS
-  QHULL libraries:      $QHULL_LIBS
-  QRUPDATE libraries:   $QRUPDATE_LIBS
-  READLINE libraries:   $READLINE_LIBS
-  REGEX libraries:      $REGEX_LIBS
-  TERM libraries:       $TERM_LIBS
-  UMFPACK libraries:    $UMFPACK_LIBS
-  X11 include flags:    $X11_INCFLAGS
-  X11 libraries:        $X11_LIBS
-  Z CPPFLAGS:           $Z_CPPFLAGS
-  Z LDFLAGS:            $Z_LDFLAGS
-  Z libraries:          $Z_LIBS
+  AMD CPPFLAGS:                $AMD_CPPFLAGS
+  AMD LDFLAGS:                 $AMD_LDFLAGS
+  AMD libraries:               $AMD_LIBS
+  ARPACK libraries:            $ARPACK_LIBS
+  BLAS libraries:              $BLAS_LIBS
+  CAMD CPPFLAGS:               $CAMD_CPPFLAGS
+  CAMD LDFLAGS:                $CAMD_LDFLAGS
+  CAMD libraries:              $CAMD_LIBS
+  CARBON libraries:            $CARBON_LIBS
+  CCOLAMD CPPFLAGS:            $CCOLAMD_CPPFLAGS
+  CCOLAMD LDFLAGS:             $CCOLAMD_LDFLAGS
+  CCOLAMD libraries:           $CCOLAMD_LIBS
+  CHOLMOD CPPFLAGS:            $CHOLMOD_CPPFLAGS
+  CHOLMOD LDFLAGS:             $CHOLMOD_LDFLAGS
+  CHOLMOD libraries:           $CHOLMOD_LIBS
+  COLAMD CPPFLAGS:             $COLAMD_CPPFLAGS
+  COLAMD LDFLAGS:              $COLAMD_LDFLAGS
+  COLAMD libraries:            $COLAMD_LIBS
+  CURL CPPFLAGS:               $CURL_CPPFLAGS
+  CURL LDFLAGS:                $CURL_LDFLAGS
+  CURL libraries:              $CURL_LIBS
+  CXSPARSE CPPFLAGS:           $CXSPARSE_CPPFLAGS
+  CXSPARSE LDFLAGS:            $CXSPARSE_LDFLAGS
+  CXSPARSE libraries:          $CXSPARSE_LIBS
+  DL libraries:                $DL_LIBS
+  FFTW3 CPPFLAGS:              $FFTW3_CPPFLAGS
+  FFTW3 LDFLAGS:               $FFTW3_LDFLAGS
+  FFTW3 libraries:             $FFTW3_LIBS
+  FFTW3F CPPFLAGS:             $FFTW3F_CPPFLAGS
+  FFTW3F LDFLAGS:              $FFTW3F_LDFLAGS
+  FFTW3F libraries:            $FFTW3F_LIBS
+  FLTK backend libs:           $GRAPHICS_LIBS
+  GLPK CPPFLAGS:               $GLPK_CPPFLAGS
+  GLPK LDFLAGS:                $GLPK_LDFLAGS
+  GLPK libraries:              $GLPK_LIBS
+  GraphicsMagick++ CPPFLAGS:   $MAGICK_CPPFLAGS
+  GraphicsMagick++ LDFLAGS:    $MAGICK_LDFLAGS
+  GraphicsMagick++ libraries:  $MAGICK_LIBS
+  HDF5 CPPFLAGS:               $HDF5_CPPFLAGS
+  HDF5 LDFLAGS:                $HDF5_LDFLAGS
+  HDF5 libraries:              $HDF5_LIBS
+  LAPACK libraries:            $LAPACK_LIBS
+  OPENGL libraries:            $OPENGL_LIBS
+  PTHREAD flags:               $PTHREAD_CFLAGS
+  PTHREAD libraries:           $PTHREAD_LIBS
+  QHULL CPPFLAGS:              $QHULL_CPPFLAGS
+  QHULL LDFLAGS:               $QHULL_LDFLAGS
+  QHULL libraries:             $QHULL_LIBS
+  QRUPDATE libraries:          $QRUPDATE_LIBS
+  READLINE libraries:          $READLINE_LIBS
+  REGEX libraries:             $REGEX_LIBS
+  TERM libraries:              $TERM_LIBS
+  UMFPACK libraries:           $UMFPACK_LIBS
+  X11 include flags:           $X11_INCFLAGS
+  X11 libraries:               $X11_LIBS
+  Z CPPFLAGS:                  $Z_CPPFLAGS
+  Z LDFLAGS:                   $Z_LDFLAGS
+  Z libraries:                 $Z_LIBS
 
-  Default pager:        $DEFAULT_PAGER
-  gnuplot:              $GNUPLOT
+  Default pager:               $DEFAULT_PAGER
+  gnuplot:                     $GNUPLOT
 
   Do internal array bounds checking:  $BOUNDS_CHECKING
   Build static libraries:             $STATIC_LIBS
--- a/doc/ChangeLog	Tue Nov 10 13:25:57 2009 -0500
+++ b/doc/ChangeLog	Tue Nov 10 15:02:25 2009 -0500
@@ -1,3 +1,16 @@
+2009-11-10  John W. Eaton  <jwe@octave.org>
+
+	* Makefile.am, faq/Makefile.am, interpreter/Makefile.am,
+	liboctave/Makefile.am, refcard/Makefile.am,
+	interpreter/config-images.sh, interpreter/images,
+	interpreter/images.awk: New files.
+	* Makefile.in, faq/Makefile.in, interpreter/Makefile.in,
+	liboctave/Makefile.in, refcard/Makefile.in: Delete.
+	* interpreter/munge-texi.cc (main, usage): Eliminate unnecessary
+	-d option.
+	* liboctave/liboctave.texi: Surround @direntry in appropriate magic.
+	* faq/OctaveFAQ.texi: Rename from faq/Octave-FAQ.texi.
+
 2009-10-23  Rik <octave@nomad.inbox5.com>
 
 	* various: Periodic grammar check of Octave documentation files to ensure
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/Makefile.am	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,52 @@
+# Makefile for octave's doc/interpreter directory
+#
+# Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+#               2002, 2003, 2005, 2006, 2007, 2008, 2009 John W. Eaton
+#
+# This file is part of Octave.
+# 
+# Octave is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation; either version 3 of the License, or (at
+# your option) any later version.
+# 
+# Octave is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with Octave; see the file COPYING.  If not, see
+# <http://www.gnu.org/licenses/>.
+
+TOPDIR = ..
+
+include ../common.mk
+
+EXTRA_DIST = \
+  Makefile.am \
+  ChangeLog \
+  conf.texi.in \
+  texinfo.tex \
+  texmf.cnf
+
+SUBDIRS = faq interpreter liboctave refcard
+
+all-local: conf.texi
+
+conf.texi: conf.texi.in $(TOPDIR)/common.mk
+	@echo "making $@ from $<"
+	@$(SED) < $< \
+	  -e "s|%abs_top_srcdir%|${abs_top_srcdir}|" \
+	  -e "s|%top_srcdir%|${top_srcdir}|" \
+	  -e "s|%OCTAVE_HOME%|${prefix}|" \
+	  -e "s|%OCTAVE_VERSION%|${version}|" \
+	  -e "s|%TEXINFO_COLAMD%|${TEXINFO_COLAMD}|" \
+	  -e "s|%TEXINFO_CHOLMOD%|${TEXINFO_CHOLMOD}|" \
+	  -e "s|%TEXINFO_UMFPACK%|${TEXINFO_UMFPACK}|" \
+	  -e "s|%TEXINFO_QHULL%|${TEXINFO_QHULL}|" > $@-t
+	$(simple_move_if_change_rule)
+
+../BUGS ../INSTALL.OCTAVE:
+	$(MAKE) -C interpreter ../$@
+.PHONY: ../BUGS ../INSTALL.OCTAVE
--- a/doc/Makefile.in	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +0,0 @@
-#
-# Makefile for octave's doc directory
-#
-# John W. Eaton
-# jwe@octave.org
-
-TOPDIR = ..
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-abs_top_srcdir = @abs_top_srcdir@
-VPATH = @srcdir@
-
-include $(TOPDIR)/Makeconf
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-
-SOURCES =
-
-DISTFILES = $(addprefix $(srcdir)/, Makefile.in conf.texi.in texinfo.tex texmf.cnf ChangeLog)
-
-SUBDIRS = faq interpreter liboctave refcard
-
-DISTSUBDIRS = $(SUBDIRS)
-
-all: conf.texi $(SUBDIRS)
-.PHONY: all
-
-conf.texi: conf.texi.in $(TOPDIR)/Makeconf
-	@$(do-subst-texinfo-vals)
-
-../BUGS ../INSTALL.OCTAVE:
-	$(MAKE) -C interpreter ../$@
-.PHONY: ../BUGS ../INSTALL.OCTAVE
-
-$(SUBDIRS):
-	$(MAKE) -C $@ all
-.PHONY: $(SUBDIRS)
-
-install install-strip uninstall clean mostlyclean distclean maintainer-clean::
-	@$(subdir-for-command)
-.PHONY: install install-strip uninstall
-.PHONY: clean mostlyclean distclean maintainer-clean
-
-tags TAGS:: $(SOURCES)
-	$(SUBDIR_FOR_COMMAND)
-
-tags::
-	ctags $(SOURCES)
-
-TAGS:: $(SOURCES)
-	etags $(SOURCES)
-
-distclean::
-	rm -f Makefile
-
-maintainer-clean::
-	rm -f tags TAGS Makefile
-
-dist:
-	ln $(DISTFILES) ../`cat ../.fname`/doc
-	for dir in $(DISTSUBDIRS); do mkdir ../`cat ../.fname`/doc/$$dir; $(MAKE) -C $$dir $@; done
-.PHONY: dist
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/faq/Makefile.am	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,39 @@
+# Makefile for octave's doc/faq directory
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005,
+#               2006, 2007 John W. Eaton
+#
+# This file is part of Octave.
+# 
+# Octave is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation; either version 3 of the License, or (at
+# your option) any later version.
+# 
+# Octave is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with Octave; see the file COPYING.  If not, see
+# <http://www.gnu.org/licenses/>.
+
+TOPDIR = ../..
+
+include ../../common.mk
+
+TEXINFO_TEX = ../texinfo.tex
+
+info_TEXINFOS = OctaveFAQ.texi
+
+OctaveFAQ_TEXINFOS = ../conf.texi
+
+../conf.texi:
+	$(MAKE) -C .. conf.texi
+
+all-local: dvi html pdf ps
+
+EXTRA_DIST = OctaveFAQ.dvi OctaveFAQ.html OctaveFAQ.pdf OctaveFAQ.ps
+
+.NOTPARALLEL:
--- a/doc/faq/Makefile.in	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,94 +0,0 @@
-# Makefile for octave's doc/faq directory
-#
-# Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005,
-#               2006, 2007 John W. Eaton
-#
-# This file is part of Octave.
-# 
-# Octave is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 3 of the License, or (at
-# your option) any later version.
-# 
-# Octave is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with Octave; see the file COPYING.  If not, see
-# <http://www.gnu.org/licenses/>.
-
-TOPDIR = ../..
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-
-include $(TOPDIR)/Makeconf
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-
-################################################################################
-
-TEXINFO := Octave-FAQ.texi
-
-FORMATTED := Octave-FAQ.info Octave-FAQ.dvi Octave-FAQ.ps Octave-FAQ.pdf
-
-DISTFILES := $(addprefix $(srcdir)/, Makefile.in $(TEXINFO) $(FORMATTED))
-
-SPELL := $(patsubst %.texi, %.spell, $(ALL_TEXINFO))
-
-%.spell : %.texi
-	rm -f $@
-	$(SED) -e 's/@@/ at /g' -e 's/@[a-zA-Z]*//g' $< | spell > $@.tmp
-	mv $@.tmp $@
-
-all: Octave-FAQ.info Octave-FAQ.dvi Octave-FAQ.ps Octave-FAQ.pdf Octave-FAQ.html
-.PHONY: all
-
-Octave-FAQ.info: $(TEXINFO)
-	-$(MAKEINFO) -I.. -I$(srcdir) -I$(srcdir)/.. $<
-
-Octave-FAQ.dvi: $(TEXINFO)
-	-TEXINPUTS="..:$(srcdir):$(srcdir)/..:$(TEXINPUTS):" \
-	  $(TEXI2DVI) $<
-
-Octave-FAQ.ps: Octave-FAQ.dvi
-	-dvips -o $@ $<
-
-Octave-FAQ.pdf: $(TEXINFO)
-	-TEXINPUTS="..:$(srcdir):$(srcdir)/..:$(TEXINPUTS):" \
-	  $(TEXI2PDF) $<
-
-Octave-FAQ.html: $(TEXINFO)
-	-$(MAKEINFO) --html --ifinfo --no-split --output=$@ -I.. -I$(srcdir) -I$(srcdir)/.. $<
-
-check install install-strip uninstall:
-.PHONY: check install install-strip uninstall
-
-spell: $(SPELL)
-.PHONY: spell
-
-mostlyclean clean:
-	rm -f Octave-FAQ.cp Octave-FAQ.fn Octave-FAQ.ky Octave-FAQ.pg \
-	Octave-FAQ.tp Octave-FAQ.vr Octave-FAQ.cps Octave-FAQ.fns \
-	Octave-FAQ.kys Octave-FAQ.pgs Octave-FAQ.tps Octave-FAQ.vrs \
-	Octave-FAQ.aux	Octave-FAQ.log Octave-FAQ.toc
-.PHONY: mostlyclean clean
-
-distclean: clean
-	rm -f Makefile
-.PHONY: distclean
-
-maintainer-clean: distclean
-	rm -f tags TAGS Octave-FAQ.info Octave-FAQ.info-*
-	rm -f Octave-FAQ.dvi Octave-FAQ.ps Octave-FAQ.pdf
-	rm -f Octave-FAQ.html
-.PHONY: maintainer-clean
-
-dist: all
-	ln $(DISTFILES) ../../`cat ../../.fname`/doc/faq
-.PHONY: dist
--- a/doc/faq/Octave-FAQ.texi	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1236 +0,0 @@
-% Copyright (C) 1997, 1998, 1999, 2001, 2003, 2004, 2005, 2007, 2008, 2009
-%               John W. Eaton
-%
-% This file is part of Octave.
-%
-% Octave is free software; you can redistribute it and/or modify it
-% under the terms of the GNU General Public License as published by the
-% Free Software Foundation; either version 3 of the License, or (at
-% your option) any later version.
-% 
-% Octave is distributed in the hope that it will be useful, but WITHOUT
-% ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-% FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-% for more details.
-% 
-% You should have received a copy of the GNU General Public License
-% along with Octave; see the file COPYING.  If not, see
-% <http://www.gnu.org/licenses/>.
-
-\input texinfo.tex      @c -*-texinfo-*-
-
-@setfilename Octave-FAQ.info
-@settitle Frequently asked questions about Octave (with answers)
-
-@setchapternewpage off
-@direntry
-* Octave-FAQ: (Octave-FAQ).  Frequently asked questions about Octave
-@end direntry
-@titlepage
-@title Octave FAQ
-@subtitle Frequently asked questions about Octave
-@subtitle September 2008
-@sp 1
-@author John W. Eaton and David Bateman
-@page
-@end titlepage
-
-@ifnottex
-@node Top
-@top
-@unnumbered Preface
-@cindex FAQ for Octave, latest version
-@end ifnottex
-
-This is a list of frequently asked questions (FAQ) for Octave users.
-
-We are always looking for new questions (@emph{with} answers), better
-answers, or both.  Please send suggestions to @email{bug@@octave.org}.
-If you have general questions about Octave, or need help for something
-that is not covered by the Octave manual or the FAQ, please use the
-@email{help@@octave.org} mailing list.
-
-This FAQ is intended to supplement, not replace, the Octave manual.
-Before posting a question to the @email{help@@octave.org} mailing list,
-you should first check to see if the topic is covered in the manual.
-
-@menu
-* What is Octave?::  
-* Licensing Issues::
-* How can I cite Octave?::  
-* Series 3.0.N::  
-* Octave Features::  
-* Learning more about Octave:: 
-* Getting Octave::  
-* Installation::  
-* Common problems::             
-* How do I ...?::  
-* MATLAB compatibility:: 
-* Index::                       
-@end menu
-
-@node What is Octave?
-@chapter What is Octave?
-
-Octave is a high-level interactive language, primarily intended for
-numerical computations that is mostly compatible with
-@sc{Matlab}.@footnote{@sc{Matlab} is a registered trademark of The MathWorks,
-Inc.} 
-
-Octave can do arithmetic for real, complex or integer-valued scalars
-and matrices, solve sets of nonlinear algebraic equations, integrate
-functions over finite and infinite intervals, and integrate systems of
-ordinary differential and differential-algebraic equations.
-
-Octave uses the GNU readline library to handle reading and editing
-input.  By default, the line editing commands are similar to the
-cursor movement commands used by GNU Emacs, and a vi-style line
-editing interface is also available.  At the end of each session, the
-command history is saved, so that commands entered during previous
-sessions are not lost.
-
-The Octave distribution includes a 590+ page Texinfo manual.  Access
-to the complete text of the manual is available via the help command
-@c really, the *complete* text?
-at the Octave prompt.
-
-@menu
-* Who develops Octave?::  
-* Why GNU Octave?::  
-* What version should I use?::  
-* On what platforms does Octave run?::  
-@end menu
-
-@node Who develops Octave?
-@section Who develops Octave?
-
-Discussions about writing the software that would eventually become
-Octave started in about 1988 with James B. Rawlings and John W. Eaton at
-the University of Texas.  John W. Eaton was the original author of
-Octave, starting full-time development in February 1992.  He is still
-the primary maintainer.  The community
-of users/developers has in addition contributed some code and fuels the
-discussion on the mailing lists @email{help@@octave.org} (user forum),
-@email{bug@@octave.org} (bug reports), @email{maintainers@@octave.org}
-(development issues), and @email{octave-dev@@lists.sourceforge.net} (all
-things related to the Octave Forge repository of user-contributed
-functions).
-
-@node Why GNU Octave?
-@section Why GNU Octave?
-
-The GNU Project was launched in 1984 to develop a complete Unix-like
-operating system which is free software: the GNU system.
-
-GNU is a recursive acronym for ``GNU's Not Unix''; it is pronounced
-guh-noo, approximately like canoe.
-
-The Free Software Foundation (FSF) is the principal organizational
-sponsor of the GNU Project.
-
-Octave became GNU Octave in 1997 (beginning with version 2.0.6).  This
-meant agreeing to consider Octave a part of the GNU Project and support
-the efforts of the FSF.  However, Octave is not and has never been
-developed by the FSF.
-
-For more information about the GNU project, see @url{www.gnu.org}.
-
-@cindex FSF [Free Software Foundation]
-@cindex GNU [GNU's not unix]
-
-@node What version should I use?
-@section What version should I use?
-
-In general, you will find the latest version on 
-@url{http://www.octave.org/download.html}.  It is
-recommended to use the ``testing'' version of octave for general use,
-and the ``development'' version if you want the latest features.
-
-A list of user-visible changes since the last release is available in
-the file @file{NEWS}.  The file @file{ChangeLog} in the source
-distribution contains a more detailed record of changes made since the
-last release.
-
-@node On what platforms does Octave run?
-@section On what platforms does Octave run?
-
-Octave runs on various Unices---at least Linux and Solaris, Mac OS X,
-Windows and anything you can compile it on.  Binary distributions exist
-at least for Debian, Suse, Fedora and RedHat Linuxes (Intel and AMD
-CPUs, at least), for Mac Os X and Windows' 98, 2000 and XP.
-
-Two and three dimensional plotting is fully supported using gnuplot.
-
-The underlying numerical solvers are currently standard Fortran ones
-like Lapack, Linpack, Odepack, the Blas, etc., packaged in a library
-of C++ classes.  If possible, the Fortran subroutines are compiled
-with the system's Fortran compiler, and called directly from the C++
-functions.  If that's not possible, you can still compile Octave if
-you have the free Fortran to C translator f2c.
-
-Octave is also free software; you can redistribute it and/or modify it
-under the terms of the GNU General Public License as published by the
-Free Software Foundation.
-
-@node Licensing Issues
-@chapter Licensing Issues
-
-@menu
-* If I write code using Octave do I have to release it under the GPL?: GPL
-* Since the MEX interface allows plugins to be distributed under terms that are incompatible with the GPL, does this mean that you are encouraging people to to write non-free software for Octave?: Licensing MEX Files
-* I wrote a program that links with Octave libraries and I don't want to release it under the terms of the GPL.  Will you change the license of the Octave libraries for me?: Requesting License Changes
-@end menu
-
-@node GPL
-@section If I write code using Octave do I have to release it under the GPL?
-
-The answer depends on precisely how the code is written and how it works.
-
-Code written entirely in the scripting language of Octave
-(interpreted code in .m files) may be released under the terms of
-whatever license you choose.
-
-Code written using Octave's native plug-in interface (also known
-as a .oct file) necessarily links with Octave internals and is
-considered a derivative work of Octave and therefore must be
-released under terms that are compatible with the GPL.
-
-Code written using Octave's implementation of the Matlab MEX
-interface may be released under the terms of whatever license you
-choose, provided that the following conditions are met:
-
-@enumerate
-@item
-The plugin should not use any bindings that are specific to Octave.  In
-other words, the MEX file must use the MEX interface only, and not also
-call on other Octave internals.  It should be possible in principle to
-use the MEX file with other programs that implement the MEX interface
-(e.g., Matlab).
-
-@item
-The MEX file should not be distributed together with Octave in such a
-way that they effectively create a single work.  For example, you should
-not distribute the MEX file and Octave together in a single package such
-that Octave automatically loads and runs the MEX file when it starts up.
-There are other possible ways that you might effectively create a single
-work; this is just one example.
-@end enumerate
-
-A program that embeds the Octave interpreter (e.g., by calling the
-"octave_main" function), or that calls functions from Octave's
-libraries (e.g., liboctinterp, liboctave, or libcruft) is
-considered a derivative work of Octave and therefore must be
-released under terms that are compatible with the GPL.
-
-@node Licensing MEX Files
-@section Since the MEX interface allows plugins to be distributed under terms that are incompatible with the GPL, does this mean that you are encouraging people to to write non-free software for Octave?
-
-No.  The original reason for implementing the MEX interface for Octave
-was to allow Octave to run free software that uses MEX files (the
-particular goal was to run SundialsTB in Octave).  The intent was to
-liberate that software from Matlab and increase the amount of free
-software available to Octave users, not to enable people to write
-proprietary code for Octave.  For the good of the community, we strongly
-encourage users of Octave to release the code they write for Octave
-under terms that are compatible with the GPL.
-
-@node Requesting License Changes
-@section I wrote a program that links with Octave libraries and I don't want to release it under the terms of the GPL.  Will you change the license of the Octave libraries for me?
-
-No.  Instead of asking us to change the licensing terms for Octave, we
-recommend that you release your program under terms that are compatible
-with the GPL so that the free software community can benefit from your
-work the same as you have benefitted from the work of all the people who
-have contributed to Octave.
-
-@node How can I cite Octave?
-@chapter How can I cite Octave?
-
-Pointing to @url{http://www.octave.org} is good, because that gives
-people a direct way to find out more.  If citation of a URL is not
-allowed by a publisher, or if you also want to point to a traditional
-reference, then you can cite the Octave manual:
-
-@example
-@group
-@@BOOK@{eaton:2008,
-  author =     "John W. Eaton and David Bateman and Søren Hauberg",
-  title =      "GNU Octave Manual Version 3",
-  publisher =  "Network Theory Limited",
-  year =       "2008",
-  isbn =       "0-9546120-6-X"
-@}
-@end group
-@end example
-
-@node Series 3.0.N
-@chapter What's new in version series 3.0.N and 3.1.N of Octave
-
-The 3.0.N series has enough new features to justify a major version
-number change. The 3.0.N series brings
-
-@itemize @bullet
-
-@item integer types
-
-@item fixed point arithmetic
-
-@item sparse matrices
-
-@item Linear programming code based on GLPK
-
-@item 64-bit compilation support
-
-@item gzipped files and stream and consequently support of matlab v7 files
-
-@item better support for both msvc and mingw
-
-@item a fully compatible MEX interface
-
-@item many many other minor features and compatibility changes
-
-@end itemize
-
-Here are some features that have been around since 2.1.N
-
-@itemize @bullet
-
-@item NDarrays 
-
-@item cells
-
-@end itemize
-
-The 3.1.N series is the current development release and will become a
-3.2.N release in the future. This series brings the new features
-
-@itemize
-@item OpenGL backend
-
-An experimental OpenGL graphics backend to replace the gnuplot
-
-@item Object Orient Programming
-
-@item Block comments
-
-@item imwrite and imread 
-
-The functions are based on the GraphicsMagick library.
-
-@item Lazy transpose
-
-Special treatment in the parser of things like "a' * b", where the
-transpose is never explicitly formed but a flag is rather passed to the
-underlying LAPACK code.
-
-@item Single precision type
-
-@item Improved array indexing
-The underlying code used for indexing of arrays has been completely
-rewritten and so the indexing of arrays is now significantly faster.
-@end itemize
-
-
-@node Octave Features
-@chapter What features are unique to Octave?
-
-@menu
-* Functions defined on the command-line::
-* Comments with #::            
-* Strings delimitted by double quotes "::
-* Line continuation by backslash::
-* Informative block closing::
-* Coherent syntax::             
-* Exclamation mark as not operator::
-* Increment and decrement operators::  
-* Unwind-protect::              
-* Built-in ODE and DAE solvers::
-@end menu
-
-This section refers to Matlab R2008b and Octave 2.1.51.
-
-@node Functions defined on the command-line
-@section Functions defined on the command-line
-
-Functions can be defined by entering code on the command line, a
-feature not supported by the other leading brand.  For example, you may
-type:
-
-@example
-@group
-octave:1> function s = hello_string (to_who)
-> ## Say hello 
-> if nargin<1, to_who = "World"; end
-> s = ["Hello ",\
->      to_who];
-> endfunction
-octave:2> hello_string ("Moon")
-ans = Hello Moon
-@end group
-@end example
-
-@node Comments with #           
-@section Comments with #
-
-The pound character, @samp{#}, may be used to start comments, in addition
-to @samp{%}.  See the previous example.  The major advantage of this is
-that as @samp{#} is also a comment character for unix script files, any
-file that starts with a string like @samp{#! /usr/bin/octave -q} will be
-treated as an octave script and be executed by octave.
-
-@node Strings delimitted by double quotes " 
-@section Strings delimitted by double quotes " 
-The double quote, @samp{"}, may be used to delimit strings, in addition to
-the single quote @samp{'}.  See the previous example.  Also, double-quoted
-strings include backslash interpretation (like C++, C, and Perl) while
-single quoted are uninterpreted (like Matlab and Perl).
- 
-@node Line continuation by backslash 
-@section Line continuation by backslash 
-
-Lines can be continued with a backslash, @samp{\}, in addition to three
-points @samp{@dots{}}.  See the previous example.
-
-@node Informative block closing
-@section Informative block closing
-
-You may close @code{function}, @code{for}, @code{while}, @code{if},
-@dots{} blocks with @code{endfunction}, @code{endfor}, @code{endwhile},
-@dots{} keywords in addition to using @code{end}.  As with Matlab, the
-@code{end} (or @code{endfunction}) keyword that marks the end of a
-function defined in a @file{.m} file is optional.
-
-@node Coherent syntax
-@section Coherent syntax
-
-Indexing other things than variables is possible, as in:
-@example
-@group
-octave:1> [3 1 4 1 5 9](3)
-ans = 4
-octave:2> cos([0 pi pi/4 7])(3)
-ans = 0.70711
-@end group
-@end example
-
-@node Exclamation mark as not operator
-@section Exclamation mark as not operator
-
-The exclamation mark '!' (aka ``Bang!'') is a negation operator, just
-like the tilde '~':
-
-@example
-@group
-octave:1> if ! strcmp (program_name, "octave"),
->   "It's an error"
-> else
->   "It works!"
-> end
-ans = It works!
-@end group
-@end example
-
-@node Increment and decrement operators
-@section Increment and decrement operators
-
-@cindex Increment operators
-@cindex Decrement operators
-@cindex Operators, increment
-@cindex Operators, decrement
-
-If you like the @samp{++}, @samp{+=} etc operators, rejoice!
-Octave includes the C-like increment and decrement operators @samp{++}
-and @samp{--} in both their prefix and postfix forms, in addition to
-@samp{+=}, @samp{-=}, @samp{*=}, @samp{/=}, @samp{^=}, @samp{.*=},
-@samp{./=}, and @samp{.^=}.
-
-For example, to pre-increment the variable @var{x}, you would write
-@code{++@var{x}}.  This would add one to @var{x} and then return the new
-value of @var{x} as the result of the expression.  It is exactly the
-same as the expression @code{@var{x} = @var{x} + 1}.
-
-To post-increment a variable @var{x}, you would write @code{x++}.
-This adds one to the variable @var{x}, but returns the value that
-@var{x} had prior to incrementing it.  For example, if @var{x} is equal
-to 2, the result of the expression @code{x++} is 2, and the new
-value of @var{x} is 3.
-
-For matrix and vector arguments, the increment and decrement operators
-work on each element of the operand.
-
-
-@node Unwind-protect
-@section Unwind-protect
-
-@cindex Unwind-protect
-
-Octave supports a limited form of exception handling modelled after the
-unwind-protect form of Lisp.  The general form of an
-@code{unwind_protect} block looks like this:
-
-@example
-@group
-unwind_protect
-  @var{body}
-unwind_protect_cleanup
-  @var{cleanup}
-end_unwind_protect
-@end group
-@end example
-
-@noindent
-Where @var{body} and @var{cleanup} are both optional and may contain any
-Octave expressions or commands.  The statements in @var{cleanup} are 
-guaranteed to be executed regardless of how control exits @var{body}.
-
-The @code{unwind_protect} statement is often used to reliably restore
-the values of global variables that need to be temporarily changed.
-
-Matlab can be made to do something similar with their @code{OnCleanUp}
-function that was introduced in 2008a.
-
-@node Built-in ODE and DAE solvers
-@section Built-in ODE and DAE solvers
-
-@cindex DASSL
-@cindex LSODE
-
-Octave includes LSODE and DASSL for solving systems of stiff ordinary
-differential and differential-algebraic equations.  These functions are
-built in to the interpreter.
-
-@node Learning more about Octave
-@chapter What documentation exists for Octave?
-
-@menu
-* Documentation::
-* Getting additional help::            
-* User community::
-* Bug reports::
-@end menu
-
-
-@node Documentation
-@section What documentation exists for Octave?
-
-@cindex Octave, documentation
-
-The Octave distribution includes a 590+ page manual that is also
-distributed under the terms of the GNU GPL.
-It is available on the web at
-@url{http://www.octave.org/docs.html} and you will also
-find there instructions on how to order a paper version.
-
-The complete text of the Octave manual is also available using the GNU
-Info system via the GNU Emacs, info, or xinfo programs, or by using
-the @samp{help -i} command to start the GNU info browser directly from
-the Octave prompt.
-
-If you have problems using this documentation, or find that some topic
-is not adequately explained, indexed, or cross-referenced, please send
-a bug report to @email{bug@@octave.org}.
-
-
-@node Getting additional help
-@section Getting additional help
-
-@cindex Additional help
-@cindex Mailing lists, help-octave
-
-If you can't find an answer to your question, the
-@email{help@@octave.org} mailing list is available for questions related
-to using, installing, and porting Octave that are not adequately
-answered by the Octave manual or by this document.
-
-@node User community
-@section User community
-
-To subscribe to the list, go to @url{www.octave.org/archive.html} and
-follow the link to the subscription page for the list.
-
-@strong{Please do not} send requests to be added or removed from the
-mailing list, or other administrative trivia to the list itself.
-
-An archive of old postings to the help-octave mailing list is maintained
-on @url{http://www.octave.org/archive.html}.
-
-You will also find some user advice and code spread over the web.  Good
-starting points are the Octave Wiki @url{http://wiki.octave.org} and
-Octave-Forge @url{http://octave.sourceforge.net}
-
-@node Bug reports
-@section I think I have found a bug in Octave.
-
-@cindex Bug in Octave, newly found
-
-``I think I have found a bug in Octave, but I'm not sure.  How do I know,
-and who should I tell?''
-
-@cindex Manual, for Octave
-
-First, see the section on bugs and bug reports in the Octave manual.
-When you report a bug, make sure to describe the type of computer you
-are using, the version of the operating system it is running, and the
-version of Octave that you are using.  Also provide enough code so that
-the Octave maintainers can duplicate your bug.
-
-If you have Octave working at all, the easiest way to do this is to use
-the Octave function @code{bug_report}.  When you execute this function,
-Octave will prompt you for a subject and then invoke the editor on a
-file that already contains all the configuration information.  When you
-exit the editor, Octave will mail the bug report for you (in a unix-like
-operating system).
-
-@cindex Octave bug report
-@cindex Mailing lists, bug-octave
-
-If for some reason you cannot use Octave's @code{bug_report} function,
-mail your bug report to @email{bug@@octave.org}.  Your message needs to
-include enough information to allow the maintainers of Octave to fix the
-bug.  Please read the section on bugs and bug reports in the Octave
-manual for a list of things that should be included in every bug report.
-
-
-@node Getting Octave
-@chapter Getting Octave
-
-@menu
-* Source code::  
-* Pre-compiled binary packages::
-* Octave for other platforms::
-@end menu
-
-@node Source code
-@section Source code
-@cindex Source code
-
-Source code is available on the Octave development site, where you are
-sure to get the latest version.
-
-@itemize @bullet
-@item @url{http://www.octave.org/download.html}
-@item @url{ftp://ftp.octave.org/pub/octave/}
-@end itemize
-
-Since Octave is distrubted under the terms of the GPL, you can get
-Octave from a friend who has a copy, by anonymous FTP, or by ordering
-a tape or CD-ROM from the Free Software Foundation (FSF).
-
-@node Pre-compiled binary packages
-@section Pre-compiled binary packages
-@cindex  Pre-compiled binary packages
-@cindex  Binaries
-
-The Octave project does not distribute binary packages, but other
-projects do.  For an up-to-date listing of packagers, see:
-
-@itemize @bullet
-@item @url{http://www.octave.org/download.html}
-@item @url{http://wiki.octave.org/wiki.pl?CategoryInstall}
-@end itemize
-
-As of today, Octave binaries are available at least on Debian, RedHat,
-Suse and Fedora Linuxes, Mac OS X, Windows' 98, 2000 and XP.
-
-@node Octave for other platforms
-@section How do I get a copy of Octave for (some other platform)?
-
-@cindex VMS support
-@cindex VAX
-@cindex MS-DOS support
-@cindex Windows support
-@cindex DJGPP
-@cindex EMX
-@cindex OS/2 support
-
-Octave currently runs on Unix-like systems, Mac OS X, and Windows.
-It should be possible to make Octave work on other systems as well.  
-If you are interested in porting Octave to other systems, please contact
-@email{bug@@octave.org}.
-
-@c @menu
-@c * Octave for Unix::             
-@c * Octave for other platforms::  
-@c * latest versions::             
-@c @end menu
-
-@c @cindex Octave, ordering
-@c @cindex Octave, getting a copy
-
-@node Installation
-@chapter Installation Issues and Problems
-
-@cindex Octave, building 
-
-Octave 3.2 require approximately 800MB of disk storage to unpack
-and compile from source (considerably less if you don't compile with
-debugging symbols).  Once installed, Octave requires approximately 200MB
-of disk space (again, considerably less if you don't compile with
-debugging symbols).
-
-@menu
-* What else do I need?::        
-* Other C++ compilers?::        
-@end menu
-
-@node What else do I need?
-@section What else do I need?
-
-@cindex GNU gcc
-@cindex GNU g++
-@cindex libg++
-@cindex GNU Make
-@cindex Flex
-@cindex GNU Bison
-
-To compile Octave, you will need a recent version of GNU Make.  You
-will also need GCC 3.3 or later, although GCC 4.1 or later is 
-recommended.
-
-@strong{You must have GNU Make to compile octave}.  Octave's Makefiles
-use features of GNU Make that are not present in other versions of make.
-GNU Make is very portable and easy to install.
-
-@node Other C++ compilers?
-@section Can I compile Octave with another C++ compiler?
-
-Yes, but development is done primarily with GCC, so you may hit some
-incompatibilities.  Octave is intended to be portable to any standard
-conforming compiler.  If you have difficulties that you think are bugs,
-please report them to the @email{bug@@octave.org} mailing list, or ask
-for help on the @email{help@@octave.org} mailing list.
-
-@node Common problems
-@chapter Common problems
-
-This list is probably far too short.  Feel free to suggest additional
-questions (preferably with answers!)
-
-@itemize @bullet
-@item
-Octave takes a long time to find symbols.
-
-Octave uses the @code{genpath} function to recursively add directories
-to the list of directories searched for function files.  Check the list
-of directories with the @code{path} command. If the path list is very
-long check your use of the @code{genpath} function.
-
-@item
-When plotting Octave occasionally gives me errors like @samp{gnuplot> 9 0.735604
-line 26317: invalid command}.
-
-There is a known bug in gnuplot 4.2 that can cause an off by one error
-while piping data to gnuplot. The relevant gnuplot bug report can be
-found at @url{http://sourceforge.net/tracker/index.php?func=detail&aid=1716556&group_id=2055&atid=102055}
-
-If you have obtained your copy of Octave from a distribution please file
-a bug report requesting that the fix reported in the above bug report be
-included.
-
-@item
-I cannot install a package. Octave complains about a missing @code{mkoctfile}.
-
-Most distributions split Octave into several packages. The script
-@code{mkoctfile} is then part of a separate package:
-@itemize @minus
-@item
-Debian/Ubuntu
-
-@code{aptitude install octave3.0-headers}
-
-@item
-Fedora
-
-@code{yum install octave-devel}
-
-@end itemize
-@end itemize
-
-@node How do I ...?
-@chapter  How do I ...?
-
-@menu
-* How do I set the number of displayed decimals?::
-@end menu
-
-@cindex Tips and tricks
-@cindex How do I @dots{} ?
-
-@node How do I set the number of displayed decimals?
-@section How do I set the number of displayed decimals?
-
-@example
-@group
-octave:1> format long
-octave:2> pi
-pi = 3.14159265358979
-octave:3> format short
-octave:4> pi
-pi = 3.1416
-@end group
-@end example
-
-@node MATLAB compatibility
-@chapter Porting programs from @sc{Matlab} to Octave
-
-@cindex @sc{Matlab} compatibility
-@cindex Compatibility with @sc{Matlab}
-
-People often ask
-
-``I wrote some code for @sc{Matlab}, and I want to get it running under
-Octave.  Is there anything I should watch out for?''
-
-or alternatively
-
-``I wrote some code in Octave, and want to share it with @sc{Matlab}
-users.  Is there anything I should watch out for?''
-
-which is not quite the same thing.  There are still a number of
-differences between Octave and @sc{Matlab}, however in general
-differences between the two are considered as bugs.  Octave might
-consider that the bug is in @sc{Matlab} and do nothing about it, but
-generally functionality is almost identical.  If you find a difference
-between Octave behavior and @sc{Matlab}, then you should send a
-description of this difference (with code illustrating the difference,
-if possible) to @email{bug@@octave.org}.
-
-Furthermore, Octave adds a few syntactical extensions to Matlab that
-might cause some issues when exchanging files between Matlab and Octave
-users. As both Octave and @sc{Matlab} are under constant development the
-information in this section is subject to change at anytime.
-
-You should also look at the page
-@url{http://octave.sourceforge.net/packages.html} and
-@url{http://octave.sourceforge.net/doc/} that has a function reference
-that is up to date. You can use this function reference to see the
-number of octave function that are available and their @sc{Matlab}
-compatibility.
-
-The major differences between Octave 3.2.N and  @sc{Matlab} R2008a are:
-
-@itemize @bullet
-@item Nested Functions
-
-Octave doesn't yet have nested functions. That is
-
-@example
-@group
-function y = foo (x)
-  y = bar(x)
-  function y = bar (x)
-    y = @dots{};
-  end
-end
-@end group
-@end example
-
-There was discussion in Octave of having these even prior to @sc{Matlab},
-and the decision was made not to have these in Octave at the time for
-compatibility.  The above written with sub-functions functions would be
-
-@example
-@group
-function y = foo (x)
-   y = bar(x)
-end
-function y = bar (x)
-   y = @dots{};
-end
-@end group
-@end example
-
-Now that @sc{Matlab} has recently introduced nested functions, Octave will
-probably have them soon as well.  Until then nested functions in Octave
-are treated as sub-functions with the same scoping rules as
-sub-functions.  
-
-The authors of Octave consider the nested function scoping rules of
-Matlab to be more problems than they are worth as they introduce
-diffiult to find bugs as inadvertantly modifying a variable in a
-nested function that is also used in the parent is particularly easy.
-
-@item Differences in core syntax
-There a few core @sc{Matlab} syntaxes that are not accepted by Octave,
-these being
-
-@itemize @bullet
-@item
-Some limitations on the use of function handles. The major difference is
-related to nested function scoping rules (as above) and their use with
-function handles.
-
-@item
-Some limitations of variable argument lists on the LHS of an expression,
-though the most common types are accepted.
-
-@item
-@sc{Matlab} classdef object oriented programming is not yet supportted,
-though work is underway and when development more on to Octave 3.3 this
-will be included in teh development tree.
-@end itemize
-
-@item Differences in core functions
-A large number of the @sc{Matlab} core functions (ie those that are in
-the core and not a toolbox) are implemented, and certainly all of the
-commonly used ones. There are a few functions that aren't implemented,
-for example @code{condest} or to do with specific missing Octave functionality
-(gui, dll, java, activex, dde, web, and serial functions). Some of the
-core functions have limitations that aren't in the @sc{Matlab}
-version.  For example the @code{sprandn} function can not force a
-particular condition number for the matrix like @sc{Matlab} can.
-
-@item Just-In-Time compiler
-@sc{Matlab} includes a "Just-In-Time" compiler. This compiler allows the
-acceleration of for-loops in @sc{Matlab} to almost native performance with
-certain restrictions. The JIT must know the return type of all functions
-called in the loops and so you can't include user functions in the loop
-of JIT optimized loops.  Octave doesn't have a JIT and so to some might
-seem slower than @sc{Matlab}.  For this reason you must vectorize your code as
-much as possible.  The MathWorks themselves have a good document
-discussing vectorization at
-@url{http://www.mathworks.com/support/tech-notes/1100/1109.html}.
-
-@item Compiler
-On a related point, there is no Octave compiler, and so you can't
-convert your Octave code into a binary for additional speed or
-distribution.  There is an example of how to do this at
-@url{http://www.stud.tu-ilmenau.de/~rueckn/}, but this is a very early
-example code and would need lots of work to complete it.
-
-@item Graphic Handles
-Up to Octave 2.9.9 there was no support for graphic handles in Octave
-itself.  In the 3.2.N versions of Octave the support for graphics
-handles is converging towards full compatibility. The @code{patch}
-function is currently limited to 2-D patches, due to an underlying
-limitation in gnuplot.
-
-@item GUI 
-There are no @sc{Matlab} compatible GUI functions.  There are a number of
-bindings from Octave to Tcl/Tk, Vtk and zenity included in the
-Octave Forge project (@url{http://octave.sourceforge.net}) for example
-that can be used for a GUI, but these are not @sc{Matlab}
-compatible. Work on a matlab compatible GUI is in an alpha stage in the
-JHandles package (@url{http://octave.sourceforge.net/jhandles/index.html}).
-This might be an issue if you intend to exchange Octave code with 
-@sc{Matlab} users.
-
-@item Simulink
-Octave itself includes no Simulink support. Typically the simulink
-models lag research and are less flexible, so shouldn't really be used
-in a research environment.  However, some @sc{Matlab} users that try to
-use Octave complain about this lack.  There is a similar package to
-simulink for the Octave and R projects available at
-@url{http://www.scicraft.org/}
-
-@item Mex-Files
-Octave includes an API to the matlab MEX interface. However, as MEX is
-an API to the internals of @sc{Matlab} and the internals of Octave
-differ from @sc{Matlab}, there is necessarily a manipulation of the data
-to convert from a MEX interface to the Octave equivalent. This is
-notable for all complex matrices, where @sc{Matlab} stores complex
-arrays as real and imaginary parts, whereas Octave respects the C99/C++
-standards of co-locating the real/imag parts in memory.  Also due to the
-way @sc{Matlab} allows access to the arrays passed through a pointer,
-the MEX interface might require copies of arrays (even non complex
-ones).
-
-@item Block comments
-Block comments denoted by "%@{" and "%@}" markers are supported by
-Octave with some limitations. The major limitation is that block
-comments are not supported within [] or @{@}.
-
-@item Mat-File format
-There are some differences in the mat v5 file format accepted by
-Octave. @sc{Matlab} recently introduced the "-V7.3" save option which is
-an HDF5 format which is particularly useful for 64-bit platforms where
-the standard matlab format can not correctly save variables.. Octave
-accepts HDF5 files, but is not yet compatible with the "-v7.3" versions
-produced by @sc{Matlab}. 
-
-Although Octave can load inline abd function handles saved by
-@sc{Matlab}, it can not yet save them.
-
-Finally, Some multi-byte unicode characters aren't yet treated in
-mat-files.
-
-@item Profiler
-Octave doesn't have a profiler. Though there is a patch for a flat
-profiler, that might become a real profiler sometime in the future. see
-the thread
-
-@url{http://www.cae.wisc.edu/pipermail/octave-maintainers/2007-January/001685.html}
-
-for more details
-
-@item Toolboxes
-Octave is a community project and so the toolboxes that exist are
-donated by those interested in them through the Octave Forge website
-(@url{http://octave.sourceforge.net}). These might be lacking in certain
-functionality relative to the @sc{Matlab} toolboxes, and might not
-exactly duplicate the matlab functionality or interface.
-
-@item Short-circuit & and | operators
-The @code{&} and @code{|} operators in @sc{Matlab} short-circuit when
-included in an if statemant and not otherwise.  In Octave only the
-@code{&&} and @code{||} short circuit.  Note that this means that
-
-@example
-@group
-  if (a | b)
-    @dots{}
-  end
-@end group
-@end example
-
-and
-  
-@example
-@group
-  t = a | b;
-  if t
-    @dots{}
-  end
-@end group
-@end example
-
-@noindent
-are different in @sc{Matlab}. This is really a @sc{Matlab} bug, but
-there is too much code out there that relies on this behavior to change
-it. Prefer the || and && operators in if statements if possible.
-
-Note that the difference is also significant when either argument is a
-function with side effects or if the first argument is a scalar and the
-second argument is an empty matrix.  For example, note the difference
-between
-
-@example
-@group
-  t = 1 | [];          ## results in [], so...
-  if (t) 1, end        ## in if ([]), this is false.
-@end group
-@end example
-
-and
-
-@example
-  if (1 | []) 1, end   ## short circuits so condition is true.
-@end example
-
-Another case that is documented in the @sc{Matlab} manuals is that
-
-@example
-@group
-  t = [1, 1] | [1, 2, 3];          ## error
-  if ([1, 1] | [1, 2, 3]) 1, end   ## OK
-@end group
-@end example
-
-Also @sc{Matlab} requires the operands of && and || to be scalar values but
-Octave does not (it just applies the rule that for an operand to be
-considered true, every element of the object must be nonzero or
-logically true).
-
-Finally, note the inconsistence of thinking of the condition of an if
-statement as being equivalent to @code{all(X(:))} when @var{X} is a
-matrix.  This is true for all cases EXCEPT empty matrices:
-
-@example
-@group
-  if ([0, 1]) == if (all ([0, 1]))   ==>  i.e., condition is false.
-  if ([1, 1]) == if (all ([1, 1]))   ==>  i.e., condition is true.
-@end group
-@end example
-
-However,
-
-@example
-  if ([]) != if (all ([]))
-@end example
-
-because @code{samp ([]) == 1} (because, despite the name, it is really
-returning true if none of the elements of the matrix are zero, and since
-there are no elements, well, none of them are zero).  But, somewhere
-along the line, someone decided that if @code{([])} should be false.
-Mathworks probably thought it just looks wrong to have @code{[]} be true
-in this context even if you can use logical gymnastics to convince
-yourself that "all" the elements of a matrix that doesn't actually have
-any elements are nonzero. Octave however duplicates this behavior for if
-statements containing empty matrices.
-
-@item Solvers for singular, under- and over-determined matrices
-
-Matlab's solvers as used by the operators mldivide (\) and mrdivide (/),
-use a different approach than Octave's in the case of singular, under-, 
-or over-determined matrices. In the case of a singular matrix, Matlab
-returns the result given by the LU decomposition, even though the underlying
-solver has flagged the result as erroneous. Octave has made the choice
-of falling back to a minimum norm solution of matrices that have been
-flagged as singular which arguably is a better result for these cases.
-
-In the case of under- or over-determined matrices, Octave continues to
-use a minimum norm solution, whereas Matlab uses an approach that is
-equivalent to
-
-@example
-@group
-function x = mldivide (A, b)
-  [Q, R, E] = qr(A);
-  x = [A \ b, E(:, 1:m) * (R(:, 1:m) \ (Q' * b))]
-end
-@end group
-@end example
-
-@noindent
-While this approach is certainly faster and uses less memory than
-Octave's minimum norm approach, this approach seems to be inferior in
-other ways.
-
-A numerical question arises: how big can the null space component become,
-relative to the minimum-norm solution? Can it be nicely bounded, or can it be
-arbitrarily big? Consider this example:
-
-@example
-@group
-m = 10; 
-n = 10000; 
-A = ones(m, n) + 1e-6 * randn(m,n); 
-b = ones(m, 1) + 1e-6 * randn(m,1); 
-norm(A \ b)
-@end group
-@end example
-
-@noindent
-while Octave's minimum-norm values are around 3e-2, Matlab's results
-are 50-times larger. For another issue, try this code:
-
-@example
-@group
-m = 5; 
-n = 100; 
-j = floor(m * rand(1, n)) + 1; 
-b = ones(m, 1);
-A = zeros(m, n);
-A(sub2ind(size(A),j,1:n)) = 1;
-x = A \ b; 
-[dummy,p] = sort(rand(1,n)); 
-y = A(:,p)\b; 
-norm(x(p)-y)
-@end group
-@end example
-
-@noindent
-It shows that unlike in Octave, mldivide in Matlab is not invariant
-with respect to column permutations. If there are multiple columns of
-the same norm, permuting columns of the matrix gets you different
-result than permuting the solution vector. This will surprise many
-users.
-
-Since the mldivide (\) and mrdivide (/) operators are often part of a more 
-complex expression, where there is no room to react to warnings or flags, it 
-should prefer intelligence (robustness) to speed, and so the Octave developers
-are firmly of the opinion that Octave's approach for singular, under- and
-over-determined matrices is a better choice that Matlab's
-
-@item Octave extensions
-The extensions in Octave over @sc{Matlab} syntax are
-very useful, but might cause issues when sharing with @sc{Matlab} users.
-A list of the major extensions that should be avoided to be compatible
-with @sc{Matlab} are
-
-@itemize @bullet
-@item
-Comments in octave can be marked with @samp{#}. This allows POSIX
-systems to have the first line as @samp{#! octave -q} and mark the script
-itself executable. @sc{Matlab} doesn't have this feature due to the
-absence of comments starting with @samp{#}".
-
-@item
-Code blocks like if, for, while, etc can be terminated with block
-specific terminations like "endif". @sc{Matlab} doesn't have this and
-all blocks must be terminated with "end"
-
-@item
-Octave has a lisp like unwind_protect block that allows blocks of
-code that terminate in an error to ensure that the variables that
-are touched are restored. You can do something similar with
-@code{try}/@code{catch} combined with @samp{rethrow (lasterror ())} in
-@sc{Matlab}, however rethrow and lasterror are only available in Octave 2.9.10 and later.
-
-Note that using @code{try}/@code{catch} combined with @samp{rethrow
-(lasterror ())} can not guarantee that global variables will be
-correctly reset, as it won't catch user interrupts with Ctrl-C. For
-example
-
-@example
-@group
-  global a
-  a = 1;
-  try
-    _a = a;
-    a = 2
-    while true
-    end
-  catch
-    fprintf ('caught interrupt\n');
-    a = _a;
-    rethrow (lasterror());
-  end
-@end group
-@end example
-
-@noindent
-compared to
-
-@example
-@group
-  global a
-  a = 1;
-  unwind_protect
-    _a = a;
-    a = 2
-    while true
-    end
-  unwind_protect_cleanup
-    fprintf ('caught interrupt\n');
-    a = _a;
-  end
-@end group
-@end example
-
-Typing Ctrl-C in the first case returns the user directly to the
-prompt, and the variable "a" is not reset to the saved value. In the
-second case the variable "a" is reset correctly.  Therefore @sc{Matlab}
-gives no save way of temporarily changing global variables.
-
-@item
-Indexing can be applied to all objects in Octave and not just
-variable. Therefore @code{sin(x)(1:10);} for example is perfectly valid
-in Octave but not @sc{Matlab}. To do the same in @sc{Matlab} you must do
-@code{y = sin(x); y = y([1:10]);}
-
-@item
-Octave has the operators "++", "--", "-=", "+=", "*=", etc.  As
-@sc{Matlab} doesn't, if you are sharing code these should be avoided.
-
-@item
-Character strings in Octave can be denoted with double or single
-quotes. There is a subtle difference between the two in that escaped
-characters like @code{\n} (newline), @code{\t} (tab), etc are
-interpreted in double quoted strings but not single quoted strings. This
-difference is important on Windows platforms where the "\" character is
-used in path names, and so single quoted strings should be used in
-paths. @sc{Matlab} doesn't have double quoted strings and so they should
-be avoided if the code will be transfered to a @sc{Matlab} user.
-@end itemize
-
-@end itemize
-
-@node Index
-@appendix Concept Index
-
-@printindex cp
-
-@page
-@contents
-@bye
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/faq/OctaveFAQ.texi	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,1236 @@
+% Copyright (C) 1997, 1998, 1999, 2001, 2003, 2004, 2005, 2007, 2008, 2009
+%               John W. Eaton
+%
+% This file is part of Octave.
+%
+% Octave is free software; you can redistribute it and/or modify it
+% under the terms of the GNU General Public License as published by the
+% Free Software Foundation; either version 3 of the License, or (at
+% your option) any later version.
+% 
+% Octave is distributed in the hope that it will be useful, but WITHOUT
+% ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+% FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+% for more details.
+% 
+% You should have received a copy of the GNU General Public License
+% along with Octave; see the file COPYING.  If not, see
+% <http://www.gnu.org/licenses/>.
+
+\input texinfo.tex      @c -*-texinfo-*-
+
+@setfilename OctaveFAQ.info
+@settitle Frequently asked questions about Octave (with answers)
+
+@setchapternewpage off
+@direntry
+* OctaveFAQ: (OctaveFAQ).  Frequently asked questions about Octave
+@end direntry
+@titlepage
+@title Octave FAQ
+@subtitle Frequently asked questions about Octave
+@subtitle September 2008
+@sp 1
+@author John W. Eaton and David Bateman
+@page
+@end titlepage
+
+@ifnottex
+@node Top
+@top
+@unnumbered Preface
+@cindex FAQ for Octave, latest version
+@end ifnottex
+
+This is a list of frequently asked questions (FAQ) for Octave users.
+
+We are always looking for new questions (@emph{with} answers), better
+answers, or both.  Please send suggestions to @email{bug@@octave.org}.
+If you have general questions about Octave, or need help for something
+that is not covered by the Octave manual or the FAQ, please use the
+@email{help@@octave.org} mailing list.
+
+This FAQ is intended to supplement, not replace, the Octave manual.
+Before posting a question to the @email{help@@octave.org} mailing list,
+you should first check to see if the topic is covered in the manual.
+
+@menu
+* What is Octave?::  
+* Licensing Issues::
+* How can I cite Octave?::  
+* Series 3.0.N::  
+* Octave Features::  
+* Learning more about Octave:: 
+* Getting Octave::  
+* Installation::  
+* Common problems::             
+* How do I ...?::  
+* MATLAB compatibility:: 
+* Index::                       
+@end menu
+
+@node What is Octave?
+@chapter What is Octave?
+
+Octave is a high-level interactive language, primarily intended for
+numerical computations that is mostly compatible with
+@sc{Matlab}.@footnote{@sc{Matlab} is a registered trademark of The MathWorks,
+Inc.} 
+
+Octave can do arithmetic for real, complex or integer-valued scalars
+and matrices, solve sets of nonlinear algebraic equations, integrate
+functions over finite and infinite intervals, and integrate systems of
+ordinary differential and differential-algebraic equations.
+
+Octave uses the GNU readline library to handle reading and editing
+input.  By default, the line editing commands are similar to the
+cursor movement commands used by GNU Emacs, and a vi-style line
+editing interface is also available.  At the end of each session, the
+command history is saved, so that commands entered during previous
+sessions are not lost.
+
+The Octave distribution includes a 590+ page Texinfo manual.  Access
+to the complete text of the manual is available via the help command
+@c really, the *complete* text?
+at the Octave prompt.
+
+@menu
+* Who develops Octave?::  
+* Why GNU Octave?::  
+* What version should I use?::  
+* On what platforms does Octave run?::  
+@end menu
+
+@node Who develops Octave?
+@section Who develops Octave?
+
+Discussions about writing the software that would eventually become
+Octave started in about 1988 with James B. Rawlings and John W. Eaton at
+the University of Texas.  John W. Eaton was the original author of
+Octave, starting full-time development in February 1992.  He is still
+the primary maintainer.  The community
+of users/developers has in addition contributed some code and fuels the
+discussion on the mailing lists @email{help@@octave.org} (user forum),
+@email{bug@@octave.org} (bug reports), @email{maintainers@@octave.org}
+(development issues), and @email{octave-dev@@lists.sourceforge.net} (all
+things related to the Octave Forge repository of user-contributed
+functions).
+
+@node Why GNU Octave?
+@section Why GNU Octave?
+
+The GNU Project was launched in 1984 to develop a complete Unix-like
+operating system which is free software: the GNU system.
+
+GNU is a recursive acronym for ``GNU's Not Unix''; it is pronounced
+guh-noo, approximately like canoe.
+
+The Free Software Foundation (FSF) is the principal organizational
+sponsor of the GNU Project.
+
+Octave became GNU Octave in 1997 (beginning with version 2.0.6).  This
+meant agreeing to consider Octave a part of the GNU Project and support
+the efforts of the FSF.  However, Octave is not and has never been
+developed by the FSF.
+
+For more information about the GNU project, see @url{www.gnu.org}.
+
+@cindex FSF [Free Software Foundation]
+@cindex GNU [GNU's not unix]
+
+@node What version should I use?
+@section What version should I use?
+
+In general, you will find the latest version on 
+@url{http://www.octave.org/download.html}.  It is
+recommended to use the ``testing'' version of octave for general use,
+and the ``development'' version if you want the latest features.
+
+A list of user-visible changes since the last release is available in
+the file @file{NEWS}.  The file @file{ChangeLog} in the source
+distribution contains a more detailed record of changes made since the
+last release.
+
+@node On what platforms does Octave run?
+@section On what platforms does Octave run?
+
+Octave runs on various Unices---at least Linux and Solaris, Mac OS X,
+Windows and anything you can compile it on.  Binary distributions exist
+at least for Debian, Suse, Fedora and RedHat Linuxes (Intel and AMD
+CPUs, at least), for Mac Os X and Windows' 98, 2000 and XP.
+
+Two and three dimensional plotting is fully supported using gnuplot.
+
+The underlying numerical solvers are currently standard Fortran ones
+like Lapack, Linpack, Odepack, the Blas, etc., packaged in a library
+of C++ classes.  If possible, the Fortran subroutines are compiled
+with the system's Fortran compiler, and called directly from the C++
+functions.  If that's not possible, you can still compile Octave if
+you have the free Fortran to C translator f2c.
+
+Octave is also free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation.
+
+@node Licensing Issues
+@chapter Licensing Issues
+
+@menu
+* If I write code using Octave do I have to release it under the GPL?: GPL
+* Since the MEX interface allows plugins to be distributed under terms that are incompatible with the GPL, does this mean that you are encouraging people to to write non-free software for Octave?: Licensing MEX Files
+* I wrote a program that links with Octave libraries and I don't want to release it under the terms of the GPL.  Will you change the license of the Octave libraries for me?: Requesting License Changes
+@end menu
+
+@node GPL
+@section If I write code using Octave do I have to release it under the GPL?
+
+The answer depends on precisely how the code is written and how it works.
+
+Code written entirely in the scripting language of Octave
+(interpreted code in .m files) may be released under the terms of
+whatever license you choose.
+
+Code written using Octave's native plug-in interface (also known
+as a .oct file) necessarily links with Octave internals and is
+considered a derivative work of Octave and therefore must be
+released under terms that are compatible with the GPL.
+
+Code written using Octave's implementation of the Matlab MEX
+interface may be released under the terms of whatever license you
+choose, provided that the following conditions are met:
+
+@enumerate
+@item
+The plugin should not use any bindings that are specific to Octave.  In
+other words, the MEX file must use the MEX interface only, and not also
+call on other Octave internals.  It should be possible in principle to
+use the MEX file with other programs that implement the MEX interface
+(e.g., Matlab).
+
+@item
+The MEX file should not be distributed together with Octave in such a
+way that they effectively create a single work.  For example, you should
+not distribute the MEX file and Octave together in a single package such
+that Octave automatically loads and runs the MEX file when it starts up.
+There are other possible ways that you might effectively create a single
+work; this is just one example.
+@end enumerate
+
+A program that embeds the Octave interpreter (e.g., by calling the
+"octave_main" function), or that calls functions from Octave's
+libraries (e.g., liboctinterp, liboctave, or libcruft) is
+considered a derivative work of Octave and therefore must be
+released under terms that are compatible with the GPL.
+
+@node Licensing MEX Files
+@section Since the MEX interface allows plugins to be distributed under terms that are incompatible with the GPL, does this mean that you are encouraging people to to write non-free software for Octave?
+
+No.  The original reason for implementing the MEX interface for Octave
+was to allow Octave to run free software that uses MEX files (the
+particular goal was to run SundialsTB in Octave).  The intent was to
+liberate that software from Matlab and increase the amount of free
+software available to Octave users, not to enable people to write
+proprietary code for Octave.  For the good of the community, we strongly
+encourage users of Octave to release the code they write for Octave
+under terms that are compatible with the GPL.
+
+@node Requesting License Changes
+@section I wrote a program that links with Octave libraries and I don't want to release it under the terms of the GPL.  Will you change the license of the Octave libraries for me?
+
+No.  Instead of asking us to change the licensing terms for Octave, we
+recommend that you release your program under terms that are compatible
+with the GPL so that the free software community can benefit from your
+work the same as you have benefitted from the work of all the people who
+have contributed to Octave.
+
+@node How can I cite Octave?
+@chapter How can I cite Octave?
+
+Pointing to @url{http://www.octave.org} is good, because that gives
+people a direct way to find out more.  If citation of a URL is not
+allowed by a publisher, or if you also want to point to a traditional
+reference, then you can cite the Octave manual:
+
+@example
+@group
+@@BOOK@{eaton:2008,
+  author =     "John W. Eaton and David Bateman and Søren Hauberg",
+  title =      "GNU Octave Manual Version 3",
+  publisher =  "Network Theory Limited",
+  year =       "2008",
+  isbn =       "0-9546120-6-X"
+@}
+@end group
+@end example
+
+@node Series 3.0.N
+@chapter What's new in version series 3.0.N and 3.1.N of Octave
+
+The 3.0.N series has enough new features to justify a major version
+number change. The 3.0.N series brings
+
+@itemize @bullet
+
+@item integer types
+
+@item fixed point arithmetic
+
+@item sparse matrices
+
+@item Linear programming code based on GLPK
+
+@item 64-bit compilation support
+
+@item gzipped files and stream and consequently support of matlab v7 files
+
+@item better support for both msvc and mingw
+
+@item a fully compatible MEX interface
+
+@item many many other minor features and compatibility changes
+
+@end itemize
+
+Here are some features that have been around since 2.1.N
+
+@itemize @bullet
+
+@item NDarrays 
+
+@item cells
+
+@end itemize
+
+The 3.1.N series is the current development release and will become a
+3.2.N release in the future. This series brings the new features
+
+@itemize
+@item OpenGL backend
+
+An experimental OpenGL graphics backend to replace the gnuplot
+
+@item Object Orient Programming
+
+@item Block comments
+
+@item imwrite and imread 
+
+The functions are based on the GraphicsMagick library.
+
+@item Lazy transpose
+
+Special treatment in the parser of things like "a' * b", where the
+transpose is never explicitly formed but a flag is rather passed to the
+underlying LAPACK code.
+
+@item Single precision type
+
+@item Improved array indexing
+The underlying code used for indexing of arrays has been completely
+rewritten and so the indexing of arrays is now significantly faster.
+@end itemize
+
+
+@node Octave Features
+@chapter What features are unique to Octave?
+
+@menu
+* Functions defined on the command-line::
+* Comments with #::            
+* Strings delimitted by double quotes "::
+* Line continuation by backslash::
+* Informative block closing::
+* Coherent syntax::             
+* Exclamation mark as not operator::
+* Increment and decrement operators::  
+* Unwind-protect::              
+* Built-in ODE and DAE solvers::
+@end menu
+
+This section refers to Matlab R2008b and Octave 2.1.51.
+
+@node Functions defined on the command-line
+@section Functions defined on the command-line
+
+Functions can be defined by entering code on the command line, a
+feature not supported by the other leading brand.  For example, you may
+type:
+
+@example
+@group
+octave:1> function s = hello_string (to_who)
+> ## Say hello 
+> if nargin<1, to_who = "World"; end
+> s = ["Hello ",\
+>      to_who];
+> endfunction
+octave:2> hello_string ("Moon")
+ans = Hello Moon
+@end group
+@end example
+
+@node Comments with #           
+@section Comments with #
+
+The pound character, @samp{#}, may be used to start comments, in addition
+to @samp{%}.  See the previous example.  The major advantage of this is
+that as @samp{#} is also a comment character for unix script files, any
+file that starts with a string like @samp{#! /usr/bin/octave -q} will be
+treated as an octave script and be executed by octave.
+
+@node Strings delimitted by double quotes " 
+@section Strings delimitted by double quotes " 
+The double quote, @samp{"}, may be used to delimit strings, in addition to
+the single quote @samp{'}.  See the previous example.  Also, double-quoted
+strings include backslash interpretation (like C++, C, and Perl) while
+single quoted are uninterpreted (like Matlab and Perl).
+ 
+@node Line continuation by backslash 
+@section Line continuation by backslash 
+
+Lines can be continued with a backslash, @samp{\}, in addition to three
+points @samp{@dots{}}.  See the previous example.
+
+@node Informative block closing
+@section Informative block closing
+
+You may close @code{function}, @code{for}, @code{while}, @code{if},
+@dots{} blocks with @code{endfunction}, @code{endfor}, @code{endwhile},
+@dots{} keywords in addition to using @code{end}.  As with Matlab, the
+@code{end} (or @code{endfunction}) keyword that marks the end of a
+function defined in a @file{.m} file is optional.
+
+@node Coherent syntax
+@section Coherent syntax
+
+Indexing other things than variables is possible, as in:
+@example
+@group
+octave:1> [3 1 4 1 5 9](3)
+ans = 4
+octave:2> cos([0 pi pi/4 7])(3)
+ans = 0.70711
+@end group
+@end example
+
+@node Exclamation mark as not operator
+@section Exclamation mark as not operator
+
+The exclamation mark '!' (aka ``Bang!'') is a negation operator, just
+like the tilde '~':
+
+@example
+@group
+octave:1> if ! strcmp (program_name, "octave"),
+>   "It's an error"
+> else
+>   "It works!"
+> end
+ans = It works!
+@end group
+@end example
+
+@node Increment and decrement operators
+@section Increment and decrement operators
+
+@cindex Increment operators
+@cindex Decrement operators
+@cindex Operators, increment
+@cindex Operators, decrement
+
+If you like the @samp{++}, @samp{+=} etc operators, rejoice!
+Octave includes the C-like increment and decrement operators @samp{++}
+and @samp{--} in both their prefix and postfix forms, in addition to
+@samp{+=}, @samp{-=}, @samp{*=}, @samp{/=}, @samp{^=}, @samp{.*=},
+@samp{./=}, and @samp{.^=}.
+
+For example, to pre-increment the variable @var{x}, you would write
+@code{++@var{x}}.  This would add one to @var{x} and then return the new
+value of @var{x} as the result of the expression.  It is exactly the
+same as the expression @code{@var{x} = @var{x} + 1}.
+
+To post-increment a variable @var{x}, you would write @code{x++}.
+This adds one to the variable @var{x}, but returns the value that
+@var{x} had prior to incrementing it.  For example, if @var{x} is equal
+to 2, the result of the expression @code{x++} is 2, and the new
+value of @var{x} is 3.
+
+For matrix and vector arguments, the increment and decrement operators
+work on each element of the operand.
+
+
+@node Unwind-protect
+@section Unwind-protect
+
+@cindex Unwind-protect
+
+Octave supports a limited form of exception handling modelled after the
+unwind-protect form of Lisp.  The general form of an
+@code{unwind_protect} block looks like this:
+
+@example
+@group
+unwind_protect
+  @var{body}
+unwind_protect_cleanup
+  @var{cleanup}
+end_unwind_protect
+@end group
+@end example
+
+@noindent
+Where @var{body} and @var{cleanup} are both optional and may contain any
+Octave expressions or commands.  The statements in @var{cleanup} are 
+guaranteed to be executed regardless of how control exits @var{body}.
+
+The @code{unwind_protect} statement is often used to reliably restore
+the values of global variables that need to be temporarily changed.
+
+Matlab can be made to do something similar with their @code{OnCleanUp}
+function that was introduced in 2008a.
+
+@node Built-in ODE and DAE solvers
+@section Built-in ODE and DAE solvers
+
+@cindex DASSL
+@cindex LSODE
+
+Octave includes LSODE and DASSL for solving systems of stiff ordinary
+differential and differential-algebraic equations.  These functions are
+built in to the interpreter.
+
+@node Learning more about Octave
+@chapter What documentation exists for Octave?
+
+@menu
+* Documentation::
+* Getting additional help::            
+* User community::
+* Bug reports::
+@end menu
+
+
+@node Documentation
+@section What documentation exists for Octave?
+
+@cindex Octave, documentation
+
+The Octave distribution includes a 590+ page manual that is also
+distributed under the terms of the GNU GPL.
+It is available on the web at
+@url{http://www.octave.org/docs.html} and you will also
+find there instructions on how to order a paper version.
+
+The complete text of the Octave manual is also available using the GNU
+Info system via the GNU Emacs, info, or xinfo programs, or by using
+the @samp{help -i} command to start the GNU info browser directly from
+the Octave prompt.
+
+If you have problems using this documentation, or find that some topic
+is not adequately explained, indexed, or cross-referenced, please send
+a bug report to @email{bug@@octave.org}.
+
+
+@node Getting additional help
+@section Getting additional help
+
+@cindex Additional help
+@cindex Mailing lists, help-octave
+
+If you can't find an answer to your question, the
+@email{help@@octave.org} mailing list is available for questions related
+to using, installing, and porting Octave that are not adequately
+answered by the Octave manual or by this document.
+
+@node User community
+@section User community
+
+To subscribe to the list, go to @url{www.octave.org/archive.html} and
+follow the link to the subscription page for the list.
+
+@strong{Please do not} send requests to be added or removed from the
+mailing list, or other administrative trivia to the list itself.
+
+An archive of old postings to the help-octave mailing list is maintained
+on @url{http://www.octave.org/archive.html}.
+
+You will also find some user advice and code spread over the web.  Good
+starting points are the Octave Wiki @url{http://wiki.octave.org} and
+Octave-Forge @url{http://octave.sourceforge.net}
+
+@node Bug reports
+@section I think I have found a bug in Octave.
+
+@cindex Bug in Octave, newly found
+
+``I think I have found a bug in Octave, but I'm not sure.  How do I know,
+and who should I tell?''
+
+@cindex Manual, for Octave
+
+First, see the section on bugs and bug reports in the Octave manual.
+When you report a bug, make sure to describe the type of computer you
+are using, the version of the operating system it is running, and the
+version of Octave that you are using.  Also provide enough code so that
+the Octave maintainers can duplicate your bug.
+
+If you have Octave working at all, the easiest way to do this is to use
+the Octave function @code{bug_report}.  When you execute this function,
+Octave will prompt you for a subject and then invoke the editor on a
+file that already contains all the configuration information.  When you
+exit the editor, Octave will mail the bug report for you (in a unix-like
+operating system).
+
+@cindex Octave bug report
+@cindex Mailing lists, bug-octave
+
+If for some reason you cannot use Octave's @code{bug_report} function,
+mail your bug report to @email{bug@@octave.org}.  Your message needs to
+include enough information to allow the maintainers of Octave to fix the
+bug.  Please read the section on bugs and bug reports in the Octave
+manual for a list of things that should be included in every bug report.
+
+
+@node Getting Octave
+@chapter Getting Octave
+
+@menu
+* Source code::  
+* Pre-compiled binary packages::
+* Octave for other platforms::
+@end menu
+
+@node Source code
+@section Source code
+@cindex Source code
+
+Source code is available on the Octave development site, where you are
+sure to get the latest version.
+
+@itemize @bullet
+@item @url{http://www.octave.org/download.html}
+@item @url{ftp://ftp.octave.org/pub/octave/}
+@end itemize
+
+Since Octave is distrubted under the terms of the GPL, you can get
+Octave from a friend who has a copy, by anonymous FTP, or by ordering
+a tape or CD-ROM from the Free Software Foundation (FSF).
+
+@node Pre-compiled binary packages
+@section Pre-compiled binary packages
+@cindex  Pre-compiled binary packages
+@cindex  Binaries
+
+The Octave project does not distribute binary packages, but other
+projects do.  For an up-to-date listing of packagers, see:
+
+@itemize @bullet
+@item @url{http://www.octave.org/download.html}
+@item @url{http://wiki.octave.org/wiki.pl?CategoryInstall}
+@end itemize
+
+As of today, Octave binaries are available at least on Debian, RedHat,
+Suse and Fedora Linuxes, Mac OS X, Windows' 98, 2000 and XP.
+
+@node Octave for other platforms
+@section How do I get a copy of Octave for (some other platform)?
+
+@cindex VMS support
+@cindex VAX
+@cindex MS-DOS support
+@cindex Windows support
+@cindex DJGPP
+@cindex EMX
+@cindex OS/2 support
+
+Octave currently runs on Unix-like systems, Mac OS X, and Windows.
+It should be possible to make Octave work on other systems as well.  
+If you are interested in porting Octave to other systems, please contact
+@email{bug@@octave.org}.
+
+@c @menu
+@c * Octave for Unix::             
+@c * Octave for other platforms::  
+@c * latest versions::             
+@c @end menu
+
+@c @cindex Octave, ordering
+@c @cindex Octave, getting a copy
+
+@node Installation
+@chapter Installation Issues and Problems
+
+@cindex Octave, building 
+
+Octave 3.2 require approximately 800MB of disk storage to unpack
+and compile from source (considerably less if you don't compile with
+debugging symbols).  Once installed, Octave requires approximately 200MB
+of disk space (again, considerably less if you don't compile with
+debugging symbols).
+
+@menu
+* What else do I need?::        
+* Other C++ compilers?::        
+@end menu
+
+@node What else do I need?
+@section What else do I need?
+
+@cindex GNU gcc
+@cindex GNU g++
+@cindex libg++
+@cindex GNU Make
+@cindex Flex
+@cindex GNU Bison
+
+To compile Octave, you will need a recent version of GNU Make.  You
+will also need GCC 3.3 or later, although GCC 4.1 or later is 
+recommended.
+
+@strong{You must have GNU Make to compile octave}.  Octave's Makefiles
+use features of GNU Make that are not present in other versions of make.
+GNU Make is very portable and easy to install.
+
+@node Other C++ compilers?
+@section Can I compile Octave with another C++ compiler?
+
+Yes, but development is done primarily with GCC, so you may hit some
+incompatibilities.  Octave is intended to be portable to any standard
+conforming compiler.  If you have difficulties that you think are bugs,
+please report them to the @email{bug@@octave.org} mailing list, or ask
+for help on the @email{help@@octave.org} mailing list.
+
+@node Common problems
+@chapter Common problems
+
+This list is probably far too short.  Feel free to suggest additional
+questions (preferably with answers!)
+
+@itemize @bullet
+@item
+Octave takes a long time to find symbols.
+
+Octave uses the @code{genpath} function to recursively add directories
+to the list of directories searched for function files.  Check the list
+of directories with the @code{path} command. If the path list is very
+long check your use of the @code{genpath} function.
+
+@item
+When plotting Octave occasionally gives me errors like @samp{gnuplot> 9 0.735604
+line 26317: invalid command}.
+
+There is a known bug in gnuplot 4.2 that can cause an off by one error
+while piping data to gnuplot. The relevant gnuplot bug report can be
+found at @url{http://sourceforge.net/tracker/index.php?func=detail&aid=1716556&group_id=2055&atid=102055}
+
+If you have obtained your copy of Octave from a distribution please file
+a bug report requesting that the fix reported in the above bug report be
+included.
+
+@item
+I cannot install a package. Octave complains about a missing @code{mkoctfile}.
+
+Most distributions split Octave into several packages. The script
+@code{mkoctfile} is then part of a separate package:
+@itemize @minus
+@item
+Debian/Ubuntu
+
+@code{aptitude install octave3.0-headers}
+
+@item
+Fedora
+
+@code{yum install octave-devel}
+
+@end itemize
+@end itemize
+
+@node How do I ...?
+@chapter  How do I ...?
+
+@menu
+* How do I set the number of displayed decimals?::
+@end menu
+
+@cindex Tips and tricks
+@cindex How do I @dots{} ?
+
+@node How do I set the number of displayed decimals?
+@section How do I set the number of displayed decimals?
+
+@example
+@group
+octave:1> format long
+octave:2> pi
+pi = 3.14159265358979
+octave:3> format short
+octave:4> pi
+pi = 3.1416
+@end group
+@end example
+
+@node MATLAB compatibility
+@chapter Porting programs from @sc{Matlab} to Octave
+
+@cindex @sc{Matlab} compatibility
+@cindex Compatibility with @sc{Matlab}
+
+People often ask
+
+``I wrote some code for @sc{Matlab}, and I want to get it running under
+Octave.  Is there anything I should watch out for?''
+
+or alternatively
+
+``I wrote some code in Octave, and want to share it with @sc{Matlab}
+users.  Is there anything I should watch out for?''
+
+which is not quite the same thing.  There are still a number of
+differences between Octave and @sc{Matlab}, however in general
+differences between the two are considered as bugs.  Octave might
+consider that the bug is in @sc{Matlab} and do nothing about it, but
+generally functionality is almost identical.  If you find a difference
+between Octave behavior and @sc{Matlab}, then you should send a
+description of this difference (with code illustrating the difference,
+if possible) to @email{bug@@octave.org}.
+
+Furthermore, Octave adds a few syntactical extensions to Matlab that
+might cause some issues when exchanging files between Matlab and Octave
+users. As both Octave and @sc{Matlab} are under constant development the
+information in this section is subject to change at anytime.
+
+You should also look at the page
+@url{http://octave.sourceforge.net/packages.html} and
+@url{http://octave.sourceforge.net/doc/} that has a function reference
+that is up to date. You can use this function reference to see the
+number of octave function that are available and their @sc{Matlab}
+compatibility.
+
+The major differences between Octave 3.2.N and  @sc{Matlab} R2008a are:
+
+@itemize @bullet
+@item Nested Functions
+
+Octave doesn't yet have nested functions. That is
+
+@example
+@group
+function y = foo (x)
+  y = bar(x)
+  function y = bar (x)
+    y = @dots{};
+  end
+end
+@end group
+@end example
+
+There was discussion in Octave of having these even prior to @sc{Matlab},
+and the decision was made not to have these in Octave at the time for
+compatibility.  The above written with sub-functions functions would be
+
+@example
+@group
+function y = foo (x)
+   y = bar(x)
+end
+function y = bar (x)
+   y = @dots{};
+end
+@end group
+@end example
+
+Now that @sc{Matlab} has recently introduced nested functions, Octave will
+probably have them soon as well.  Until then nested functions in Octave
+are treated as sub-functions with the same scoping rules as
+sub-functions.  
+
+The authors of Octave consider the nested function scoping rules of
+Matlab to be more problems than they are worth as they introduce
+diffiult to find bugs as inadvertantly modifying a variable in a
+nested function that is also used in the parent is particularly easy.
+
+@item Differences in core syntax
+There a few core @sc{Matlab} syntaxes that are not accepted by Octave,
+these being
+
+@itemize @bullet
+@item
+Some limitations on the use of function handles. The major difference is
+related to nested function scoping rules (as above) and their use with
+function handles.
+
+@item
+Some limitations of variable argument lists on the LHS of an expression,
+though the most common types are accepted.
+
+@item
+@sc{Matlab} classdef object oriented programming is not yet supportted,
+though work is underway and when development more on to Octave 3.3 this
+will be included in teh development tree.
+@end itemize
+
+@item Differences in core functions
+A large number of the @sc{Matlab} core functions (ie those that are in
+the core and not a toolbox) are implemented, and certainly all of the
+commonly used ones. There are a few functions that aren't implemented,
+for example @code{condest} or to do with specific missing Octave functionality
+(gui, dll, java, activex, dde, web, and serial functions). Some of the
+core functions have limitations that aren't in the @sc{Matlab}
+version.  For example the @code{sprandn} function can not force a
+particular condition number for the matrix like @sc{Matlab} can.
+
+@item Just-In-Time compiler
+@sc{Matlab} includes a "Just-In-Time" compiler. This compiler allows the
+acceleration of for-loops in @sc{Matlab} to almost native performance with
+certain restrictions. The JIT must know the return type of all functions
+called in the loops and so you can't include user functions in the loop
+of JIT optimized loops.  Octave doesn't have a JIT and so to some might
+seem slower than @sc{Matlab}.  For this reason you must vectorize your code as
+much as possible.  The MathWorks themselves have a good document
+discussing vectorization at
+@url{http://www.mathworks.com/support/tech-notes/1100/1109.html}.
+
+@item Compiler
+On a related point, there is no Octave compiler, and so you can't
+convert your Octave code into a binary for additional speed or
+distribution.  There is an example of how to do this at
+@url{http://www.stud.tu-ilmenau.de/~rueckn/}, but this is a very early
+example code and would need lots of work to complete it.
+
+@item Graphic Handles
+Up to Octave 2.9.9 there was no support for graphic handles in Octave
+itself.  In the 3.2.N versions of Octave the support for graphics
+handles is converging towards full compatibility. The @code{patch}
+function is currently limited to 2-D patches, due to an underlying
+limitation in gnuplot.
+
+@item GUI 
+There are no @sc{Matlab} compatible GUI functions.  There are a number of
+bindings from Octave to Tcl/Tk, Vtk and zenity included in the
+Octave Forge project (@url{http://octave.sourceforge.net}) for example
+that can be used for a GUI, but these are not @sc{Matlab}
+compatible. Work on a matlab compatible GUI is in an alpha stage in the
+JHandles package (@url{http://octave.sourceforge.net/jhandles/index.html}).
+This might be an issue if you intend to exchange Octave code with 
+@sc{Matlab} users.
+
+@item Simulink
+Octave itself includes no Simulink support. Typically the simulink
+models lag research and are less flexible, so shouldn't really be used
+in a research environment.  However, some @sc{Matlab} users that try to
+use Octave complain about this lack.  There is a similar package to
+simulink for the Octave and R projects available at
+@url{http://www.scicraft.org/}
+
+@item Mex-Files
+Octave includes an API to the matlab MEX interface. However, as MEX is
+an API to the internals of @sc{Matlab} and the internals of Octave
+differ from @sc{Matlab}, there is necessarily a manipulation of the data
+to convert from a MEX interface to the Octave equivalent. This is
+notable for all complex matrices, where @sc{Matlab} stores complex
+arrays as real and imaginary parts, whereas Octave respects the C99/C++
+standards of co-locating the real/imag parts in memory.  Also due to the
+way @sc{Matlab} allows access to the arrays passed through a pointer,
+the MEX interface might require copies of arrays (even non complex
+ones).
+
+@item Block comments
+Block comments denoted by "%@{" and "%@}" markers are supported by
+Octave with some limitations. The major limitation is that block
+comments are not supported within [] or @{@}.
+
+@item Mat-File format
+There are some differences in the mat v5 file format accepted by
+Octave. @sc{Matlab} recently introduced the "-V7.3" save option which is
+an HDF5 format which is particularly useful for 64-bit platforms where
+the standard matlab format can not correctly save variables.. Octave
+accepts HDF5 files, but is not yet compatible with the "-v7.3" versions
+produced by @sc{Matlab}. 
+
+Although Octave can load inline abd function handles saved by
+@sc{Matlab}, it can not yet save them.
+
+Finally, Some multi-byte unicode characters aren't yet treated in
+mat-files.
+
+@item Profiler
+Octave doesn't have a profiler. Though there is a patch for a flat
+profiler, that might become a real profiler sometime in the future. see
+the thread
+
+@url{http://www.cae.wisc.edu/pipermail/octave-maintainers/2007-January/001685.html}
+
+for more details
+
+@item Toolboxes
+Octave is a community project and so the toolboxes that exist are
+donated by those interested in them through the Octave Forge website
+(@url{http://octave.sourceforge.net}). These might be lacking in certain
+functionality relative to the @sc{Matlab} toolboxes, and might not
+exactly duplicate the matlab functionality or interface.
+
+@item Short-circuit & and | operators
+The @code{&} and @code{|} operators in @sc{Matlab} short-circuit when
+included in an if statemant and not otherwise.  In Octave only the
+@code{&&} and @code{||} short circuit.  Note that this means that
+
+@example
+@group
+  if (a | b)
+    @dots{}
+  end
+@end group
+@end example
+
+and
+  
+@example
+@group
+  t = a | b;
+  if t
+    @dots{}
+  end
+@end group
+@end example
+
+@noindent
+are different in @sc{Matlab}. This is really a @sc{Matlab} bug, but
+there is too much code out there that relies on this behavior to change
+it. Prefer the || and && operators in if statements if possible.
+
+Note that the difference is also significant when either argument is a
+function with side effects or if the first argument is a scalar and the
+second argument is an empty matrix.  For example, note the difference
+between
+
+@example
+@group
+  t = 1 | [];          ## results in [], so...
+  if (t) 1, end        ## in if ([]), this is false.
+@end group
+@end example
+
+and
+
+@example
+  if (1 | []) 1, end   ## short circuits so condition is true.
+@end example
+
+Another case that is documented in the @sc{Matlab} manuals is that
+
+@example
+@group
+  t = [1, 1] | [1, 2, 3];          ## error
+  if ([1, 1] | [1, 2, 3]) 1, end   ## OK
+@end group
+@end example
+
+Also @sc{Matlab} requires the operands of && and || to be scalar values but
+Octave does not (it just applies the rule that for an operand to be
+considered true, every element of the object must be nonzero or
+logically true).
+
+Finally, note the inconsistence of thinking of the condition of an if
+statement as being equivalent to @code{all(X(:))} when @var{X} is a
+matrix.  This is true for all cases EXCEPT empty matrices:
+
+@example
+@group
+  if ([0, 1]) == if (all ([0, 1]))   ==>  i.e., condition is false.
+  if ([1, 1]) == if (all ([1, 1]))   ==>  i.e., condition is true.
+@end group
+@end example
+
+However,
+
+@example
+  if ([]) != if (all ([]))
+@end example
+
+because @code{samp ([]) == 1} (because, despite the name, it is really
+returning true if none of the elements of the matrix are zero, and since
+there are no elements, well, none of them are zero).  But, somewhere
+along the line, someone decided that if @code{([])} should be false.
+Mathworks probably thought it just looks wrong to have @code{[]} be true
+in this context even if you can use logical gymnastics to convince
+yourself that "all" the elements of a matrix that doesn't actually have
+any elements are nonzero. Octave however duplicates this behavior for if
+statements containing empty matrices.
+
+@item Solvers for singular, under- and over-determined matrices
+
+Matlab's solvers as used by the operators mldivide (\) and mrdivide (/),
+use a different approach than Octave's in the case of singular, under-, 
+or over-determined matrices. In the case of a singular matrix, Matlab
+returns the result given by the LU decomposition, even though the underlying
+solver has flagged the result as erroneous. Octave has made the choice
+of falling back to a minimum norm solution of matrices that have been
+flagged as singular which arguably is a better result for these cases.
+
+In the case of under- or over-determined matrices, Octave continues to
+use a minimum norm solution, whereas Matlab uses an approach that is
+equivalent to
+
+@example
+@group
+function x = mldivide (A, b)
+  [Q, R, E] = qr(A);
+  x = [A \ b, E(:, 1:m) * (R(:, 1:m) \ (Q' * b))]
+end
+@end group
+@end example
+
+@noindent
+While this approach is certainly faster and uses less memory than
+Octave's minimum norm approach, this approach seems to be inferior in
+other ways.
+
+A numerical question arises: how big can the null space component become,
+relative to the minimum-norm solution? Can it be nicely bounded, or can it be
+arbitrarily big? Consider this example:
+
+@example
+@group
+m = 10; 
+n = 10000; 
+A = ones(m, n) + 1e-6 * randn(m,n); 
+b = ones(m, 1) + 1e-6 * randn(m,1); 
+norm(A \ b)
+@end group
+@end example
+
+@noindent
+while Octave's minimum-norm values are around 3e-2, Matlab's results
+are 50-times larger. For another issue, try this code:
+
+@example
+@group
+m = 5; 
+n = 100; 
+j = floor(m * rand(1, n)) + 1; 
+b = ones(m, 1);
+A = zeros(m, n);
+A(sub2ind(size(A),j,1:n)) = 1;
+x = A \ b; 
+[dummy,p] = sort(rand(1,n)); 
+y = A(:,p)\b; 
+norm(x(p)-y)
+@end group
+@end example
+
+@noindent
+It shows that unlike in Octave, mldivide in Matlab is not invariant
+with respect to column permutations. If there are multiple columns of
+the same norm, permuting columns of the matrix gets you different
+result than permuting the solution vector. This will surprise many
+users.
+
+Since the mldivide (\) and mrdivide (/) operators are often part of a more 
+complex expression, where there is no room to react to warnings or flags, it 
+should prefer intelligence (robustness) to speed, and so the Octave developers
+are firmly of the opinion that Octave's approach for singular, under- and
+over-determined matrices is a better choice that Matlab's
+
+@item Octave extensions
+The extensions in Octave over @sc{Matlab} syntax are
+very useful, but might cause issues when sharing with @sc{Matlab} users.
+A list of the major extensions that should be avoided to be compatible
+with @sc{Matlab} are
+
+@itemize @bullet
+@item
+Comments in octave can be marked with @samp{#}. This allows POSIX
+systems to have the first line as @samp{#! octave -q} and mark the script
+itself executable. @sc{Matlab} doesn't have this feature due to the
+absence of comments starting with @samp{#}".
+
+@item
+Code blocks like if, for, while, etc can be terminated with block
+specific terminations like "endif". @sc{Matlab} doesn't have this and
+all blocks must be terminated with "end"
+
+@item
+Octave has a lisp like unwind_protect block that allows blocks of
+code that terminate in an error to ensure that the variables that
+are touched are restored. You can do something similar with
+@code{try}/@code{catch} combined with @samp{rethrow (lasterror ())} in
+@sc{Matlab}, however rethrow and lasterror are only available in Octave 2.9.10 and later.
+
+Note that using @code{try}/@code{catch} combined with @samp{rethrow
+(lasterror ())} can not guarantee that global variables will be
+correctly reset, as it won't catch user interrupts with Ctrl-C. For
+example
+
+@example
+@group
+  global a
+  a = 1;
+  try
+    _a = a;
+    a = 2
+    while true
+    end
+  catch
+    fprintf ('caught interrupt\n');
+    a = _a;
+    rethrow (lasterror());
+  end
+@end group
+@end example
+
+@noindent
+compared to
+
+@example
+@group
+  global a
+  a = 1;
+  unwind_protect
+    _a = a;
+    a = 2
+    while true
+    end
+  unwind_protect_cleanup
+    fprintf ('caught interrupt\n');
+    a = _a;
+  end
+@end group
+@end example
+
+Typing Ctrl-C in the first case returns the user directly to the
+prompt, and the variable "a" is not reset to the saved value. In the
+second case the variable "a" is reset correctly.  Therefore @sc{Matlab}
+gives no save way of temporarily changing global variables.
+
+@item
+Indexing can be applied to all objects in Octave and not just
+variable. Therefore @code{sin(x)(1:10);} for example is perfectly valid
+in Octave but not @sc{Matlab}. To do the same in @sc{Matlab} you must do
+@code{y = sin(x); y = y([1:10]);}
+
+@item
+Octave has the operators "++", "--", "-=", "+=", "*=", etc.  As
+@sc{Matlab} doesn't, if you are sharing code these should be avoided.
+
+@item
+Character strings in Octave can be denoted with double or single
+quotes. There is a subtle difference between the two in that escaped
+characters like @code{\n} (newline), @code{\t} (tab), etc are
+interpreted in double quoted strings but not single quoted strings. This
+difference is important on Windows platforms where the "\" character is
+used in path names, and so single quoted strings should be used in
+paths. @sc{Matlab} doesn't have double quoted strings and so they should
+be avoided if the code will be transfered to a @sc{Matlab} user.
+@end itemize
+
+@end itemize
+
+@node Index
+@appendix Concept Index
+
+@printindex cp
+
+@page
+@contents
+@bye
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/interpreter/Makefile.am	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,234 @@
+# Makefile for octave's doc/interpreter directory
+#
+# Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+#               2002, 2003, 2005, 2006, 2007, 2008, 2009 John W. Eaton
+#
+# This file is part of Octave.
+# 
+# Octave is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation; either version 3 of the License, or (at
+# your option) any later version.
+# 
+# Octave is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with Octave; see the file COPYING.  If not, see
+# <http://www.gnu.org/licenses/>.
+
+TOPDIR = ../..
+
+include ../../common.mk
+
+AM_MAKEINFOFLAGS = -I.. -I$(srcdir) -I$(srcdir)/..
+AM_MAKEINFOHTMLFLAGS = -I.. -I$(srcdir) -I$(srcdir)/..
+
+TEXINFO_TEX = ../texinfo.tex
+
+TEXINPUTS := "..$(PATH_SEPARATOR)$(srcdir)$(PATH_SEPARATOR)$(srcdir)/..$(PATH_SEPARATOR)$(TEXINPUTS)$(PATH_SEPARATOR)"
+export TEXINPUTS
+
+TEXMFCNF := "..$(PATH_SEPARATOR)$(srcdir)$(PATH_SEPARATOR)$(srcdir)/..$(PATH_SEPARATOR)$(PATH_SEPARATOR)$(TEXMFCNF)$(PATH_SEPARATOR)"
+export TEXMFCNF
+
+dist_man1_MANS = \
+  mkoctfile.1 \
+  octave-bug.1 \
+  octave-config.1 \
+  octave.1
+
+## The following example files are listed for dependencies.
+## They should not be distributed from this directory.
+
+EXAMPLE_FILES = \
+  $(top_srcdir)/examples/@polynomial/display.m \
+  $(top_srcdir)/examples/@polynomial/double.m \
+  $(top_srcdir)/examples/@polynomial/end.m \
+  $(top_srcdir)/examples/@polynomial/get.m \
+  $(top_srcdir)/examples/@polynomial/mtimes.m \
+  $(top_srcdir)/examples/@polynomial/plot.m \
+  $(top_srcdir)/examples/@polynomial/polynomial.m \
+  $(top_srcdir)/examples/@polynomial/polynomial_superiorto.m \
+  $(top_srcdir)/examples/@polynomial/polyval.m \
+  $(top_srcdir)/examples/@polynomial/set.m \
+  $(top_srcdir)/examples/@polynomial/subsasgn.m \
+  $(top_srcdir)/examples/@polynomial/subsref.m \
+  $(top_srcdir)/examples/addtwomatrices.cc \
+  $(top_srcdir)/examples/celldemo.cc \
+  $(top_srcdir)/examples/firstmexdemo.c \
+  $(top_srcdir)/examples/fortdemo.cc \
+  $(top_srcdir)/examples/fortsub.f \
+  $(top_srcdir)/examples/funcdemo.cc \
+  $(top_srcdir)/examples/globaldemo.cc \
+  $(top_srcdir)/examples/helloworld.cc \
+  $(top_srcdir)/examples/mycell.c \
+  $(top_srcdir)/examples/myfeval.c \
+  $(top_srcdir)/examples/myfunc.c \
+  $(top_srcdir)/examples/mypow2.c \
+  $(top_srcdir)/examples/mysparse.c \
+  $(top_srcdir)/examples/mystring.c \
+  $(top_srcdir)/examples/mystruct.c \
+  $(top_srcdir)/examples/paramdemo.cc \
+  $(top_srcdir)/examples/stringdemo.cc \
+  $(top_srcdir)/examples/structdemo.cc \
+  $(top_srcdir)/examples/unwinddemo.cc
+
+include images.mk
+
+.eps.pdf:
+	if [ -f $< ] ; then $(GHOSTSCRIPT) -dBATCH -dEPSCrop -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=$@ $< ; fi
+
+IMAGES = $(IMAGES_EPS) $(IMAGES_PDF) $(IMAGES_PNG) $(IMAGES_TXT)
+
+MUNGED_TEXI_SRC = \
+  arith.texi \
+  audio.texi \
+  basics.texi \
+  bugs.texi \
+  container.texi \
+  contrib.texi \
+  cp-idx.texi \
+  data.texi \
+  debug.texi \
+  diffeq.texi \
+  diagperm.texi \
+  dynamic.texi \
+  emacs.texi \
+  errors.texi \
+  eval.texi \
+  expr.texi \
+  fn-idx.texi \
+  func.texi \
+  geometry.texi \
+  gpl.texi \
+  grammar.texi \
+  image.texi \
+  install.texi \
+  interp.texi \
+  intro.texi \
+  io.texi \
+  linalg.texi \
+  matrix.texi \
+  nonlin.texi \
+  numbers.texi \
+  oop.texi \
+  op-idx.texi \
+  optim.texi \
+  package.texi \
+  plot.texi \
+  poly.texi \
+  preface.texi \
+  quad.texi \
+  set.texi \
+  signal.texi \
+  sparse.texi \
+  stats.texi \
+  stmt.texi \
+  strings.texi \
+  system.texi \
+  testfun.texi \
+  tips.texi \
+  var.texi
+
+info_TEXINFOS = octave.texi
+octave_TEXINFOS = \
+  ../conf.texi \
+  contributors.texi \
+  $(MUNGED_TEXI_SRC)
+
+TXI_SRC = $(MUNGED_TEXI_SRC:.texi=.txi)
+
+../conf.texi:
+	$(MAKE) -C .. conf.texi
+
+$(srcdir)/octave.info: $(octave_TEXINFOS) $(IMAGES_TXT) $(EXAMPLE_FILES)
+
+octave.dvi octave.ps: $(octave_TEXINFOS) $(IMAGES_EPS) $(EXAMPLE_FILES)
+
+octave.pdf: $(octave_TEXINFOS) $(IMAGES_PDF) $(EXAMPLE_FILES)
+
+octave.html: $(octave_TEXINFOS) $(IMAGES_PNG) $(EXAMPLE_FILES)
+
+all-local: dvi html pdf ps doc-cache
+
+install-data-local: install-doc-cache
+.PHONY: install-data-local
+
+uninstall-local: uninstall-doc-cache
+.PHONY: uninstall-local
+
+install-doc-cache:
+	$(MKDIR_P) $(DESTDIR)$(octetcdir)
+	$(INSTALL_DATA) doc-cache $(DESTDIR)$(octetcdir)/doc-cache
+.PHONY: install-doc-cache
+
+uninstall-doc-cache:
+	rm -f $(DESTDIR)$(octetcdir)/doc-cache
+.PHONY: uninstall-doc-cache
+
+EXTRA_DIST = \
+  config-images.sh \
+  contributors.in \
+  images \
+  images.mk \
+  mk_doc_cache.m \
+  mkcontrib.awk \
+  munge-texi.cc \
+  octave.dvi \
+  octave.html \
+  octave.pdf \
+  octave.ps \
+  $(IMAGES) \
+  $(IMAGES_SRC) \
+  $(TXI_SRC)
+
+MAN_SRC = mkoctfile.1 octave.1 octave-bug.1 octave-config.1
+
+# FIXME -- need to include generated figures here...
+#DISTFILES = $(addprefix $(srcdir)/, Makefile.in contributors.in \
+#  mkcontrib.awk dir  munge-texi.cc $(MAN_SRC) $(SOURCES) $(MAIN_TEXINFO)) \
+#  $(SUB_TEXINFO) contributors.texi $(FORMATTED) $(IMAGES) mk_doc_cache.m \
+#  doc-cache stmp-html
+
+DOCSTRING_FILES = $(TOPDIR)/src/DOCSTRINGS $(TOPDIR)/scripts/DOCSTRINGS
+
+$(TOPDIR)/src/DOCSTRINGS:
+	$(MAKE) -C $(TOPDIR)/src DOCSTRINGS
+
+$(TOPDIR)/scripts/DOCSTRINGS:
+	$(MAKE) -C $(TOPDIR)/scripts DOCSTRINGS
+
+doc-cache: $(DOCSTRING_FILES) mk_doc_cache.m
+	$(TOPDIR)/run-octave -f -q -H $(srcdir)/mk_doc_cache.m doc-cache $(DOCSTRING_FILES) || rm -f doc-cache
+
+$(MUNGED_TEXI_SRC): $(DOCSTRING_FILES) munge-texi$(BUILD_EXEEXT)
+
+munge-texi$(BUILD_EXEEXT): munge-texi.cc
+	$(BUILD_CXX) $(BUILD_CXXFLAGS) -o $@ $^ $(BUILD_LDFLAGS)
+
+contributors.texi: contributors.in
+	$(AWK) -f $(srcdir)/mkcontrib.awk $(srcdir)/contributors.in > $@-t
+	mv $@-t $@
+
+.txi.texi:
+	./munge-texi $(DOCSTRING_FILES) < $< > $@-t
+	mv $@-t $@
+
+../../INSTALL.OCTAVE: install.texi
+	rm -f INSTALL
+	-$(MAKEINFO) -D INSTALLONLY \
+	  --no-validate --no-headers --no-split --output INSTALL \
+	  -I.. -I$(srcdir) -I$(srcdir)/.. $<
+	mv INSTALL ../../INSTALL.OCTAVE
+
+../../BUGS: bugs.texi
+	rm -f BUGS
+	-$(MAKEINFO) -D BUGSONLY \
+	  --no-validate --no-headers --no-split --output BUGS \
+	  -I.. -I$(srcdir) -I$(srcdir)/.. $<
+	mv BUGS ../../BUGS
+
+.NOTPARALLEL:
--- a/doc/interpreter/Makefile.in	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,387 +0,0 @@
-# Makefile for octave's doc/interpreter directory
-#
-# Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-#               2002, 2003, 2005, 2006, 2007, 2008, 2009 John W. Eaton
-#
-# This file is part of Octave.
-# 
-# Octave is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 3 of the License, or (at
-# your option) any later version.
-# 
-# Octave is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with Octave; see the file COPYING.  If not, see
-# <http://www.gnu.org/licenses/>.
-
-TOPDIR = ../..
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-
-include $(TOPDIR)/Makeconf
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-
-################################################################################
-
-SCRIPT_SOURCES = sparseimages.m interpimages.m geometryimages.m plotimages.m
-
-POLYNOMIAL_FILES_NODIR = \
-  display.m \
-  double.m \
-  end.m \
-  get.m \
-  mtimes.m \
-  plot.m \
-  polynomial.m \
-  polynomial_superiorto.m \
-  polyval.m \
-  set.m \
-  subsasgn.m \
-  subsref.m
-
-EXAMPLE_FILES_NODIR = \
-  addtwomatrices.cc \
-  celldemo.cc \
-  firstmexdemo.c \
-  fortdemo.cc \
-  fortsub.f \
-  funcdemo.cc \
-  globaldemo.cc \
-  helloworld.cc \
-  mycell.c \
-  myfeval.c \
-  myfunc.c \
-  mypow2.c \
-  mysparse.c \
-  mystring.c \
-  mystruct.c \
-  paramdemo.cc \
-  stringdemo.cc \
-  structdemo.cc \
-  unwinddemo.cc \
-  $(addprefix @polynomial/, $(POLYNOMIAL_FILES_NODIR))
-
-EXAMPLE_FILES = $(addprefix $(top_srcdir)/examples/, $(EXAMPLE_FILES_NODIR))
-
-GEOMETRYIMAGES = voronoi triplot griddata convhull delaunay inpolygon
-GEOMETRYIMAGES_EPS = $(addsuffix .eps, $(GEOMETRYIMAGES))
-GEOMETRYIMAGES_PDF = $(addsuffix .pdf, $(GEOMETRYIMAGES))
-GEOMETRYIMAGES_PNG = $(addsuffix .png, $(GEOMETRYIMAGES))
-GEOMETRYIMAGES_TXT = $(addsuffix .txt, $(GEOMETRYIMAGES))
-
-PLOTIMAGES = plot hist errorbar polar mesh plot3 extended
-PLOTIMAGES_EPS = $(addsuffix .eps, $(PLOTIMAGES))
-PLOTIMAGES_PDF = $(addsuffix .pdf, $(PLOTIMAGES))
-PLOTIMAGES_PNG = $(addsuffix .png, $(PLOTIMAGES))
-PLOTIMAGES_TXT = $(addsuffix .txt, $(PLOTIMAGES))
-
-INTERPIMAGES = interpft interpn interpderiv1 interpderiv2
-INTERPIMAGES_EPS = $(addsuffix .eps, $(INTERPIMAGES))
-INTERPIMAGES_PDF = $(addsuffix .pdf, $(INTERPIMAGES))
-INTERPIMAGES_PNG = $(addsuffix .png, $(INTERPIMAGES))
-INTERPIMAGES_TXT = $(addsuffix .txt, $(INTERPIMAGES))
-
-SPARSEIMAGES_1 = gplot grid spmatrix spchol spcholperm
-SPARSEIMAGES_EPS = $(addsuffix .eps, $(SPARSEIMAGES_1))
-SPARSEIMAGES_PDF = $(addsuffix .pdf, $(SPARSEIMAGES_1))
-SPARSEIMAGES_PNG = $(addsuffix .png, $(SPARSEIMAGES_1))
-SPARSEIMAGES_TXT = $(addsuffix .txt, $(SPARSEIMAGES_1))
-
-IMAGES_EPS = $(SPARSEIMAGES_EPS) $(INTERPIMAGES_EPS) \
-	$(GEOMETRYIMAGES_EPS) $(PLOTIMAGES_EPS)
-IMAGES_PDF = $(SPARSEIMAGES_PDF) $(INTERPIMAGES_PDF) \
-	$(GEOMETRYIMAGES_PDF) $(PLOTIMAGES_PDF)
-IMAGES_PNG = $(SPARSEIMAGES_PNG) $(INTERPIMAGES_PNG) \
-	$(GEOMETRYIMAGES_PNG) $(PLOTIMAGES_PNG)
-IMAGES_TXT = $(SPARSEIMAGES_TXT) $(INTERPIMAGES_TXT) \
-	$(GEOMETRYIMAGES_TXT) $(PLOTIMAGES_TXT)
-
-HTML_IMAGES_PNG = $(addprefix HTML/, $(IMAGES_PNG))
-
-IMAGES = $(IMAGES_EPS) $(IMAGES_PDF) $(IMAGES_PNG) $(IMAGES_TXT)
-
-SUB_SOURCE := arith.txi audio.txi basics.txi bugs.txi \
-	container.txi contrib.txi cp-idx.txi data.txi \
-	debug.txi diffeq.txi diagperm.txi dynamic.txi emacs.txi \
-	errors.txi eval.txi expr.txi fn-idx.txi func.txi geometry.txi \
-	gpl.txi grammar.txi image.txi install.txi interp.txi \
-	intro.txi io.txi linalg.txi matrix.txi nonlin.txi numbers.txi \
-	oop.txi op-idx.txi optim.txi package.txi plot.txi poly.txi preface.txi \
-	quad.txi set.txi signal.txi sparse.txi stats.txi \
-	stmt.txi strings.txi system.txi testfun.txi tips.txi var.txi
-
-SOURCES := $(SUB_SOURCE) $(SCRIPT_SOURCES)
-
-MAIN_TEXINFO := $(srcdir)/octave.texi
-
-SUB_TEXINFO := $(SUB_SOURCE:.txi=.texi)
-
-# Don't list ../conf.texi here.
-TEXINFO_SOURCE := $(MAIN_TEXINFO) $(SUB_TEXINFO) contributors.texi
-
-TEXINFO := $(TEXINFO_SOURCE) ../conf.texi
-
-# Do not use --output option argument, because this is not supported
-# by MiKTeX (compilation under Windows/MSVC assumes the use of MiKTeX
-# to build the doc).  Instead, copy the source .texi using the
-# targeted file name (e.g. to generate octave-a4.pdf, copy to
-# octave-a4.texi) and call texi2[dvi|pdf] on it.
-
-TEXI2DVICOMMAND = TEXINPUTS="..$(sepchar)$(srcdir)$(sepchar)$(srcdir)/..$(sepchar)$(TEXINPUTS)$(sepchar)" \
-	TEXMFCNF="..$(sepchar)$(srcdir)$(sepchar)$(srcdir)/..$(sepchar)$(TEXMFCNF)$(sepchar)" \
-	  $(TEXI2DVI)
-
-TEXI2PDFCOMMAND = TEXINPUTS="..$(sepchar)$(srcdir)$(sepchar)$(srcdir)/..$(sepchar)$(TEXINPUTS)$(sepchar)" \
-	TEXMFCNF="..$(sepchar)$(srcdir)$(sepchar)$(srcdir)/..$(sepchar)$(TEXMFCNF)$(sepchar)" \
-	  $(TEXI2PDF)
-
-FORMATTED = octave.info octave.pdf octave-a4.pdf octave.info-[0-9]*
-
-MAN_BASE := mkoctfile octave octave-bug octave-config
-MAN_SRC := $(addsuffix .1, $(MAN_BASE))
-
-DISTFILES = $(addprefix $(srcdir)/, Makefile.in contributors.in \
-  mkcontrib.awk dir  munge-texi.cc $(MAN_SRC) $(SOURCES) $(MAIN_TEXINFO)) \
-  $(SUB_TEXINFO) contributors.texi $(FORMATTED) $(IMAGES) mk_doc_cache.m \
-  doc-cache stmp-html
-
-DISTDIRS = HTML
-
-SUBDIRS :=
-
-# Look for version.h to get version information.
-xfiles := $(TOPDIR)/src/version.h $(srcdir)/$(TOPDIR)/src/version.h
-
-version_file := $(firstword $(foreach file, $(xfiles), $(wildcard $(file))))
-
-SPELL = $(patsubst %.texi, %.spell, $(TEXINFO))
-
-%.spell : %.texi
-	rm -f $@
-	$(SED) -e 's/@@/ at /g' -e 's/@[a-zA-Z]*//g' $< | spell > $@-t
-	mv $@-t $@
-
-all: octave.info octave.pdf octave-a4.pdf HTML/index.html doc-cache
-.PHONY: all
-
-DOCSTRING_FILES := $(TOPDIR)/src/DOCSTRINGS $(TOPDIR)/scripts/DOCSTRINGS
-
-doc-cache: $(DOCSTRING_FILES) mk_doc_cache.m
-	$(TOPDIR)/run-octave -f -q -H $(srcdir)/mk_doc_cache.m doc-cache $(DOCSTRING_FILES) || rm -f doc-cache
-
-$(TEXINFO): $(DOCSTRING_FILES) munge-texi$(BUILD_EXEEXT)
-
-munge-texi$(BUILD_EXEEXT): munge-texi.cc
-	$(BUILD_CXX) $(BUILD_CXXFLAGS) -o $@ $^ $(BUILD_LDFLAGS)
-
-$(DOCSTRING_FILES):
-	$(MAKE) -C $(dir $@) $(notdir $@)
-
-contributors.texi: contributors.in
-	$(AWK) -f $(srcdir)/mkcontrib.awk $(srcdir)/contributors.in > $@-t
-	mv $@-t $@
-
-octave-a4.texi: $(MAIN_TEXINFO)
-	cp $< $@
-
-octave-smallbook.texi: $(MAIN_TEXINFO)
-	cp $< $@
-
-$(SUB_TEXINFO) : %.texi : %.txi
-	./munge-texi $(foreach f, $(DOCSTRING_FILES), -d $(f)) < $< > $@-t
-	mv $@-t $@
-
-octave.info: $(IMAGES_TXT) $(TEXINFO) $(EXAMPLE_FILES)
-	-$(MAKEINFO) -I.. -I$(srcdir) -I$(srcdir)/.. $(MAIN_TEXINFO)
-
-octave.dvi: $(IMAGES_EPS) $(TEXINFO) $(EXAMPLE_FILES)
-	-$(TEXI2DVICOMMAND) $(MAIN_TEXINFO)
-
-octave-a4.dvi: $(IMAGES_EPS) $(TEXINFO) $(EXAMPLE_FILES) octave-a4.texi
-	-$(TEXI2DVICOMMAND) octave-a4.texi -t @afourpaper
-
-octave-smallbook.dvi: $(IMAGES_EPS) $(TEXINFO) $(EXAMPLE_FILES) octave-smallbook.texi
-	-$(TEXI2DVICOMMAND) octave-smallbook.texi -t @smallbook
-
-octave.ps: octave.dvi
-	-dvips -o $@ $<
-
-octave-a4.ps: octave-a4.dvi
-	-dvips -o $@ $<
-
-octave-smallbook.ps: octave-smallbook.dvi
-	-dvips -o $@ $<
-
-octave.pdf: $(IMAGES_PDF) $(TEXINFO) $(EXAMPLE_FILES)
-	-$(TEXI2PDFCOMMAND) $(MAIN_TEXINFO)
-
-octave-a4.pdf: $(IMAGES_PDF) $(TEXINFO) $(EXAMPLE_FILES) octave-a4.texi
-	-$(TEXI2PDFCOMMAND) octave-a4.texi -t @afourpaper
-
-octave-smallbook.pdf: $(IMAGES_PDF) $(TEXINFO) $(EXAMPLE_FILES) octave-smallbook.texi
-	-$(TEXI2PDFCOMMAND) octave-smallbook.texi -t @smallbook
-
-../../INSTALL.OCTAVE: install.texi
-	rm -f INSTALL
-	-$(MAKEINFO) -D INSTALLONLY \
-	  --no-validate --no-headers --no-split --output INSTALL \
-	  -I.. -I$(srcdir) -I$(srcdir)/.. $<
-	mv INSTALL ../../INSTALL.OCTAVE
-
-../../BUGS: bugs.texi
-	rm -f BUGS
-	-$(MAKEINFO) -D BUGSONLY \
-	  --no-validate --no-headers --no-split --output BUGS \
-	  -I.. -I$(srcdir) -I$(srcdir)/.. $<
-	mv BUGS ../../BUGS
-
-HTML/index.html: $(HTML_IMAGES_PNG) $(TEXINFO) $(EXAMPLE_FILES)
-	-$(MAKEINFO) --html --ifinfo --output=HTML -I.. -I$(srcdir) -I$(srcdir)/.. $(MAIN_TEXINFO)
-
-stmp-html: HTML
-	@if [ -f stmp-html ]; then \
-	  true; \
-	else \
-	  echo "touch stmp-html"; \
-	  touch stmp-html; \
-	fi
-
-HTML:
-	@if [ -d HTML ]; then \
-	  true; \
-	else \
-	  echo "mkdir HTML"; \
-	  mkdir HTML; \
-	fi
-
-$(HTML_IMAGES_PNG): HTML/%.png : %.png stmp-html
-	cp $(filter-out html-dir, $<) HTML
-
-define run-octave
-  $(TOPDIR)/run-octave -f -q -H -p $(srcdir) \
-    --eval "$(notdir $(basename $<)) ('$(notdir $(basename $@))', '$(patsubst .%,%, $(suffix $@))');"
-endef
-
-$(GEOMETRYIMAGES_EPS) $(GEOMETRYIMAGES_PNG) $(GEOMETRYIMAGES_TXT): geometryimages.m
-	$(run-octave)
-
-$(PLOTIMAGES_EPS) $(PLOTIMAGES_PNG) $(PLOTIMAGES_TXT): plotimages.m
-	$(run-octave)
-
-$(INTERPIMAGES_EPS) $(INTERPIMAGES_PNG) $(INTERPIMAGES_TXT): interpimages.m
-	$(run-octave)
-
-$(SPARSEIMAGES_EPS) $(SPARSEIMAGES_PNG) $(SPARSEIMAGES_TXT): sparseimages.m
-	$(run-octave)
-
-$(IMAGES_PDF) : %.pdf : %.eps
-	if [ -f $< ] ; then $(GHOSTSCRIPT) -dBATCH -dEPSCrop -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=$@ $< ; fi
-
-check: all
-.PHONY: check
-
-install install-strip: all
-	@$(subdir-for-command)
-	$(top_srcdir)/mkinstalldirs $(DESTDIR)$(man1dir) $(DESTDIR)$(infodir) $(DESTDIR)$(octetcdir)
-	@if test -d $(DESTDIR)$(man1dir); then \
-	  for f in $(MAN_BASE); do \
-	    rm -f $(DESTDIR)$(man1dir)/$$f$(man1ext); \
-	    echo "installing $(srcdir)/$$f.1 in $(DESTDIR)$(man1dir)"; \
-	    $(INSTALL_DATA) $(srcdir)/$$f.1 $(DESTDIR)$(man1dir)/$$f$(man1ext); \
-	  done ; \
-	fi
-	@if test -d $(DESTDIR)$(infodir); then \
-	  rm -f $(DESTDIR)$(infodir)/octave.info*; \
-	  echo "installing info files in $(DESTDIR)$(infodir)"; \
-	  if test -f octave.info; then \
-	    for f in octave.info*; do \
-	      $(INSTALL_DATA) $$f $(DESTDIR)$(infodir)/$$f; \
-	    done; \
-	  else \
-	    for f in $(srcdir)/octave.info*; do \
-	      $(INSTALL_DATA) $$f $(DESTDIR)$(infodir)/`basename $$f`; \
-	    done; \
-	  fi; \
-	  if test -f $(DESTDIR)$(infodir)/dir; then \
-	    if grep "^\* Octave: (octave)." $(DESTDIR)$(infodir)/dir > /dev/null; then \
-	      true; \
-	    else \
-	      echo ""; \
-	      echo "You should add the following entry"; \
-	      echo ""; \
-	      echo "* Octave: (octave)."; \
-	      echo "	Interactive language for numerical computations."; \
-	      echo ""; \
-	      echo "to $(DESTDIR)$(infodir)/dir."; \
-	      echo ""; \
-	    fi; \
-	  else \
-	    echo "installing $(srcdir)/dir in $(DESTDIR)$(infodir)"; \
-	    $(INSTALL_DATA) $(srcdir)/dir $(DESTDIR)$(infodir)/dir; \
-	  fi; \
-	fi
-	$(INSTALL_DATA) doc-cache $(DESTDIR)$(octetcdir)/doc-cache
-.PHONY: install install-strip
-
-uninstall:
-	@$(subdir-for-command)
-	rm -f $(DESTDIR)$(infodir)/octave.info*
-	rm -f $(DESTDIR)$(infodir)/dir
-	rm -f $(DESTDIR)$(octetcdir)/doc-cache
-	for f in $(MAN_BASE); do rm -f $(DESTDIR)$(man1dir)/$$f$(man1ext); done
-.PHONY: uninstall
-
-spell: $(SPELL)
-.PHONY: spell
-
-mostlyclean clean:
-	@$(subdir-for-command)
-	rm -f octave.cp octave.fn octave.in \
-	octave.ky octave.op octave.pg octave.rd octave.tp octave.vr \
-	octave.cps octave.fns octave.ins octave.kys octave.ops \
-	octave.pgs octave.rds octave.tps octave.vrs octave.aux \
-	octave.log octave.toc \
-	munge-texi.o \
-	octave-a4.cp octave-a4.fn octave-a4.in \
-	octave-a4.ky octave-a4.op octave-a4.pg octave-a4.rd octave-a4.tp octave-a4.vr \
-	octave-a4.cps octave-a4.fns octave-a4.ins octave-a4.kys octave-a4.ops \
-	octave-a4.pgs octave-a4.rds octave-a4.tps octave-a4.vrs octave-a4.aux \
-	octave-a4.log octave-a4.toc \
-	octave-smallbook.cp octave-smallbook.fn octave-smallbook.in \
-	octave-smallbook.ky octave-smallbook.op octave-smallbook.pg octave-smallbook.rd octave-smallbook.tp octave-smallbook.vr \
-	octave-smallbook.cps octave-smallbook.fns octave-smallbook.ins octave-smallbook.kys octave-smallbook.ops \
-	octave-smallbook.pgs octave-smallbook.rds octave-smallbook.tps octave-smallbook.vrs octave-smallbook.aux \
-	octave-smallbook.log octave-smallbook.toc
-.PHONY: mostlyclean clean 
-
-distclean: clean
-	@$(subdir-for-command)
-	rm -f Makefile
-.PHONY: distclean
-
-maintainer-clean: distclean clean-texi
-	rm -f munge-texi$(BUILD_EXEEXT) doc-cache stmp-html $(FORMATTED) $(IMAGES)
-	rm -rf HTML
-.PHONY: maintainer-clean
-
-clean-texi:
-	rm -f $(SUB_TEXINFO) contributors.texi octave-a4.texi octave-smallbook.texi
-.PHONY: clean-texi
-
-dist: all
-	ln $(DISTFILES) ../../`cat ../../.fname`/doc/interpreter
-	for dir in $(DISTDIRS); do \
-	  mkdir ../../`cat ../../.fname`/doc/interpreter/$$dir; \
-	  ln ../../doc/interpreter/$$dir/* ../../`cat ../../.fname`/doc/interpreter/$$dir; \
-	done
-.PHONY: dist
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/interpreter/config-images.sh	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,8 @@
+#! /bin/sh
+
+set -e
+
+: ${AWK=awk}
+
+$AWK -f images.awk images > images.mk-t
+../../move-if-change images.mk-t images.mk
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/interpreter/images	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,4 @@
+geometryimages.m voronoi triplot griddata convhull delaunay inpolygon
+interpimages.m interpft interpn interpderiv1 interpderiv2
+plotimages.m plot hist errorbar polar mesh plot3 extended
+sparseimages.m gplot grid spmatrix spchol spcholperm
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/interpreter/images.awk	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,30 @@
+BEGIN {
+  exts[1] = "eps";
+  exts[2] = "pdf";
+  exts[3] = "png";
+  exts[4] = "txt";
+  printf ("IMAGES_SRC =\n");
+  for (i = 1; i <= 4; i++) {
+    printf ("IMAGES_%s =\n", toupper (exts[i]));
+  }
+} {
+  script = $1;
+  basename = script;
+  sub (/\.m$/, "", basename);
+  ubasename = toupper (basename);
+  printf ("IMAGES_SRC += %s\n", script);
+  for (i = 1; i <= 4; i++) {
+    ext = exts[i];
+    uext = toupper (ext);
+
+    printf ("%s_%s =", ubasename, uext);
+    for (j = 2; j <= NF; j++)
+      printf (" %s.%s", $j, ext);
+    printf ("\n");
+
+    printf ("IMAGES_%s += $(%s_%s)\n", uext, ubasename, uext);
+
+    for (j = 2; j <= NF; j++)
+      printf ("%s.%s: %s\n\t$(TOPDIR)/run-octave -f -q -H -p $(srcdir) --eval \"%s ('%s', '%s');\"\n", $j, ext, script, basename, $j, ext);
+  }
+}
--- a/doc/interpreter/munge-texi.cc	Tue Nov 10 13:25:57 2009 -0500
+++ b/doc/interpreter/munge-texi.cc	Tue Nov 10 15:02:25 2009 -0500
@@ -47,7 +47,7 @@
 static void
 usage (void)
 {
-  std::cerr << "usage: munge-texi -d DOCSTRING-FILE file ...\n";
+  std::cerr << "usage: munge-texi DOCSTRING-FILE file ...\n";
   exit (1);
 }
 
@@ -310,17 +310,7 @@
 main (int argc, char **argv)
 {
   while (*++argv)
-    {
-      if (! strcmp (*argv, "-d"))
-	{
-	  if (*++argv)
-	    process_doc_file (*argv);
-	  else
-	    usage ();
-	}
-      else
-	break;
-    }
+    process_doc_file (*argv);
 
   process_texi_input_file (std::cin, std::cout);
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/liboctave/Makefile.am	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,65 @@
+# Makefile for octave's doc/liboctave directory
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+#               2005, 2006, 2007 John W. Eaton
+#
+# This file is part of Octave.
+# 
+# Octave is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation; either version 3 of the License, or (at
+# your option) any later version.
+# 
+# Octave is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with Octave; see the file COPYING.  If not, see
+# <http://www.gnu.org/licenses/>.
+
+TOPDIR = ../..
+
+include ../../common.mk
+
+AM_MAKEINFOFLAGS = -I.. -I$(srcdir) -I$(srcdir)/..
+AM_MAKEINFOHTMLFLAGS = -I.. -I$(srcdir) -I$(srcdir)/..
+
+TEXINFO_TEX = ../texinfo.tex
+
+TEXINPUTS = "..$(PATH_SEPARATOR)$(srcdir)$(PATH_SEPARATOR)$(srcdir)/..$(PATH_SEPARATOR)"
+export TEXINPUTS
+
+info_TEXINFOS = liboctave.texi
+
+liboctave_TEXINFOS = \
+  ../conf.texi \
+  array.texi \
+  bugs.texi \
+  cp-idx.texi \
+  dae.texi \
+  diffeq.texi \
+  error.texi \
+  factor.texi \
+  fn-idx.texi \
+  gpl.texi \
+  install.texi \
+  intro.texi \
+  matvec.texi \
+  nleqn.texi \
+  nlfunc.texi \
+  ode.texi \
+  optim.texi \
+  preface.texi \
+  quad.texi \
+  range.texi
+
+../conf.texi:
+	$(MAKE) -C .. conf.texi
+
+all-local: dvi html pdf ps
+
+EXTRA_DIST = liboctave.dvi liboctave.html liboctave.pdf liboctave.ps
+
+.NOTPARALLEL:
--- a/doc/liboctave/Makefile.in	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,119 +0,0 @@
-# Makefile for octave's doc/liboctave directory
-#
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-#               2005, 2006, 2007 John W. Eaton
-#
-# This file is part of Octave.
-# 
-# Octave is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 3 of the License, or (at
-# your option) any later version.
-# 
-# Octave is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with Octave; see the file COPYING.  If not, see
-# <http://www.gnu.org/licenses/>.
-
-TOPDIR = ../..
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-
-include $(TOPDIR)/Makeconf
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-
-################################################################################
-
-MAIN_TEXINFO = liboctave.texi
-
-SUB_TEXINFO = \
-	array.texi bugs.texi cp-idx.texi dae.texi diffeq.texi \
-	error.texi factor.texi fn-idx.texi install.texi intro.texi \
-	matvec.texi nleqn.texi nlfunc.texi ode.texi \
-	optim.texi preface.texi quad.texi range.texi
-
-TEXINFO_SOURCE = $(MAIN_TEXINFO) $(SUB_TEXINFO)
-
-TEXINFO = $(TEXINFO_SOURCE) ../conf.texi
-
-FORMATTED = liboctave.dvi liboctave.ps liboctave.pdf liboctave.info
-
-DISTFILES = $(addprefix $(srcdir)/, Makefile.in gpl.texi $(TEXINFO_SOURCE)) \
-	 $(FORMATTED)
-
-DISTDIRS = HTML
-
-SPELL = $(patsubst %.texi, %.spell, $(TEXINFO))
-
-%.spell : %.texi
-	rm -f $@
-	$(SED) -e 's/@@/ at /g' -e 's/@[a-zA-Z]*//g' $< | spell > $@.tmp
-	mv $@.tmp $@
-
-all: $(FORMATTED) HTML/index.html
-.PHONY: all
-
-liboctave.info: $(TEXINFO)
-	-$(MAKEINFO) -I.. -I$(srcdir) -I$(srcdir)/.. $<
-
-liboctave.dvi: $(TEXINFO)
-	-TEXINPUTS="..$(sepchar)$(srcdir)$(sepchar)$(srcdir)/..$(sepchar)$(TEXINPUTS)$(sepchar)" \
-	  $(TEXI2DVI) $<
-
-liboctave.ps: liboctave.dvi
-	-dvips -o $@ $<
-
-liboctave.pdf: $(TEXINFO)
-	-TEXINPUTS="..$(sepchar)$(srcdir)$(sepchar)$(srcdir)/..$(sepchar)$(TEXINPUTS)$(sepchar)" \
-	  $(TEXI2PDF) $<
-
-HTML/index.html: $(TEXINFO)
-	-$(MAKEINFO) --html --ifinfo --output=HTML -I.. -I$(srcdir) -I$(srcdir)/.. $<
-
-check:
-.PHONY: check
-
-install install-strip: all
-.PHONY: install install-strip
-
-uninstall:
-	rm -f $(DESTDIR)$(infodir)/liboctave.info*
-.PHONY: uninstall
-
-spell: $(SPELL)
-.PHONY: spell
-
-mostlyclean clean:
-	rm -f liboctave.cp liboctave.fn liboctave.pg liboctave.tp \
-	liboctave.vr liboctave.ky liboctave.op liboctave.vrs \
-	liboctave.kys liboctave.ops liboctave.cps liboctave.fns \
-	liboctave.pgs liboctave.tps liboctave.aux liboctave.log \
-	liboctave.toc
-.PHONY: mostlyclean clean
-
-distclean: clean
-	rm -f Makefile
-.PHONY: distclean
-
-maintainer-clean: distclean
-	rm -f tags TAGS liboctave.info liboctave.info-*
-	rm -f liboctave.dvi liboctave.ps liboctave.pdf
-	rm -rf HTML
-.PHONY: maintainer-clean
-
-dist: all
-	ln $(DISTFILES) ../../`cat ../../.fname`/doc/liboctave
-	for dir in $(DISTDIRS); do \
-	  mkdir ../../`cat ../../.fname`/doc/liboctave/$$dir; \
-	  ln ../../doc/liboctave/$$dir/* ../../`cat ../../.fname`/doc/liboctave/$$dir; \
-	done
-.PHONY: dist
--- a/doc/liboctave/liboctave.texi	Tue Nov 10 13:25:57 2009 -0500
+++ b/doc/liboctave/liboctave.texi	Tue Nov 10 15:02:25 2009 -0500
@@ -17,11 +17,16 @@
 % <http://www.gnu.org/licenses/>.
 
 
-\input texinfo  @c -*-texinfo-*-
+\input texinfo
 @setfilename liboctave.info
-@direntry
+
+@ifinfo
+@format
+START-INFO-DIR-ENTRY
 * liboctave: (liboctave). Octave C++ Classes
-@end direntry
+END-INFO-DIR-ENTRY
+@end format
+@end ifinfo
 
 @c @smallbook
 @c @setchapternewpage odd
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/refcard/Makefile.am	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,72 @@
+# Makefile for octave's doc/refcard directory
+#
+# Copyright (C) 1996, 1997, 2003, 2004, 2005, 2007 John W. Eaton
+#
+# This file is part of Octave.
+# 
+# Octave is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation; either version 3 of the License, or (at
+# your option) any later version.
+# 
+# Octave is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with Octave; see the file COPYING.  If not, see
+# <http://www.gnu.org/licenses/>.
+
+TOPDIR = ../..
+
+include ../../common.mk
+
+TEX = \
+  refcard.tex \
+  refcard-a4.tex \
+  refcard-legal.tex \
+  refcard-letter.tex 
+
+FORMATTED = \
+  refcard-a4.dvi \
+  refcard-a4.ps \
+  refcard-a4.pdf \
+  refcard-legal.dvi \
+  refcard-legal.ps \
+  refcard-legal.pdf \
+  refcard-letter.dvi \
+  refcard-letter.ps \
+  refcard-letter.pdf
+
+EXTRA_DIST = \
+  $(TEX) $(FORMATTED)
+
+all-local: $(FORMATTED)
+
+refcard-a4.dvi: refcard-a4.tex refcard.tex
+	-TEXINPUTS="$(srcdir):$(TEXINPUTS):" tex $<
+
+refcard-a4.ps: refcard-a4.dvi
+	-dvips -T 297mm,210mm -o $@ $<
+
+refcard-a4.pdf: refcard-a4.tex refcard.tex
+	-TEXINPUTS="$(srcdir):$(TEXINPUTS):" pdftex $<
+
+refcard-legal.dvi: refcard-legal.tex refcard.tex
+	-TEXINPUTS="$(srcdir):$(TEXINPUTS):" tex $<
+
+refcard-legal.ps: refcard-legal.dvi
+	-dvips -T 14in,8.5in -o $@ $<
+
+refcard-legal.pdf: refcard-legal.tex refcard.tex
+	-TEXINPUTS="$(srcdir):$(TEXINPUTS):" pdftex $<
+
+refcard-letter.dvi: refcard-letter.tex refcard.tex
+	-TEXINPUTS="$(srcdir):$(TEXINPUTS):" tex $<
+
+refcard-letter.ps: refcard-letter.dvi
+	-dvips -T 11in,8.5in -o $@ $<
+
+refcard-letter.pdf: refcard-letter.tex refcard.tex
+	-TEXINPUTS="$(srcdir):$(TEXINPUTS):" pdftex $<
--- a/doc/refcard/Makefile.in	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-# Makefile for octave's doc/refcard directory
-#
-# Copyright (C) 1996, 1997, 2003, 2004, 2005, 2007 John W. Eaton
-#
-# This file is part of Octave.
-# 
-# Octave is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 3 of the License, or (at
-# your option) any later version.
-# 
-# Octave is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with Octave; see the file COPYING.  If not, see
-# <http://www.gnu.org/licenses/>.
-
-TOPDIR = ../..
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-
-include $(TOPDIR)/Makeconf
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-
-################################################################################
-
-BASENAMES := refcard-letter refcard-a4 refcard-legal
-
-TEX := refcard.tex $(addsuffix .tex, $(BASENAMES))
-
-FORMATTED := $(addsuffix .dvi, $(BASENAMES)) \
-             $(addsuffix .ps,  $(BASENAMES)) \
-             $(addsuffix .pdf, $(BASENAMES))
-
-DISTFILES := $(addprefix $(srcdir)/, Makefile.in $(TEX)) $(FORMATTED)
-
-all: $(FORMATTED)
-
-refcard-a4.dvi: refcard-a4.tex refcard.tex
-	-TEXINPUTS="$(srcdir):$(TEXINPUTS):" tex $<
-
-refcard-a4.ps: refcard-a4.dvi
-	-dvips -T 297mm,210mm -o $@ $<
-
-refcard-a4.pdf: refcard-a4.tex refcard.tex
-	-TEXINPUTS="$(srcdir):$(TEXINPUTS):" pdftex $<
-
-refcard-legal.dvi: refcard-legal.tex refcard.tex
-	-TEXINPUTS="$(srcdir):$(TEXINPUTS):" tex $<
-
-refcard-legal.ps: refcard-legal.dvi
-	-dvips -T 14in,8.5in -o $@ $<
-
-refcard-legal.pdf: refcard-legal.tex refcard.tex
-	-TEXINPUTS="$(srcdir):$(TEXINPUTS):" pdftex $<
-
-refcard-letter.dvi: refcard-letter.tex refcard.tex
-	-TEXINPUTS="$(srcdir):$(TEXINPUTS):" tex $<
-
-refcard-letter.ps: refcard-letter.dvi
-	-dvips -T 11in,8.5in -o $@ $<
-
-refcard-letter.pdf: refcard-letter.tex refcard.tex
-	-TEXINPUTS="$(srcdir):$(TEXINPUTS):" pdftex $<
-
-check install install-strip uninstall:
-.PHONY: check install install-strip uninstall
-
-mostlyclean clean:
-	rm -f refcard-*.log
-.PHONY: mostlyclean clean
-
-distclean: clean
-	rm -f Makefile
-.PHONY: distclean
-
-maintainer-clean: distclean
-	rm -f tags TAGS	refcard-*.dvi refcard-*.ps refcard-*.pdf
-.PHONY: maintainer-clean
-
-dist: all
-	ln $(DISTFILES) ../../`cat ../../.fname`/doc/refcard
-.PHONY: dist
--- a/emacs/Makefile.in	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,70 +0,0 @@
-# Makefile for octave's emacs directory
-#
-# Copyright (C) 1997, 1998, 1999, 2003, 2005, 2006, 2007, 2008 John W. Eaton
-#
-# This file is part of Octave.
-# 
-# Octave is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 3 of the License, or (at
-# your option) any later version.
-# 
-# Octave is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with Octave; see the file COPYING.  If not, see
-# <http://www.gnu.org/licenses/>.
-
-TOPDIR = ..
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-
-include $(TOPDIR)/Makeconf
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_DATA = @INSTALL_DATA@
-
-EL_FILES = octave-hlp.el octave-inf.el octave-mod.el
-
-SOURCES = $(EL_FILES) octave-tags
-
-DISTFILES = $(addprefix $(srcdir)/, Makefile.in $(EL_FILES) octave-tags octave-tags.1 NEWS FIXME README)
-
-all:
-.PHONY: all
-
-install install-strip:
-	$(INSTALL_SCRIPT) octave-tags $(DESTDIR)$(bindir)/octave-tags
-.PHONY: install install-strip
-
-uninstall:
-	rm -f $(DESTDIR)$(bindir)/octave-tags
-.PHONY: uninstall
-
-tags:
-	ctags $(SOURCES)
-
-TAGS: $(SOURCES)
-	etags $(SOURCES)
-
-clean mostlyclean:
-.PHONY: clean mostlyclean
-
-distclean:
-	rm -f Makefile
-.PHONY: distclean
-
-maintainer-clean: distclean
-	rm -f tags TAGS
-.PHONY: maintainer-clean
-
-dist:
-	ln $(DISTFILES) ../`cat ../.fname`/emacs
-.PHONY: dist
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emacs/module.mk	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,10 @@
+EXTRA_DIST += \
+  emacs/NEWS \
+  emacs/README \
+  emacs/TODO \
+  emacs/module.mk \
+  emacs/octave-hlp.el \
+  emacs/octave-inf.el \
+  emacs/octave-mod.el \
+  emacs/octave-tags \
+  emacs/octave-tags.1
--- a/examples/@FIRfilter/Makefile.in	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,95 +0,0 @@
-# Makefile for octave's scripts/geometry directory
-#
-# Copyright (C) 2007, 2008, 2009 John W. Eaton
-#
-# This file is part of Octave.
-# 
-# Octave is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 3 of the License, or (at
-# your option) any later version.
-# 
-# Octave is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with Octave; see the file COPYING.  If not, see
-# <http://www.gnu.org/licenses/>.
-
-TOPDIR = ../..
-
-script_sub_dir = @FIRfilter
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-
-include $(TOPDIR)/Makeconf
-
-define do-mkpkgadd
-$(top_srcdir)/scripts/mkpkgadd $(srcdir) > PKG_ADD.t
-if [ -n "`cat PKG_ADD.t`" ]; then \
-  mv PKG_ADD.t PKG_ADD ; \
-else \
-  rm -f PKG_ADD.t ; \
-fi
-endef
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-
-SOURCES = \
-  display.m \
-  FIRfilter_aggregation.m \
-  FIRfilter.m \
-  subsasgn.m \
-  subsref.m
-
-DISTFILES = $(addprefix $(srcdir)/, Makefile.in $(SOURCES))
-
-FCN_FILES = $(addprefix $(srcdir)/, $(SOURCES))
-FCN_FILES_NO_DIR = $(notdir $(FCN_FILES))
-
-all: PKG_ADD
-.PHONY: all
-
-install install-strip:
-.PHONY: install install-strip
-
-uninstall:
-.PHONY: uninstall
-
-clean:
-.PHONY: clean
-
-PKG_ADD: $(FCN_FILES)
-	@echo "making PKG_ADD"
-	@$(do-mkpkgadd)
-
-tags: $(SOURCES)
-	ctags $(SOURCES)
-
-TAGS: $(SOURCES)
-	etags $(SOURCES)
-
-mostlyclean: clean
-.PHONY: mostlyclean
-
-distclean: clean
-	rm -f Makefile PKG_ADD
-.PHONY: distclean
-
-maintainer-clean: distclean
-	rm -f tags TAGS
-.PHONY: maintainer-clean
-
-dist:
-	ln $(DISTFILES) ../../`cat ../../.fname`/examples/$(script_sub_dir)
-.PHONY: dist
-
-check-m-sources:
-	@$(do-check-m-sources)
-.PHONY: check-m-sources
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/@FIRfilter/module.mk	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,12 @@
+FCN_FILE_DIRS += @FIRfilter
+
+EXTRA_DIST += @FIRfilter/module.mk
+
+at_FIRfilter_FCN_FILES = \
+  @FIRfilter/display.m \
+  @FIRfilter/FIRfilter_aggregation.m \
+  @FIRfilter/FIRfilter.m \
+  @FIRfilter/subsasgn.m \
+  @FIRfilter/subsref.m
+
+FCN_FILES += $(at_FIRfilter_FCN_FILES)
--- a/examples/@polynomial/Makefile.in	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,104 +0,0 @@
-# Makefile for octave's scripts/geometry directory
-#
-# Copyright (C) 2007, 2008, 2009 John W. Eaton
-#
-# This file is part of Octave.
-# 
-# Octave is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 3 of the License, or (at
-# your option) any later version.
-# 
-# Octave is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with Octave; see the file COPYING.  If not, see
-# <http://www.gnu.org/licenses/>.
-
-TOPDIR = ../..
-
-script_sub_dir = @polynomial
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-
-include $(TOPDIR)/Makeconf
-
-define do-mkpkgadd
-$(top_srcdir)/scripts/mkpkgadd $(srcdir) > PKG_ADD.t
-if [ -n "`cat PKG_ADD.t`" ]; then \
-  mv PKG_ADD.t PKG_ADD ; \
-else \
-  rm -f PKG_ADD.t ; \
-fi
-endef
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-
-SOURCES = \
-  display.m \
-  double.m \
-  end.m \
-  get.m \
-  mtimes.m \
-  numel.m \
-  plot.m \
-  polynomial.m \
-  polynomial_superiorto.m \
-  polyval.m \
-  roots.m \
-  set.m \
-  subsasgn.m \
-  subsref.m
-
-DISTFILES = $(addprefix $(srcdir)/, Makefile.in $(SOURCES))
-
-FCN_FILES = $(addprefix $(srcdir)/, $(SOURCES))
-FCN_FILES_NO_DIR = $(notdir $(FCN_FILES))
-
-all: PKG_ADD
-.PHONY: all
-
-install install-strip:
-.PHONY: install install-strip
-
-uninstall:
-.PHONY: uninstall
-
-clean:
-.PHONY: clean
-
-PKG_ADD: $(FCN_FILES)
-	@echo "making PKG_ADD"
-	@$(do-mkpkgadd)
-
-tags: $(SOURCES)
-	ctags $(SOURCES)
-
-TAGS: $(SOURCES)
-	etags $(SOURCES)
-
-mostlyclean: clean
-.PHONY: mostlyclean
-
-distclean: clean
-	rm -f Makefile PKG_ADD
-.PHONY: distclean
-
-maintainer-clean: distclean
-	rm -f tags TAGS
-.PHONY: maintainer-clean
-
-dist:
-	ln $(DISTFILES) ../../`cat ../../.fname`/examples/$(script_sub_dir)
-.PHONY: dist
-
-check-m-sources:
-	@$(do-check-m-sources)
-.PHONY: check-m-sources
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/@polynomial/module.mk	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,21 @@
+FCN_FILE_DIRS += @polynomial
+
+EXTRA_DIST += @polynomial/module.mk
+
+at_polynomial_FCN_FILES = \
+  @polynomial/display.m \
+  @polynomial/double.m \
+  @polynomial/end.m \
+  @polynomial/get.m \
+  @polynomial/mtimes.m \
+  @polynomial/numel.m \
+  @polynomial/plot.m \
+  @polynomial/polynomial.m \
+  @polynomial/polynomial_superiorto.m \
+  @polynomial/polyval.m \
+  @polynomial/roots.m \
+  @polynomial/set.m \
+  @polynomial/subsasgn.m \
+  @polynomial/subsref.m
+
+FCN_FILES += $(at_polynomial_FCN_FILES)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/Makefile.am	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,111 @@
+# Makefile for octave's examples directory
+#
+# Copyright (C) 1996, 1997, 2003, 2005, 2006, 2007, 2008, 2009 John W. Eaton
+#
+# This file is part of Octave.
+# 
+# Octave is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation; either version 3 of the License, or (at
+# your option) any later version.
+# 
+# Octave is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with Octave; see the file COPYING.  If not, see
+# <http://www.gnu.org/licenses/>.
+
+TOPDIR = ..
+
+include ../common.mk
+
+dist_archlib_SCRIPTS = info-emacs-info info-emacs-octave-help
+
+IMAGE_FILES = octave-sombrero.png
+
+EXTRA_DIST = \
+  $(IMAGE_FILES) \
+  addtwomatrices.cc \
+  celldemo.cc \
+  embedded.cc \
+  firstmexdemo.c \
+  fortdemo.cc \
+  fortsub.f \
+  funcdemo.cc \
+  globaldemo.cc \
+  hello.cc \
+  helloworld.cc \
+  make_int.cc \
+  mycell.c \
+  myfeval.c \
+  myfevalf.f \
+  myfunc.c \
+  myhello.c \
+  mypow2.c \
+  myprop.c \
+  myset.c \
+  mysparse.c \
+  mystring.c \
+  mystruct.c \
+  octave.desktop.in \
+  oregonator.cc \
+  oregonator.m \
+  paramdemo.cc \
+  standalone.cc \
+  stringdemo.cc \
+  structdemo.cc \
+  unwinddemo.cc
+
+FCN_FILE_DIRS =
+
+FCN_FILES =
+
+include @polynomial/module.mk
+include @FIRfilter/module.mk
+
+EXTRA_DIST += $(FCN_FILES)
+
+all-local: octave.desktop
+
+octave.desktop: octave.desktop.in Makefile
+	echo "making $@ from $<"
+	$(SED) < $< > $@-t \
+	  -e "s|%OCTAVE_IMAGEDIR%|${imagedir}|" \
+	  -e "s|%OCTAVE_PREFIX%|${prefix}|"
+	mv $@-t $@
+
+install-data-local: install-images install-desktop
+.PHONY: install-data-local
+
+uninstall-local: uninstall-images uninstall-desktop
+.PHONY: uninstall-local
+
+install-images:
+	$(MKDIR_P) $(DESTDIR)$(imagedir)
+	for f in $(IMAGE_FILES); do \
+	  rm -f $(DESTDIR)$(imagedir)/$$f; \
+	  $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(imagedir)/$$f; \
+	done
+.PHONY: install-images
+
+install-desktop:
+	-if test -n "$(DESKTOP_FILE_INSTALL)"; then \
+	  $(DESKTOP_FILE_INSTALL) --dir=$(DESTDIR)$(datadir)/applications \
+	    --vendor www.octave.org octave.desktop; \
+	fi
+.PHONY: install-desktop
+
+uninstall-images:
+	for f in $(IMAGE_FILES); do \
+	  rm -f $(DESTDIR)$(imagedir)/$$f; \
+	done
+.PHONY: uninstall-images
+
+uninstall-desktop:
+	if test -n "$(DESKTOP_FILE_INSTALL)"; then \
+	  rm -f $(DESTDIR)$(datadir)/applications/www.octave.org-octave.desktop; \
+	fi
+.PHONY: uninstall-desktop
\ No newline at end of file
--- a/examples/Makefile.in	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,142 +0,0 @@
-# Makefile for octave's examples directory
-#
-# Copyright (C) 1996, 1997, 2003, 2005, 2006, 2007, 2008, 2009 John W. Eaton
-#
-# This file is part of Octave.
-# 
-# Octave is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 3 of the License, or (at
-# your option) any later version.
-# 
-# Octave is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with Octave; see the file COPYING.  If not, see
-# <http://www.gnu.org/licenses/>.
-
-TOPDIR = ..
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-
-include $(TOPDIR)/Makeconf
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_DATA = @INSTALL_DATA@
-
-SUBDIRS = @polynomial @FIRfilter
-
-DISTSUBDIRS = $(SUBDIRS)
-
-SCRIPTS = info-emacs-info info-emacs-octave-help
-
-SOURCES = \
-  addtwomatrices.cc \
-  celldemo.cc \
-  embedded.cc \
-  firstmexdemo.c \
-  fortdemo.cc \
-  fortsub.f \
-  funcdemo.cc \
-  globaldemo.cc \
-  hello.cc \
-  helloworld.cc \
-  make_int.cc \
-  mycell.c \
-  myfeval.c \
-  myfevalf.f \
-  myfunc.c \
-  myhello.c \
-  mypow2.c \
-  myprop.c \
-  myset.c \
-  mysparse.c \
-  mystring.c \
-  mystruct.c \
-  octave.desktop.in \
-  oregonator.cc \
-  oregonator.m \
-  paramdemo.cc \
-  standalone.cc \
-  stringdemo.cc \
-  structdemo.cc \
-  unwinddemo.cc
-
-IMAGE_FILES = $(srcdir)/octave-sombrero.png
-IMAGE_FILES_NO_DIR = $(notdir $(IMAGE_FILES))
-
-DISTFILES = $(addprefix $(srcdir)/, Makefile.in $(SOURCES) $(SCRIPTS)) \
-	 $(IMAGE_FILES)
-
-all: $(SUBDIRS) octave.desktop
-.PHONY: all
-
-$(SUBDIRS):
-	$(MAKE) -C $@ all
-.PHONY: $(SUBDIRS)
-
-octave.desktop: octave.desktop.in Makefile ../Makeconf
-	echo "making $@ from $<"
-	$(SED) < $< > $@-t \
-	  -e "s|%OCTAVE_IMAGEDIR%|${imagedir}|" \
-	  -e "s|%OCTAVE_PREFIX%|${prefix}|"
-	mv $@-t $@
-
-install install-strip:
-	for f in $(SCRIPTS); do \
-	  $(INSTALL_SCRIPT) $(srcdir)/$$f $(DESTDIR)$(archlibdir)/$$f; \
-	done
-	$(top_srcdir)/mkinstalldirs $(DESTDIR)$(imagedir)
-	for f in $(IMAGE_FILES_NO_DIR); do \
-	  rm -f $(DESTDIR)$(imagedir)/$$f; \
-	  $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(imagedir)/$$f; \
-	done
-	-if test -n "$(DESKTOP_FILE_INSTALL)"; then \
-	  $(DESKTOP_FILE_INSTALL) --dir=$(DESTDIR)$(datadir)/applications \
-	    --vendor www.octave.org octave.desktop; \
-	fi
-.PHONY: install install-strip
-
-uninstall:
-	for f in $(SCRIPTS); do \
-	  rm -f $(DESTDIR)$(archlibdir)/$$f; \
-	done
-	for f in $(IMAGE_FILES_NO_DIR); do \
-	  rm -f $(DESTDIR)$(imagedir)/$$f; \
-	done
-	if test -n "$(DESKTOP_FILE_INSTALL)"; then \
-	  rm -f $(DESTDIR)$(datadir)/applications/www.octave.org-octave.desktop; \
-	fi
-.PHONY: uninstall
-
-tags:
-	ctags $(SOURCES)
-
-TAGS: $(SOURCES)
-	etags $(SOURCES)
-
-clean mostlyclean:
-.PHONY: clean mostlyclean
-
-distclean::
-	rm -f Makefile octave.desktop
-.PHONY: distclean
-
-maintainer-clean:: distclean
-	rm -f tags TAGS
-.PHONY: maintainer-clean
-
-distclean maintainer-clean::
-	@$(subdir-for-command)
-
-dist:
-	ln $(DISTFILES) ../`cat ../.fname`/examples
-	for dir in $(DISTSUBDIRS); do mkdir ../`cat ../.fname`/examples/$$dir; $(MAKE) -C $$dir $@; done
-.PHONY: dist
--- a/install-sh	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,119 +0,0 @@
-#!/bin/sh
-
-#
-# install - install a program, script, or datafile
-# This comes from X11R5; it is not part of GNU.
-#
-# $XConsortium: install.sh,v 1.2 89/12/18 14:47:22 jim Exp $
-#
-# This script is compatible with the BSD install script, but was written
-# from scratch.
-#
-
-
-# set DOITPROG to echo to test this script
-
-# Don't use :- since 4.3BSD and earlier shells don't like it.
-doit="${DOITPROG-}"
-
-
-# put in absolute paths if you don't have them in your path; or use env. vars.
-
-mvprog="${MVPROG-mv}"
-cpprog="${CPPROG-cp}"
-chmodprog="${CHMODPROG-chmod}"
-chownprog="${CHOWNPROG-chown}"
-chgrpprog="${CHGRPPROG-chgrp}"
-stripprog="${STRIPPROG-strip}"
-rmprog="${RMPROG-rm}"
-
-instcmd="$mvprog"
-chmodcmd=""
-chowncmd=""
-chgrpcmd=""
-stripcmd=""
-rmcmd="$rmprog -f"
-mvcmd="$mvprog"
-src=""
-dst=""
-
-while [ x"$1" != x ]; do
-    case $1 in
-	-c) instcmd="$cpprog"
-	    shift
-	    continue;;
-
-	-m) chmodcmd="$chmodprog $2"
-	    shift
-	    shift
-	    continue;;
-
-	-o) chowncmd="$chownprog $2"
-	    shift
-	    shift
-	    continue;;
-
-	-g) chgrpcmd="$chgrpprog $2"
-	    shift
-	    shift
-	    continue;;
-
-	-s) stripcmd="$stripprog"
-	    shift
-	    continue;;
-
-	*)  if [ x"$src" = x ]
-	    then
-		src=$1
-	    else
-		dst=$1
-	    fi
-	    shift
-	    continue;;
-    esac
-done
-
-if [ x"$src" = x ]
-then
-	echo "install:  no input file specified"
-	exit 1
-fi
-
-if [ x"$dst" = x ]
-then
-	echo "install:  no destination specified"
-	exit 1
-fi
-
-
-# If destination is a directory, append the input filename; if your system
-# does not like double slashes in filenames, you may need to add some logic
-
-if [ -d $dst ]
-then
-	dst="$dst"/`basename $src`
-fi
-
-# Make a temp file name in the proper directory.
-
-dstdir=`dirname $dst`
-dsttmp=$dstdir/#inst.$$#
-
-# Move or copy the file name to the temp name
-
-$doit $instcmd $src $dsttmp
-
-# and set any options; do chmod last to preserve setuid bits
-
-if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; fi
-if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; fi
-if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; fi
-if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; fi
-
-# Now rename the file to the real destination.
-
-$doit $rmcmd $dst
-$doit $mvcmd $dsttmp $dst
-
-
-exit 0
--- a/libcruft/ChangeLog	Tue Nov 10 13:25:57 2009 -0500
+++ b/libcruft/ChangeLog	Tue Nov 10 15:02:25 2009 -0500
@@ -1,3 +1,20 @@
+2009-11-10  John W. Eaton  <jwe@octave.org>
+
+	* Makefile.am, amos/module.mk, blas-xtra/module.mk,
+	blas/module.mk, daspk/module.mk, dasrt/module.mk, dassl/module.mk,
+	fftpack/module.mk, lapack-xtra/module.mk, lapack/module.mk,
+	misc/module.mk, odepack/module.mk, ordered-qz/module.mk,
+	quadpack/module.mk, ranlib/module.mk, slatec-err/module.mk,
+	slatec-fn/module.mk, villad/module.mk: New files.
+
+	* Makefile.in, Makerules.in, amos/Makefile.in,
+	blas-xtra/Makefile.in, blas/Makefile.in, daspk/Makefile.in,
+	dasrt/Makefile.in, dassl/Makefile.in, fftpack/Makefile.in,
+	lapack-xtra/Makefile.in, lapack/Makefile.in, misc/Makefile.in,
+	odepack/Makefile.in, ordered-qz/Makefile.in, quadpack/Makefile.in,
+	ranlib/Makefile.in, slatec-err/Makefile.in, slatec-fn/Makefile.in,
+	villad/Makefile.in: Delete.
+
 2009-09-17  John W. Eaton  <jwe@octave.org>
 
 	* misc/oct-dlldefs.h: Delete.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libcruft/Makefile.am	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,56 @@
+# Makefile for octave's libcruft directory
+#
+# Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+#               2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 John W. Eaton
+#
+# This file is part of Octave.
+# 
+# Octave is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation; either version 3 of the License, or (at
+# your option) any later version.
+# 
+# Octave is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with Octave; see the file COPYING.  If not, see
+# <http://www.gnu.org/licenses/>.
+
+TOPDIR = ..
+
+include ../common.mk
+
+octlib_LTLIBRARIES = libcruft.la
+
+AUTOMAKE_OPTIONS = subdir-objects
+
+libcruft_la_SOURCES =
+
+libcruft_la_LDFLAGS = -release $(version) $(NO_UNDEFINED_LDFLAG)
+
+libcruft_la_LIBADD = $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)
+
+octinclude_HEADERS =
+
+EXTRA_DIST = ChangeLog STOP.patch mkf77def.in
+
+include amos/module.mk
+include blas/module.mk
+include blas-xtra/module.mk
+include daspk/module.mk
+include dasrt/module.mk
+include dassl/module.mk
+include fftpack/module.mk
+include lapack/module.mk
+include lapack-xtra/module.mk
+include misc/module.mk
+include odepack/module.mk
+include ordered-qz/module.mk
+include quadpack/module.mk
+include ranlib/module.mk
+include slatec-err/module.mk
+include slatec-fn/module.mk
+include villad/module.mk
--- a/libcruft/Makefile.in	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,205 +0,0 @@
-# Makefile for octave's libcruft directory
-#
-# Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-#               2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 John W. Eaton
-#
-# This file is part of Octave.
-# 
-# Octave is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 3 of the License, or (at
-# your option) any later version.
-# 
-# Octave is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with Octave; see the file COPYING.  If not, see
-# <http://www.gnu.org/licenses/>.
-
-TOPDIR = ..
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-
-include $(TOPDIR)/Makeconf
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-
-# List of the directories that contain Fortran source.  Simply copying
-# a new .f file into one of these directories is sufficient to have it
-# added to $(LIBPRE)cruft.a.  If you add a new directory here, you also need
-# generate a new configure script in the top-level directory (edit
-# configure.in and run autoconf).
-
-# Some of the directories in libcruft may be only optionally built,
-# e.g. if they are already present on the system.  For these, their
-# dirname is substituted by configure and may be the empty string.
-
-CRUFT_DIRS = amos @BLAS_DIR@ blas-xtra daspk dasrt dassl \
-	@FFT_DIR@ @LAPACK_DIR@ lapack-xtra \
-	misc odepack ordered-qz quadpack ranlib \
-	slatec-err slatec-fn villad
-
-SUBDIRS = $(CRUFT_DIRS)
-
-DISTSUBDIRS = $(sort $(CRUFT_DIRS) blas fftpack lapack)
-
-CLEAN_SUBDIRS = $(DISTSUBDIRS)
-
-DISTFILES = Makefile.in ChangeLog Makerules.in $(SOURCES) \
-	STOP.patch mkf77def.in
-
-XTRA_CRUFT_SH_LDFLAGS = @XTRA_CRUFT_SH_LDFLAGS@
-SH_LDFLAGS += $(XTRA_CRUFT_SH_LDFLAGS)
-
-LINK_DEPS = $(BLAS_LIBS) $(FLIBS)
-
-all: libraries
-.PHONY: all
-
-mkf77def: mkf77def.in $(TOPDIR)/Makeconf
-	@$(do-subst-f77-mangling)
-	chmod a+rx $@
-
-$(SUBDIRS): mkf77def
-	$(MAKE) -C $@ all
-.PHONY: $(SUBDIRS)
-
-# FIXME -- this should build the shared library directly from
-# a normal archive file (created from PIC code, though).
-
-MISC_OBJ := misc/f77-extern.o misc/f77-fcn.o misc/lo-error.o \
-  misc/quit.o misc/cquit.o
-
-CRUFT_FSRC := $(foreach dir, $(SUBDIRS), $(wildcard $(srcdir)/$(dir)/*.f))
-CRUFT_OBJ2 := $(patsubst $(srcdir)/%, %, $(CRUFT_FSRC))
-CRUFT_OBJ1 := $(patsubst %.f, %.o, $(CRUFT_OBJ2))
-CRUFT_OBJ := $(CRUFT_OBJ1) $(MISC_OBJ)
-CRUFT_DEFS := $(patsubst %.f, %.def, $(CRUFT_OBJ2))
-
-ifeq ($(SHARED_LIBS), true)
-  ifdef FPICFLAG
-    CRUFT_OBJ_DIR := $(dir $(CRUFT_OBJ))
-    CRUFT_OBJ_PICDIR := $(addsuffix pic/, $(CRUFT_OBJ_DIR))
-    CRUFT_OBJ_NOTDIR := $(notdir $(CRUFT_OBJ))
-    CRUFT_PICOBJ := $(join $(CRUFT_OBJ_PICDIR), $(CRUFT_OBJ_NOTDIR))
-  else
-    CRUFT_PICOBJ := $(CRUFT_OBJ)
-  endif
-endif
-
-ifeq ($(SHARED_LIBS), true)
-  ifeq ($(STATIC_LIBS), true)
-    LIBRARIES = $(LIBPRE)cruft.$(LIBEXT) $(SHLPRE)cruft.$(SHLEXT_VER)
-  else
-    LIBRARIES = $(SHLPRE)cruft.$(SHLEXT_VER)
-  endif
-else
-  ifeq ($(STATIC_LIBS), true)
-    LIBRARIES = $(LIBPRE)cruft.$(LIBEXT)
-  else
-    LIBRARIES =
-  endif
-endif
-
-$(CRUFT_DEFS): $(SUBDIRS)
-
-cruft.def: $(CRUFT_DEFS)
-	echo "EXPORTS" > $@
-	cat $(CRUFT_DEFS) >> $@
-
-libraries: cruft.def
-	$(MAKE) $(LIBRARIES)
-.PHONY: libraries
-
-$(LIBPRE)cruft.$(LIBEXT): $(CRUFT_OBJ)
-	rm -f $@
-	$(AR) $(ARFLAGS) $@ $^
-	$(RANLIB) $@
-
-$(SHLPRE)cruft.$(SHLEXT_VER): $(SHLPRE)cruft.$(SHLEXT)
-	rm -f $@
-	$(LN_S) $< $@
-
-$(SHLPRE)cruft.$(SHLEXT): $(CRUFT_PICOBJ)
-	rm -f $@
-	$(SH_LD) $(SH_LDFLAGS) $(SONAME_FLAGS) -o $@ $^ $(LINK_DEPS)
-
-$(CRUFT_OBJ):
-
-check: all
-.PHONY: check
-
-install install-strip uninstall::
-	@$(subdir-for-command)
-
-clean mostlyclean distclean maintainer-clean::
-	@$(foreach d, $(CLEAN_SUBDIRS), $(do-subdir-for-command))
-
-install::
-	$(top_srcdir)/mkinstalldirs $(DESTDIR)$(octlibdir)
-	if $(STATIC_LIBS); then \
-	  rm -f $(DESTDIR)$(octlibdir)/$(LIBPRE)cruft.$(LIBEXT) ; \
-	  $(INSTALL_DATA) $(LIBPRE)cruft.$(LIBEXT) \
-	    $(DESTDIR)$(octlibdir)/$(LIBPRE)cruft.$(LIBEXT) ; \
-	  $(RANLIB) $(DESTDIR)$(octlibdir)/$(LIBPRE)cruft.$(LIBEXT) ; \
-	fi
-	if $(SHARED_LIBS); then \
-	  rm -f $(DESTDIR)$(octlibdir)/$(SHLLIBPRE)cruft.$(SHLLIB_VER); \
-	  $(INSTALL) \
-	    $(SHLLIBPRE)cruft.$(SHLLIB) $(DESTDIR)$(octlibdir)/$(SHLLIBPRE)cruft.$(SHLLIB_VER); \
-	  rm -f $(DESTDIR)$(octlibdir)/$(SHLLIBPRE)cruft.$(SHLLIB); \
-	  (cd $(DESTDIR)$(octlibdir); \
-	  $(LN_S) $(SHLLIBPRE)cruft.$(SHLLIB_VER) $(DESTDIR)$(octlibdir)/$(SHLLIBPRE)cruft.$(SHLLIB)); \
-	  if  test x$(SHLBIN) != x ; then \
-	    rm -f $(DESTDIR)$(bindir)/$(SHLBINPRE)cruft.$(SHLBIN); \
-	    $(INSTALL_PROGRAM) \
-	      $(SHLBINPRE)cruft.$(SHLBIN) $(DESTDIR)$(bindir)/$(SHLBINPRE)cruft.$(SHLBIN); \
-	  fi; \
-	fi
-
-install-strip::
-	$(MAKE) INSTALL_PROGRAM="$(INSTALL_PROGRAM) -s" install
-
-uninstall::
-	rm -f $(DESTDIR)$(octlibdir)/$(LIBPRE)cruft.$(LIBEXT)
-	rm -f $(DESTDIR)$(octlibdir)/$(SHLLIBPRE)cruft.$(SHLLIB)
-	rm -f $(DESTDIR)$(octlibdir)/$(SHLLIBPRE)cruft.$(SHLLIB_VER)
-	if test x$(SHLBIN) != x; then \
-	  rm -f $(DESTDIR)$(bindir)/$(SHLBINPRE)cruft.$(SHLBIN); \
-	  rm -f $(DESTDIR)$(bindir)/$(SHLBINPRE)cruft.$(SHLBIN_VER); \
-	fi
-
-tags TAGS:: $(SOURCES)
-	$(SUBDIR_FOR_COMMAND)
-
-tags::
-	ctags $(SOURCES)
-
-TAGS:: $(SOURCES)
-	etags $(SOURCES)
-
-clean mostlyclean distclean maintainer-clean::
-	rm -f $(LIBPRE)cruft.$(LIBEXT)
-	rm -f $(SHLPRE)cruft.$(SHLEXT_VER) $(SHLPRE)cruft.$(SHLEXT)
-	rm -f $(SHLBINPRE)cruft.$(SHLBIN_VER) $(SHLBINPRE)cruft.$(SHLBIN)
-	rm -f $(CRUFT_DEFS) cruft.def mkf77def
-
-distclean maintainer-clean::
-	rm -f Makefile Makerules so_locations
-
-maintainer-clean::
-	rm -f tags TAGS
-
-dist:
-	for dir in $(DISTSUBDIRS); do mkdir ../`cat ../.fname`/libcruft/$$dir; $(MAKE) -C $$dir $@; done
-	ln $(addprefix $(srcdir)/, $(DISTFILES)) ../`cat ../.fname`/libcruft
-.PHONY: dist
-
-.NOTPARALLEL:
--- a/libcruft/Makerules.in	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,145 +0,0 @@
-# @configure_input@
-#
-# Common rules for octave's libcruft directories.
-#
-# FIXME -- assumes that the libcruft directory tree is only
-# one level deep.
-#
-# Copyright (C) 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2003, 2005,
-#               2006, 2007, 2008, 2009 John W. Eaton
-#
-# This file is part of Octave.
-# 
-# Octave is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 3 of the License, or (at
-# your option) any later version.
-# 
-# Octave is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with Octave; see the file COPYING.  If not, see
-# <http://www.gnu.org/licenses/>.
-
-
-DLL_CDEFS = @CRUFT_DLL_DEFS@
-DLL_CXXDEFS = @CRUFT_DLL_DEFS@
-
-CRUFT_FSRC = $(addprefix $(srcdir)/, $(FSRC))
-CRUFT_CSRC = $(addprefix $(srcdir)/, $(CSRC) $(CEXTRA))
-CRUFT_CXXSRC = $(addprefix $(srcdir)/, $(CXXSRC))
-
-CRUFT_SRC = $(CRUFT_FSRC) $(CRUFT_CSRC) $(CRUFT_CXXSRC)
-
-CRUFT_FBASE = $(basename $(notdir $(CRUFT_FSRC)))
-CRUFT_CBASE = $(basename $(notdir $(CRUFT_CSRC)))
-CRUFT_CXXBASE = $(basename $(notdir $(CRUFT_CXXSRC)))
-
-CRUFT_BASE = $(CRUFT_FBASE) $(CRUFT_CBASE) $(CRUFT_CXXBASE)
-
-CRUFT_FOBJ = $(addsuffix .o, $(CRUFT_FBASE))
-CRUFT_COBJ = $(addsuffix .o, $(CRUFT_CBASE))
-CRUFT_CXXOBJ = $(addsuffix .o, $(CRUFT_CXXBASE))
-
-CRUFT_OBJ = $(CRUFT_FOBJ) $(CRUFT_COBJ) $(CRUFT_CXXOBJ)
-
-CRUFT_FDEFS = $(patsubst %.f, %.def, $(notdir $(CRUFT_FSRC)))
-CRUFT_CDEFS = $(patsubst %.c, %.def, $(notdir $(CRUFT_CSRC)))
-CRUFT_CXXDEFS = $(patsubst %.cc, %.def, $(notdir $(CRUFT_CXXSRC)))
-
-CRUFT_DEFS = $(CRUFT_FDEFS) $(CRUFT_CDEFS) $(CRUFT_CXXDEFS)
-
-DISTFILES = $(CRUFT_SRC) $(addprefix $(srcdir)/, Makefile.in $(SPECIAL))
-
-ifeq ($(SHARED_LIBS), true)
-  ifdef FPICFLAG
-    CRUFT_FPICOBJ := $(addprefix pic/, $(CRUFT_FOBJ))
-  else
-    CRUFT_FPICOBJ := $(CRUFT_FOBJ)
-  endif
-  ifdef CPICFLAG
-    CRUFT_CPICOBJ := $(addprefix pic/, $(CRUFT_COBJ) $(CEXTRA))
-  else
-    CRUFT_CPICOBJ := $(CRUFT_COBJ) $(CEXTRA)
-  endif
-  ifdef CXXPICFLAG
-    CRUFT_CXXPICOBJ := $(addprefix pic/, $(CRUFT_CXXOBJ))
-  else
-    CRUFT_CXXPICOBJ := $(CRUFT_CXXOBJ)
-  endif
-  CRUFT_PICOBJ := $(CRUFT_FPICOBJ) $(CRUFT_CPICOBJ) $(CRUFT_CXXPICOBJ)
-endif
-
-CWD = $(shell pwd)
-THISDIR = $(notdir $(CWD))
-
-ifeq ($(STATIC_LIBS), true)
-  LIBCRUFT_DEPEND := $(CRUFT_OBJ)
-.PRECIOUS: $(CRUFT_OBJ)
-endif
-
-ifeq ($(SHARED_LIBS), true)
-  LIBCRUFT_PICDEPEND := $(CRUFT_PICOBJ)
-.PRECIOUS: $(CRUFT_PICOBJ)
-endif
-
-all: pic $(CRUFT_DEFS) $(LIBCRUFT_DEPEND) $(LIBCRUFT_PICDEPEND)
-	@echo "warning: run make in parent directory to update libraries"
-.PHONY: all
-
-stmp-pic: pic
-	@if [ -f stmp-pic ]; then \
-	  true; \
-	else \
-	  echo "touch stmp-pic"; \
-	  touch stmp-pic; \
-	fi
-
-pic:
-	@if [ -d pic ]; then \
-	  true; \
-	else \
-	  echo "mkdir pic"; \
-	  mkdir pic; \
-	fi
-
-$(CRUFT_PICOBJ): stmp-pic
-
-$(CRUFT_DEFS): $(TOPDIR)/libcruft/mkf77def
-
-%.def : %.f
-	@echo "making $@ from $<"
-	@$(TOPDIR)/libcruft/mkf77def < $< > $@-t
-	@mv $@-t $@
-
-install:: all
-.PHONY: install
-
-install-strip:: all
-.PHONY: install-strip
-
-uninstall::
-.PHONY: uninstall
-
-tags: $(SOURCES)
-	ctags $(SOURCES)
-
-TAGS: $(SOURCES)
-	etags $(SOURCES)
-
-clean mostlyclean distclean maintainer-clean::
-	rm -f $(MAKEDEPS) $(CRUFT_OBJ) $(CRUFT_PICOBJ) $(CRUFT_DEFS)
-	-rmdir pic
-	rm -f stmp-pic
-.PHONY: clean mostlyclean
-
-distclean maintainer-clean::
-	rm -f tags TAGS Makefile
-.PHONY: distclean maintainer-clean
-
-dist:
-	ln $(EXTERNAL_DISTFILES) ../../`cat ../../.fname`/libcruft/$(THISDIR)
-.PHONY: dist
--- a/libcruft/amos/Makefile.in	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-# Makefile for octave's libcruft/amos directory
-#
-# Copyright (C) 1998, 2007, 2008 John W. Eaton
-#
-# This file is part of Octave.
-# 
-# Octave is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 3 of the License, or (at
-# your option) any later version.
-# 
-# Octave is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with Octave; see the file COPYING.  If not, see
-# <http://www.gnu.org/licenses/>.
-
-TOPDIR = ../..
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-
-EXTERNAL_DISTFILES = $(DISTFILES)
-
-FSRC = cacai.f cacon.f cbesh.f cbesi.f cbesj.f cbesk.f cbesy.f cbinu.f \
-  cbuni.f cbunk.f cunk1.f cunk2.f crati.f cshch.f cuni1.f \
-  cuoik.f cairy.f cbiry.f ckscl.f cs1s2.f cuchk.f cuni2.f cwrsk.f \
-  casyi.f cbknu.f cmlri.f cseri.f cunhj.f cunik.f dgamln.f gamln.f \
-  xzabs.f xzexp.f xzlog.f xzsqrt.f zacai.f zacon.f \
-  zairy.f zasyi.f zbesh.f zbesi.f zbesj.f zbesk.f zbesy.f zbinu.f \
-  zbiry.f zbknu.f zbuni.f zbunk.f zdiv.f zkscl.f zmlri.f zmlt.f \
-  zrati.f zs1s2.f zseri.f zshch.f zuchk.f zunhj.f zuni1.f zuni2.f \
-  zunik.f zunk1.f zunk2.f zuoik.f zwrsk.f
-
-include $(TOPDIR)/Makeconf
-
-include ../Makerules
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libcruft/amos/module.mk	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,69 @@
+EXTRA_DIST += amos/module.mk
+
+libcruft_la_SOURCES += \
+  amos/cacai.f \
+  amos/cacon.f \
+  amos/cbesh.f \
+  amos/cbesi.f \
+  amos/cbesj.f \
+  amos/cbesk.f \
+  amos/cbesy.f \
+  amos/cbinu.f \
+  amos/cbuni.f \
+  amos/cbunk.f \
+  amos/cunk1.f \
+  amos/cunk2.f \
+  amos/crati.f \
+  amos/cshch.f \
+  amos/cuni1.f \
+  amos/cuoik.f \
+  amos/cairy.f \
+  amos/cbiry.f \
+  amos/ckscl.f \
+  amos/cs1s2.f \
+  amos/cuchk.f \
+  amos/cuni2.f \
+  amos/cwrsk.f \
+  amos/casyi.f \
+  amos/cbknu.f \
+  amos/cmlri.f \
+  amos/cseri.f \
+  amos/cunhj.f \
+  amos/cunik.f \
+  amos/dgamln.f \
+  amos/gamln.f \
+  amos/xzabs.f \
+  amos/xzexp.f \
+  amos/xzlog.f \
+  amos/xzsqrt.f \
+  amos/zacai.f \
+  amos/zacon.f \
+  amos/zairy.f \
+  amos/zasyi.f \
+  amos/zbesh.f \
+  amos/zbesi.f \
+  amos/zbesj.f \
+  amos/zbesk.f \
+  amos/zbesy.f \
+  amos/zbinu.f \
+  amos/zbiry.f \
+  amos/zbknu.f \
+  amos/zbuni.f \
+  amos/zbunk.f \
+  amos/zdiv.f \
+  amos/zkscl.f \
+  amos/zmlri.f \
+  amos/zmlt.f \
+  amos/zrati.f \
+  amos/zs1s2.f \
+  amos/zseri.f \
+  amos/zshch.f \
+  amos/zuchk.f \
+  amos/zunhj.f \
+  amos/zuni1.f \
+  amos/zuni2.f \
+  amos/zunik.f \
+  amos/zunk1.f \
+  amos/zunk2.f \
+  amos/zuoik.f \
+  amos/zwrsk.f
--- a/libcruft/blas-xtra/Makefile.in	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-# Makefile for octave's libcruft/blas-xtra directory
-#
-# Copyright (C) 2000, 2007, 2008 John W. Eaton
-#
-# This file is part of Octave.
-# 
-# Octave is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 3 of the License, or (at
-# your option) any later version.
-# 
-# Octave is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with Octave; see the file COPYING.  If not, see
-# <http://www.gnu.org/licenses/>.
-
-TOPDIR = ../..
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-
-EXTERNAL_DISTFILES = $(DISTFILES)
-
-FSRC = xddot.f xdnrm2.f xdznrm2.f xzdotc.f xzdotu.f \
-	xsdot.f xsnrm2.f xscnrm2.f xcdotc.f xcdotu.f \
-	xerbla.f
-
-include $(TOPDIR)/Makeconf
-
-include ../Makerules
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libcruft/blas-xtra/module.mk	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,14 @@
+EXTRA_DIST += blas-xtra/module.mk
+
+libcruft_la_SOURCES += \
+  blas-xtra/xddot.f \
+  blas-xtra/xdnrm2.f \
+  blas-xtra/xdznrm2.f \
+  blas-xtra/xzdotc.f \
+  blas-xtra/xzdotu.f \
+  blas-xtra/xsdot.f \
+  blas-xtra/xsnrm2.f \
+  blas-xtra/xscnrm2.f \
+  blas-xtra/xcdotc.f \
+  blas-xtra/xcdotu.f \
+  blas-xtra/xerbla.f
--- a/libcruft/blas/Makefile.in	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-# Makefile for octave's libcruft/blas directory
-#
-# Copyright (C) 1993, 1994, 1995, 2007, 2008, 2009 John W. Eaton
-#
-# This file is part of Octave.
-# 
-# Octave is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 3 of the License, or (at
-# your option) any later version.
-# 
-# Octave is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with Octave; see the file COPYING.  If not, see
-# <http://www.gnu.org/licenses/>.
-
-TOPDIR = ../..
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-
-EXTERNAL_DISTFILES = $(DISTFILES)
-
-FSRC = dasum.f daxpy.f dcabs1.f dcopy.f ddot.f dgemm.f dgemv.f \
-  dger.f dmach.f dnrm2.f drot.f dscal.f dswap.f dsymv.f dsyr.f dsymm.f \
-  dsyr2.f dsyr2k.f dsyrk.f dtbsv.f dtrmm.f dtrmv.f dtrsm.f dtrsv.f \
-  dzasum.f dznrm2.f icamax.f idamax.f isamax.f izamax.f lsame.f sdot.f \
-  sgemm.f sgemv.f sscal.f ssyrk.f strsm.f zaxpy.f zcopy.f zdotc.f \
-  zdotu.f zdrot.f zdscal.f zgemm.f zgemv.f zgerc.f zgeru.f zhemv.f zhemm.f \
-  zher.f zher2.f zher2k.f zherk.f zscal.f zswap.f zsyrk.f ztbsv.f ztrmm.f \
-  ztrmv.f ztrsm.f ztrsv.f sasum.f saxpy.f scabs1.f scopy.f \
-  sger.f smach.f snrm2.f srot.f sswap.f ssymv.f ssyr.f ssymm.f \
-  ssyr2.f ssyr2k.f stbsv.f strmm.f strmv.f strsv.f \
-  scasum.f scnrm2.f caxpy.f ccopy.f cdotc.f cdotu.f chemm.f \
-  csrot.f csscal.f cgemm.f cgemv.f cgerc.f cgeru.f chemv.f cher.f \
-  cher2.f cher2k.f cherk.f cscal.f cswap.f csyrk.f ctbsv.f ctrmm.f ctrmv.f \
-  ctrsm.f ctrsv.f
-
-include $(TOPDIR)/Makeconf
-
-include ../Makerules
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libcruft/blas/module.mk	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,114 @@
+EXTRA_DIST += blas/module.mk
+
+BLAS_SRC = \
+  blas/dasum.f \
+  blas/daxpy.f \
+  blas/dcabs1.f \
+  blas/dcopy.f \
+  blas/ddot.f \
+  blas/dgemm.f \
+  blas/dgemv.f \
+  blas/dger.f \
+  blas/dmach.f \
+  blas/dnrm2.f \
+  blas/drot.f \
+  blas/dscal.f \
+  blas/dswap.f \
+  blas/dsymv.f \
+  blas/dsyr.f \
+  blas/dsymm.f \
+  blas/dsyr2.f \
+  blas/dsyr2k.f \
+  blas/dsyrk.f \
+  blas/dtbsv.f \
+  blas/dtrmm.f \
+  blas/dtrmv.f \
+  blas/dtrsm.f \
+  blas/dtrsv.f \
+  blas/dzasum.f \
+  blas/dznrm2.f \
+  blas/icamax.f \
+  blas/idamax.f \
+  blas/isamax.f \
+  blas/izamax.f \
+  blas/lsame.f \
+  blas/sdot.f \
+  blas/sgemm.f \
+  blas/sgemv.f \
+  blas/sscal.f \
+  blas/ssyrk.f \
+  blas/strsm.f \
+  blas/zaxpy.f \
+  blas/zcopy.f \
+  blas/zdotc.f \
+  blas/zdotu.f \
+  blas/zdrot.f \
+  blas/zdscal.f \
+  blas/zgemm.f \
+  blas/zgemv.f \
+  blas/zgerc.f \
+  blas/zgeru.f \
+  blas/zhemv.f \
+  blas/zhemm.f \
+  blas/zher.f \
+  blas/zher2.f \
+  blas/zher2k.f \
+  blas/zherk.f \
+  blas/zscal.f \
+  blas/zswap.f \
+  blas/zsyrk.f \
+  blas/ztbsv.f \
+  blas/ztrmm.f \
+  blas/ztrmv.f \
+  blas/ztrsm.f \
+  blas/ztrsv.f \
+  blas/sasum.f \
+  blas/saxpy.f \
+  blas/scabs1.f \
+  blas/scopy.f \
+  blas/sger.f \
+  blas/smach.f \
+  blas/snrm2.f \
+  blas/srot.f \
+  blas/sswap.f \
+  blas/ssymv.f \
+  blas/ssyr.f \
+  blas/ssymm.f \
+  blas/ssyr2.f \
+  blas/ssyr2k.f \
+  blas/stbsv.f \
+  blas/strmm.f \
+  blas/strmv.f \
+  blas/strsv.f \
+  blas/scasum.f \
+  blas/scnrm2.f \
+  blas/caxpy.f \
+  blas/ccopy.f \
+  blas/cdotc.f \
+  blas/cdotu.f \
+  blas/chemm.f \
+  blas/csrot.f \
+  blas/csscal.f \
+  blas/cgemm.f \
+  blas/cgemv.f \
+  blas/cgerc.f \
+  blas/cgeru.f \
+  blas/chemv.f \
+  blas/cher.f \
+  blas/cher2.f \
+  blas/cher2k.f \
+  blas/cherk.f \
+  blas/cscal.f \
+  blas/cswap.f \
+  blas/csyrk.f \
+  blas/ctbsv.f \
+  blas/ctrmm.f \
+  blas/ctrmv.f \
+  blas/ctrsm.f \
+  blas/ctrsv.f
+
+if AMCOND_HAVE_BLAS
+  EXTRA_DIST += $(BLAS_SRC)
+else
+  libcruft_la_SOURCES += $(BLAS_SRC)
+endif
--- a/libcruft/daspk/Makefile.in	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-# Makefile for octave's libcruft/daspk directory
-#
-# Copyright (C) 2002, 2007 John W. Eaton
-#
-# This file is part of Octave.
-# 
-# Octave is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 3 of the License, or (at
-# your option) any later version.
-# 
-# Octave is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with Octave; see the file COPYING.  If not, see
-# <http://www.gnu.org/licenses/>.
-
-TOPDIR = ../..
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-
-EXTERNAL_DISTFILES = $(DISTFILES)
-
-FSRC = datv.f dcnst0.f dcnstr.f ddasic.f ddasid.f ddasik.f ddaspk.f \
-  ddstp.f ddwnrm.f dfnrmd.f dfnrmk.f dhels.f dheqr.f dinvwt.f \
-  dlinsd.f dlinsk.f dmatd.f dnedd.f dnedk.f dnsd.f dnsid.f dnsik.f \
-  dnsk.f dorth.f dslvd.f dslvk.f dspigm.f dyypnw.f
-
-include $(TOPDIR)/Makeconf
-
-include ../Makerules
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libcruft/daspk/module.mk	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,31 @@
+EXTRA_DIST += daspk/module.mk
+
+libcruft_la_SOURCES += \
+  daspk/datv.f \
+  daspk/dcnst0.f \
+  daspk/dcnstr.f \
+  daspk/ddasic.f \
+  daspk/ddasid.f \
+  daspk/ddasik.f \
+  daspk/ddaspk.f \
+  daspk/ddstp.f \
+  daspk/ddwnrm.f \
+  daspk/dfnrmd.f \
+  daspk/dfnrmk.f \
+  daspk/dhels.f \
+  daspk/dheqr.f \
+  daspk/dinvwt.f \
+  daspk/dlinsd.f \
+  daspk/dlinsk.f \
+  daspk/dmatd.f \
+  daspk/dnedd.f \
+  daspk/dnedk.f \
+  daspk/dnsd.f \
+  daspk/dnsid.f \
+  daspk/dnsik.f \
+  daspk/dnsk.f \
+  daspk/dorth.f \
+  daspk/dslvd.f \
+  daspk/dslvk.f \
+  daspk/dspigm.f \
+  daspk/dyypnw.f
--- a/libcruft/dasrt/Makefile.in	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-# Makefile for octave's libcruft/dasrt directory
-#
-# Copyright (C) 2002, 2007 John W. Eaton
-#
-# This file is part of Octave.
-# 
-# Octave is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 3 of the License, or (at
-# your option) any later version.
-# 
-# Octave is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with Octave; see the file COPYING.  If not, see
-# <http://www.gnu.org/licenses/>.
-
-TOPDIR = ../..
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-
-EXTERNAL_DISTFILES = $(DISTFILES)
-
-FSRC = ddasrt.f drchek.f droots.f
-
-include $(TOPDIR)/Makeconf
-
-include ../Makerules
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libcruft/dasrt/module.mk	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,6 @@
+EXTRA_DIST += dasrt/module.mk
+
+libcruft_la_SOURCES += \
+  dasrt/ddasrt.f \
+  dasrt/drchek.f \
+  dasrt/droots.f
--- a/libcruft/dassl/Makefile.in	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-# Makefile for octave's libcruft/dassl directory
-#
-# Copyright (C) 1993, 1994, 1995, 2007 John W. Eaton
-#
-# This file is part of Octave.
-# 
-# Octave is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 3 of the License, or (at
-# your option) any later version.
-# 
-# Octave is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with Octave; see the file COPYING.  If not, see
-# <http://www.gnu.org/licenses/>.
-
-TOPDIR = ../..
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-
-EXTERNAL_DISTFILES = $(DISTFILES)
-
-FSRC = ddaini.f ddajac.f ddanrm.f ddaslv.f ddassl.f ddastp.f ddatrp.f ddawts.f
-
-include $(TOPDIR)/Makeconf
-
-include ../Makerules
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libcruft/dassl/module.mk	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,11 @@
+EXTRA_DIST += dassl/module.mk
+
+libcruft_la_SOURCES += \
+  dassl/ddaini.f \
+  dassl/ddajac.f \
+  dassl/ddanrm.f \
+  dassl/ddaslv.f \
+  dassl/ddassl.f \
+  dassl/ddastp.f \
+  dassl/ddatrp.f \
+  dassl/ddawts.f
--- a/libcruft/fftpack/Makefile.in	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-# Makefile for octave's libcruft/fftpack directory
-#
-# Copyright (C) 1993, 1994, 1995, 1997, 2007, 2008 John W. Eaton
-#
-# This file is part of Octave.
-# 
-# Octave is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 3 of the License, or (at
-# your option) any later version.
-# 
-# Octave is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with Octave; see the file COPYING.  If not, see
-# <http://www.gnu.org/licenses/>.
-
-TOPDIR = ../..
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-
-EXTERNAL_DISTFILES = $(DISTFILES) $(srcdir)/fftpack.doc
-
-FSRC = cfftb.f cfftb1.f cfftf.f cfftf1.f cffti.f cffti1.f passb.f \
-  passb2.f passb3.f passb4.f passb5.f passf.f passf2.f passf3.f \
-  passf4.f passf5.f zfftb.f zfftb1.f zfftf.f zfftf1.f zffti.f zffti1.f \
-  zpassb.f zpassb2.f zpassb3.f zpassb4.f zpassb5.f zpassf.f zpassf2.f \
-  zpassf3.f zpassf4.f zpassf5.f
-
-include $(TOPDIR)/Makeconf
-
-include ../Makerules
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libcruft/fftpack/module.mk	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,43 @@
+EXTRA_DIST += \
+  fftpack/module.mk \
+  fftpack/fftpack.doc
+
+FFTPACK_SRC = \
+  fftpack/cfftb.f \
+  fftpack/cfftb1.f \
+  fftpack/cfftf.f \
+  fftpack/cfftf1.f \
+  fftpack/cffti.f \
+  fftpack/cffti1.f \
+  fftpack/passb.f \
+  fftpack/passb2.f \
+  fftpack/passb3.f \
+  fftpack/passb4.f \
+  fftpack/passb5.f \
+  fftpack/passf.f \
+  fftpack/passf2.f \
+  fftpack/passf3.f \
+  fftpack/passf4.f \
+  fftpack/passf5.f \
+  fftpack/zfftb.f \
+  fftpack/zfftb1.f \
+  fftpack/zfftf.f \
+  fftpack/zfftf1.f \
+  fftpack/zffti.f \
+  fftpack/zffti1.f \
+  fftpack/zpassb.f \
+  fftpack/zpassb2.f \
+  fftpack/zpassb3.f \
+  fftpack/zpassb4.f \
+  fftpack/zpassb5.f \
+  fftpack/zpassf.f \
+  fftpack/zpassf2.f \
+  fftpack/zpassf3.f \
+  fftpack/zpassf4.f \
+  fftpack/zpassf5.f
+
+if AMCOND_HAVE_FFTW
+  EXTRA_DIST += $(FFTPACK_SRC)
+else
+  libcruft_la_SOURCES += $(FFTPACK_SRC)
+endif
--- a/libcruft/lapack-xtra/Makefile.in	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-# Makefile for octave's libcruft/lapack-xtra directory
-#
-# Copyright (C) 2000, 2007, 2008 John W. Eaton
-#
-# This file is part of Octave.
-# 
-# Octave is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 3 of the License, or (at
-# your option) any later version.
-# 
-# Octave is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with Octave; see the file COPYING.  If not, see
-# <http://www.gnu.org/licenses/>.
-
-TOPDIR = ../..
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-
-EXTERNAL_DISTFILES = $(DISTFILES)
-
-FSRC = xclange.f xdlamch.f xdlange.f xilaenv.f xslamch.f xslange.f xzlange.f 
-
-include $(TOPDIR)/Makeconf
-
-include ../Makerules
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libcruft/lapack-xtra/module.mk	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,10 @@
+EXTRA_DIST += lapack-xtra/module.mk
+
+libcruft_la_SOURCES += \
+  lapack-xtra/xclange.f \
+  lapack-xtra/xdlamch.f \
+  lapack-xtra/xdlange.f \
+  lapack-xtra/xilaenv.f \
+  lapack-xtra/xslamch.f \
+  lapack-xtra/xslange.f \
+  lapack-xtra/xzlange.f
--- a/libcruft/lapack/Makefile.in	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,160 +0,0 @@
-# Makefile for octave's libcruft/lapack directory
-#
-# Copyright (C) 1993, 1994, 1995, 2005, 2007, 2008 John W. Eaton
-#
-# This file is part of Octave.
-# 
-# Octave is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 3 of the License, or (at
-# your option) any later version.
-# 
-# Octave is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with Octave; see the file COPYING.  If not, see
-# <http://www.gnu.org/licenses/>.
-
-TOPDIR = ../..
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-
-EXTERNAL_DISTFILES = $(DISTFILES)
-
-FSRC = 	cbdsqr.f cgbcon.f cgbtf2.f cgbtrf.f cgbtrs.f cgbtrs.f \
-	cgebak.f cgebal.f cgebd2.f cgebrd.f cgecon.f cgecon.f \
-	cgeesx.f cgeev.f cgehd2.f cgehrd.f cgelq2.f cgelq2.f \
-	cgelqf.f cgelsd.f cgelss.f cgelsy.f cgeqp3.f cgeqp3.f \
-	cgeqpf.f cgeqr2.f cgeqrf.f cgesvd.f cgesv.f cgesv.f \
-	cgetf2.f cgetrf.f cgetri.f cgetrs.f cggbak.f cggbak.f \
-	cggbal.f cggev.f cgghrd.f cgtsv.f cgttrf.f cgttrf.f \
-	cgttrs.f cgtts2.f cheev.f chetd2.f chetrd.f chetrd.f \
-	chgeqz.f chseqr.f clabrd.f clacgv.f clacn2.f clacn2.f \
-	clacon.f clacpy.f cladiv.f clahqr.f clahr2.f clahr2.f \
-	clahrd.f claic1.f clals0.f clalsa.f clalsd.f clalsd.f \
-	clange.f clanhe.f clanhs.f clantr.f claqp2.f claqp2.f \
-	claqps.f claqr0.f claqr1.f claqr2.f claqr3.f claqr3.f \
-	claqr4.f claqr5.f clarfb.f clarf.f clarfg.f clarfg.f \
-	clarft.f clarfx.f clartg.f clarzb.f clarz.f clarz.f \
-	clarzt.f clascl.f claset.f clasr.f classq.f classq.f \
-	claswp.f clatbs.f clatrd.f clatrs.f clatrz.f clatrz.f \
-	clauu2.f clauum.f cpbcon.f cpbtf2.f cpbtrf.f cpbtrf.f \
-	cpbtrs.f cpocon.f cpotf2.f cpotrf.f cpotri.f cpotri.f \
-	cpotrs.f cptsv.f cpttrf.f cpttrs.f cptts2.f cptts2.f \
-	crot.f csrscl.f csteqr.f ctgevc.f ctrcon.f ctrcon.f \
-	ctrevc.f ctrexc.f ctrsen.f ctrsyl.f ctrti2.f ctrti2.f \
-	ctrtri.f ctrtrs.f ctzrzf.f cung2l.f cung2r.f cung2r.f \
-	cungbr.f cunghr.f cungl2.f cunglq.f cungql.f cungql.f \
-	cungqr.f cungtr.f cunm2r.f cunmbr.f cunml2.f cunml2.f \
-	cunmlq.f cunmqr.f cunmr3.f cunmrz.f dbdsqr.f dbdsqr.f \
-	dgbcon.f dgbtf2.f dgbtrf.f dgbtrs.f dgebak.f dgebak.f \
-	dgebal.f dgebd2.f dgebrd.f dgecon.f dgeesx.f dgeesx.f \
-	dgeev.f dgehd2.f dgehrd.f dgelq2.f dgelqf.f dgelqf.f \
-	dgelsd.f dgelss.f dgelsy.f dgeqp3.f dgeqpf.f dgeqpf.f \
-	dgeqr2.f dgeqrf.f dgesvd.f dgesv.f dgetf2.f dgetf2.f \
-	dgetrf.f dgetri.f dgetrs.f dggbak.f dggbal.f dggbal.f \
-	dggev.f dgghrd.f dgtsv.f dgttrf.f dgttrs.f dgttrs.f \
-	dgtts2.f dhgeqz.f dhseqr.f dlabad.f dlabrd.f dlabrd.f \
-	dlacn2.f dlacon.f dlacpy.f dladiv.f dlae2.f dlae2.f \
-	dlaed6.f dlaev2.f dlaexc.f dlag2.f dlahqr.f dlahqr.f \
-	dlahr2.f dlahrd.f dlaic1.f dlaln2.f dlals0.f dlals0.f \
-	dlalsa.f dlalsd.f dlamc1.f dlamc2.f dlamc3.f dlamc3.f \
-	dlamc4.f dlamc5.f dlamch.f dlamrg.f dlange.f dlange.f \
-	dlanhs.f dlanst.f dlansy.f dlantr.f dlanv2.f dlanv2.f \
-	dlapy2.f dlapy3.f dlaqp2.f dlaqps.f dlaqr0.f dlaqr0.f \
-	dlaqr1.f dlaqr2.f dlaqr3.f dlaqr4.f dlaqr5.f dlaqr5.f \
-	dlarfb.f dlarf.f dlarfg.f dlarft.f dlarfx.f dlarfx.f \
-	dlartg.f dlarzb.f dlarz.f dlarzt.f dlas2.f dlas2.f \
-	dlascl.f dlasd0.f dlasd1.f dlasd2.f dlasd3.f dlasd3.f \
-	dlasd4.f dlasd5.f dlasd6.f dlasd7.f dlasd8.f dlasd8.f \
-	dlasda.f dlasdq.f dlasdt.f dlaset.f dlasq1.f dlasq1.f \
-	dlasq2.f dlasq3.f dlasq4.f dlasq5.f dlasq6.f dlasq6.f \
-	dlasr.f dlasrt.f dlassq.f dlasv2.f dlaswp.f dlaswp.f \
-	dlasy2.f dlatbs.f dlatrd.f dlatrs.f dlatrz.f dlatrz.f \
-	dlauu2.f dlauum.f dlazq3.f dlazq4.f dorg2l.f dorg2l.f \
-	dorg2r.f dorgbr.f dorghr.f dorgl2.f dorglq.f dorglq.f \
-	dorgql.f dorgqr.f dorgtr.f dorm2r.f dormbr.f dormbr.f \
-	dorml2.f dormlq.f dormqr.f dormr3.f dormrz.f dormrz.f \
-	dpbcon.f dpbtf2.f dpbtrf.f dpbtrs.f dpocon.f dpocon.f \
-	dpotf2.f dpotrf.f dpotri.f dpotrs.f dptsv.f dptsv.f \
-	dpttrf.f dpttrs.f dptts2.f drscl.f dsteqr.f dsteqr.f \
-	dsterf.f dsyev.f dsytd2.f dsytrd.f dtgevc.f dtgevc.f \
-	dtrcon.f dtrevc.f dtrexc.f dtrsen.f dtrsyl.f dtrsyl.f \
-	dtrti2.f dtrtri.f dtrtrs.f dtzrzf.f dzsum1.f dzsum1.f \
-	icmax1.f ieeeck.f ilaenv.f iparmq.f izmax1.f izmax1.f \
-	sbdsqr.f scsum1.f sgbcon.f sgbtf2.f sgbtrf.f sgbtrf.f \
-	sgbtrs.f sgebak.f sgebal.f sgebd2.f sgebrd.f sgebrd.f \
-	sgecon.f sgeesx.f sgeev.f sgehd2.f sgehrd.f sgehrd.f \
-	sgelq2.f sgelqf.f sgelsd.f sgelss.f sgelsy.f sgelsy.f \
-	sgeqp3.f sgeqpf.f sgeqr2.f sgeqrf.f sgesvd.f sgesvd.f \
-	sgesv.f sgetf2.f sgetrf.f sgetri.f sgetrs.f sgetrs.f \
-	sggbak.f sggbal.f sggev.f sgghrd.f sgtsv.f sgtsv.f \
-	sgttrf.f sgttrs.f sgtts2.f shgeqz.f shseqr.f shseqr.f \
-	slabad.f slabrd.f slacn2.f slacon.f slacpy.f slacpy.f \
-	sladiv.f slae2.f slaed6.f slaev2.f slaexc.f slaexc.f \
-	slag2.f slahqr.f slahr2.f slahrd.f slaic1.f slaic1.f \
-	slaln2.f slals0.f slalsa.f slalsd.f slamc1.f slamc1.f \
-	slamc2.f slamc3.f slamc4.f slamc5.f slamch.f slamch.f \
-	slamrg.f slange.f slanhs.f slanst.f slansy.f slansy.f \
-	slantr.f slanv2.f slapy2.f slapy3.f slaqp2.f slaqp2.f \
-	slaqps.f slaqr0.f slaqr1.f slaqr2.f slaqr3.f slaqr3.f \
-	slaqr4.f slaqr5.f slarfb.f slarf.f slarfg.f slarfg.f \
-	slarft.f slarfx.f slartg.f slarzb.f slarz.f slarz.f \
-	slarzt.f slas2.f slascl.f slasd0.f slasd1.f slasd1.f \
-	slasd2.f slasd3.f slasd4.f slasd5.f slasd6.f slasd6.f \
-	slasd7.f slasd8.f slasda.f slasdq.f slasdt.f slasdt.f \
-	slaset.f slasq1.f slasq2.f slasq3.f slasq4.f slasq4.f \
-	slasq5.f slasq6.f slasr.f slasrt.f slassq.f slassq.f \
-	slasv2.f slaswp.f slasy2.f slatbs.f slatrd.f slatrd.f \
-	slatrs.f slatrz.f slauu2.f slauum.f slazq3.f slazq3.f \
-	slazq4.f sorg2l.f sorg2r.f sorgbr.f sorghr.f sorghr.f \
-	sorgl2.f sorglq.f sorgql.f sorgqr.f sorgtr.f sorgtr.f \
-	sorm2r.f sormbr.f sorml2.f sormlq.f sormqr.f sormqr.f \
-	sormr3.f sormrz.f spbcon.f spbtf2.f spbtrf.f spbtrf.f \
-	spbtrs.f spocon.f spotf2.f spotrf.f spotri.f spotri.f \
-	spotrs.f sptsv.f spttrf.f spttrs.f sptts2.f sptts2.f \
-	srscl.f ssteqr.f ssterf.f ssyev.f ssytd2.f ssytd2.f \
-	ssytrd.f stgevc.f strcon.f strevc.f strexc.f strexc.f \
-	strsen.f strsyl.f strti2.f strtri.f strtrs.f strtrs.f \
-	stzrzf.f zbdsqr.f zdrscl.f zgbcon.f zgbtf2.f zgbtf2.f \
-	zgbtrf.f zgbtrs.f zgebak.f zgebal.f zgebd2.f zgebd2.f \
-	zgebrd.f zgecon.f zgeesx.f zgeev.f zgehd2.f zgehd2.f \
-	zgehrd.f zgelq2.f zgelqf.f zgelsd.f zgelss.f zgelss.f \
-	zgelsy.f zgeqp3.f zgeqpf.f zgeqr2.f zgeqrf.f zgeqrf.f \
-	zgesvd.f zgesv.f zgetf2.f zgetrf.f zgetri.f zgetri.f \
-	zgetrs.f zggbak.f zggbal.f zggev.f zgghrd.f zgghrd.f \
-	zgtsv.f zgttrf.f zgttrs.f zgtts2.f zheev.f zheev.f \
-	zhetd2.f zhetrd.f zhgeqz.f zhseqr.f zlabrd.f zlabrd.f \
-	zlacgv.f zlacn2.f zlacon.f zlacpy.f zladiv.f zladiv.f \
-	zlahqr.f zlahr2.f zlahrd.f zlaic1.f zlals0.f zlals0.f \
-	zlalsa.f zlalsd.f zlange.f zlanhe.f zlanhs.f zlanhs.f \
-	zlantr.f zlaqp2.f zlaqps.f zlaqr0.f zlaqr1.f zlaqr1.f \
-	zlaqr2.f zlaqr3.f zlaqr4.f zlaqr5.f zlarfb.f zlarfb.f \
-	zlarf.f zlarfg.f zlarft.f zlarfx.f zlartg.f zlartg.f \
-	zlarzb.f zlarz.f zlarzt.f zlascl.f zlaset.f zlaset.f \
-	zlasr.f zlassq.f zlaswp.f zlatbs.f zlatrd.f zlatrd.f \
-	zlatrs.f zlatrz.f zlauu2.f zlauum.f zpbcon.f zpbcon.f \
-	zpbtf2.f zpbtrf.f zpbtrs.f zpocon.f zpotf2.f zpotf2.f \
-	zpotrf.f zpotri.f zpotrs.f zptsv.f zpttrf.f zpttrf.f \
-	zpttrs.f zptts2.f zrot.f zsteqr.f ztgevc.f ztgevc.f \
-	ztrcon.f ztrevc.f ztrexc.f ztrsen.f ztrsyl.f ztrsyl.f \
-	ztrti2.f ztrtri.f ztrtrs.f ztzrzf.f zung2l.f zung2l.f \
-	zung2r.f zungbr.f zunghr.f zungl2.f zunglq.f zunglq.f \
-	zungql.f zungqr.f zungtr.f zunm2r.f zunmbr.f zunmbr.f \
-	zunml2.f zunmlq.f zunmqr.f zunmr3.f zunmrz.f zunmrz.f \
-	chegs2.f chegst.f chegv.f dsygs2.f dsygst.f dsygv.f \
-	ssygs2.f ssygst.f ssygv.f zhegs2.f zhegst.f zhegv.f
-
-
-include $(TOPDIR)/Makeconf
-
-dlamc1.o pic/dlamc1.o: FFLAGS += $(F77_FLOAT_STORE_FLAG)
-slamc1.o pic/slamc1.o: FFLAGS += $(F77_FLOAT_STORE_FLAG)
-
-include ../Makerules
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libcruft/lapack/module.mk	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,750 @@
+EXTRA_DIST += lapack/module.mk
+
+lapack/dlamc1.lo: FFLAGS += $(F77_FLOAT_STORE_FLAG)
+lapack/slamc1.lo: FFLAGS += $(F77_FLOAT_STORE_FLAG)
+
+LAPACK_SRC = \
+  lapack/cbdsqr.f \
+  lapack/cgbcon.f \
+  lapack/cgbtf2.f \
+  lapack/cgbtrf.f \
+  lapack/cgbtrs.f \
+  lapack/cgbtrs.f \
+  lapack/cgebak.f \
+  lapack/cgebal.f \
+  lapack/cgebd2.f \
+  lapack/cgebrd.f \
+  lapack/cgecon.f \
+  lapack/cgecon.f \
+  lapack/cgeesx.f \
+  lapack/cgeev.f \
+  lapack/cgehd2.f \
+  lapack/cgehrd.f \
+  lapack/cgelq2.f \
+  lapack/cgelq2.f \
+  lapack/cgelqf.f \
+  lapack/cgelsd.f \
+  lapack/cgelss.f \
+  lapack/cgelsy.f \
+  lapack/cgeqp3.f \
+  lapack/cgeqp3.f \
+  lapack/cgeqpf.f \
+  lapack/cgeqr2.f \
+  lapack/cgeqrf.f \
+  lapack/cgesvd.f \
+  lapack/cgesv.f \
+  lapack/cgesv.f \
+  lapack/cgetf2.f \
+  lapack/cgetrf.f \
+  lapack/cgetri.f \
+  lapack/cgetrs.f \
+  lapack/cggbak.f \
+  lapack/cggbak.f \
+  lapack/cggbal.f \
+  lapack/cggev.f \
+  lapack/cgghrd.f \
+  lapack/cgtsv.f \
+  lapack/cgttrf.f \
+  lapack/cgttrf.f \
+  lapack/cgttrs.f \
+  lapack/cgtts2.f \
+  lapack/cheev.f \
+  lapack/chetd2.f \
+  lapack/chetrd.f \
+  lapack/chetrd.f \
+  lapack/chgeqz.f \
+  lapack/chseqr.f \
+  lapack/clabrd.f \
+  lapack/clacgv.f \
+  lapack/clacn2.f \
+  lapack/clacn2.f \
+  lapack/clacon.f \
+  lapack/clacpy.f \
+  lapack/cladiv.f \
+  lapack/clahqr.f \
+  lapack/clahr2.f \
+  lapack/clahr2.f \
+  lapack/clahrd.f \
+  lapack/claic1.f \
+  lapack/clals0.f \
+  lapack/clalsa.f \
+  lapack/clalsd.f \
+  lapack/clalsd.f \
+  lapack/clange.f \
+  lapack/clanhe.f \
+  lapack/clanhs.f \
+  lapack/clantr.f \
+  lapack/claqp2.f \
+  lapack/claqp2.f \
+  lapack/claqps.f \
+  lapack/claqr0.f \
+  lapack/claqr1.f \
+  lapack/claqr2.f \
+  lapack/claqr3.f \
+  lapack/claqr3.f \
+  lapack/claqr4.f \
+  lapack/claqr5.f \
+  lapack/clarfb.f \
+  lapack/clarf.f \
+  lapack/clarfg.f \
+  lapack/clarfg.f \
+  lapack/clarft.f \
+  lapack/clarfx.f \
+  lapack/clartg.f \
+  lapack/clarzb.f \
+  lapack/clarz.f \
+  lapack/clarz.f \
+  lapack/clarzt.f \
+  lapack/clascl.f \
+  lapack/claset.f \
+  lapack/clasr.f \
+  lapack/classq.f \
+  lapack/classq.f \
+  lapack/claswp.f \
+  lapack/clatbs.f \
+  lapack/clatrd.f \
+  lapack/clatrs.f \
+  lapack/clatrz.f \
+  lapack/clatrz.f \
+  lapack/clauu2.f \
+  lapack/clauum.f \
+  lapack/cpbcon.f \
+  lapack/cpbtf2.f \
+  lapack/cpbtrf.f \
+  lapack/cpbtrf.f \
+  lapack/cpbtrs.f \
+  lapack/cpocon.f \
+  lapack/cpotf2.f \
+  lapack/cpotrf.f \
+  lapack/cpotri.f \
+  lapack/cpotri.f \
+  lapack/cpotrs.f \
+  lapack/cptsv.f \
+  lapack/cpttrf.f \
+  lapack/cpttrs.f \
+  lapack/cptts2.f \
+  lapack/cptts2.f \
+  lapack/crot.f \
+  lapack/csrscl.f \
+  lapack/csteqr.f \
+  lapack/ctgevc.f \
+  lapack/ctrcon.f \
+  lapack/ctrcon.f \
+  lapack/ctrevc.f \
+  lapack/ctrexc.f \
+  lapack/ctrsen.f \
+  lapack/ctrsyl.f \
+  lapack/ctrti2.f \
+  lapack/ctrti2.f \
+  lapack/ctrtri.f \
+  lapack/ctrtrs.f \
+  lapack/ctzrzf.f \
+  lapack/cung2l.f \
+  lapack/cung2r.f \
+  lapack/cung2r.f \
+  lapack/cungbr.f \
+  lapack/cunghr.f \
+  lapack/cungl2.f \
+  lapack/cunglq.f \
+  lapack/cungql.f \
+  lapack/cungql.f \
+  lapack/cungqr.f \
+  lapack/cungtr.f \
+  lapack/cunm2r.f \
+  lapack/cunmbr.f \
+  lapack/cunml2.f \
+  lapack/cunml2.f \
+  lapack/cunmlq.f \
+  lapack/cunmqr.f \
+  lapack/cunmr3.f \
+  lapack/cunmrz.f \
+  lapack/dbdsqr.f \
+  lapack/dbdsqr.f \
+  lapack/dgbcon.f \
+  lapack/dgbtf2.f \
+  lapack/dgbtrf.f \
+  lapack/dgbtrs.f \
+  lapack/dgebak.f \
+  lapack/dgebak.f \
+  lapack/dgebal.f \
+  lapack/dgebd2.f \
+  lapack/dgebrd.f \
+  lapack/dgecon.f \
+  lapack/dgeesx.f \
+  lapack/dgeesx.f \
+  lapack/dgeev.f \
+  lapack/dgehd2.f \
+  lapack/dgehrd.f \
+  lapack/dgelq2.f \
+  lapack/dgelqf.f \
+  lapack/dgelqf.f \
+  lapack/dgelsd.f \
+  lapack/dgelss.f \
+  lapack/dgelsy.f \
+  lapack/dgeqp3.f \
+  lapack/dgeqpf.f \
+  lapack/dgeqpf.f \
+  lapack/dgeqr2.f \
+  lapack/dgeqrf.f \
+  lapack/dgesvd.f \
+  lapack/dgesv.f \
+  lapack/dgetf2.f \
+  lapack/dgetf2.f \
+  lapack/dgetrf.f \
+  lapack/dgetri.f \
+  lapack/dgetrs.f \
+  lapack/dggbak.f \
+  lapack/dggbal.f \
+  lapack/dggbal.f \
+  lapack/dggev.f \
+  lapack/dgghrd.f \
+  lapack/dgtsv.f \
+  lapack/dgttrf.f \
+  lapack/dgttrs.f \
+  lapack/dgttrs.f \
+  lapack/dgtts2.f \
+  lapack/dhgeqz.f \
+  lapack/dhseqr.f \
+  lapack/dlabad.f \
+  lapack/dlabrd.f \
+  lapack/dlabrd.f \
+  lapack/dlacn2.f \
+  lapack/dlacon.f \
+  lapack/dlacpy.f \
+  lapack/dladiv.f \
+  lapack/dlae2.f \
+  lapack/dlae2.f \
+  lapack/dlaed6.f \
+  lapack/dlaev2.f \
+  lapack/dlaexc.f \
+  lapack/dlag2.f \
+  lapack/dlahqr.f \
+  lapack/dlahqr.f \
+  lapack/dlahr2.f \
+  lapack/dlahrd.f \
+  lapack/dlaic1.f \
+  lapack/dlaln2.f \
+  lapack/dlals0.f \
+  lapack/dlals0.f \
+  lapack/dlalsa.f \
+  lapack/dlalsd.f \
+  lapack/dlamc1.f \
+  lapack/dlamc2.f \
+  lapack/dlamc3.f \
+  lapack/dlamc3.f \
+  lapack/dlamc4.f \
+  lapack/dlamc5.f \
+  lapack/dlamch.f \
+  lapack/dlamrg.f \
+  lapack/dlange.f \
+  lapack/dlange.f \
+  lapack/dlanhs.f \
+  lapack/dlanst.f \
+  lapack/dlansy.f \
+  lapack/dlantr.f \
+  lapack/dlanv2.f \
+  lapack/dlanv2.f \
+  lapack/dlapy2.f \
+  lapack/dlapy3.f \
+  lapack/dlaqp2.f \
+  lapack/dlaqps.f \
+  lapack/dlaqr0.f \
+  lapack/dlaqr0.f \
+  lapack/dlaqr1.f \
+  lapack/dlaqr2.f \
+  lapack/dlaqr3.f \
+  lapack/dlaqr4.f \
+  lapack/dlaqr5.f \
+  lapack/dlaqr5.f \
+  lapack/dlarfb.f \
+  lapack/dlarf.f \
+  lapack/dlarfg.f \
+  lapack/dlarft.f \
+  lapack/dlarfx.f \
+  lapack/dlarfx.f \
+  lapack/dlartg.f \
+  lapack/dlarzb.f \
+  lapack/dlarz.f \
+  lapack/dlarzt.f \
+  lapack/dlas2.f \
+  lapack/dlas2.f \
+  lapack/dlascl.f \
+  lapack/dlasd0.f \
+  lapack/dlasd1.f \
+  lapack/dlasd2.f \
+  lapack/dlasd3.f \
+  lapack/dlasd3.f \
+  lapack/dlasd4.f \
+  lapack/dlasd5.f \
+  lapack/dlasd6.f \
+  lapack/dlasd7.f \
+  lapack/dlasd8.f \
+  lapack/dlasd8.f \
+  lapack/dlasda.f \
+  lapack/dlasdq.f \
+  lapack/dlasdt.f \
+  lapack/dlaset.f \
+  lapack/dlasq1.f \
+  lapack/dlasq1.f \
+  lapack/dlasq2.f \
+  lapack/dlasq3.f \
+  lapack/dlasq4.f \
+  lapack/dlasq5.f \
+  lapack/dlasq6.f \
+  lapack/dlasq6.f \
+  lapack/dlasr.f \
+  lapack/dlasrt.f \
+  lapack/dlassq.f \
+  lapack/dlasv2.f \
+  lapack/dlaswp.f \
+  lapack/dlaswp.f \
+  lapack/dlasy2.f \
+  lapack/dlatbs.f \
+  lapack/dlatrd.f \
+  lapack/dlatrs.f \
+  lapack/dlatrz.f \
+  lapack/dlatrz.f \
+  lapack/dlauu2.f \
+  lapack/dlauum.f \
+  lapack/dlazq3.f \
+  lapack/dlazq4.f \
+  lapack/dorg2l.f \
+  lapack/dorg2l.f \
+  lapack/dorg2r.f \
+  lapack/dorgbr.f \
+  lapack/dorghr.f \
+  lapack/dorgl2.f \
+  lapack/dorglq.f \
+  lapack/dorglq.f \
+  lapack/dorgql.f \
+  lapack/dorgqr.f \
+  lapack/dorgtr.f \
+  lapack/dorm2r.f \
+  lapack/dormbr.f \
+  lapack/dormbr.f \
+  lapack/dorml2.f \
+  lapack/dormlq.f \
+  lapack/dormqr.f \
+  lapack/dormr3.f \
+  lapack/dormrz.f \
+  lapack/dormrz.f \
+  lapack/dpbcon.f \
+  lapack/dpbtf2.f \
+  lapack/dpbtrf.f \
+  lapack/dpbtrs.f \
+  lapack/dpocon.f \
+  lapack/dpocon.f \
+  lapack/dpotf2.f \
+  lapack/dpotrf.f \
+  lapack/dpotri.f \
+  lapack/dpotrs.f \
+  lapack/dptsv.f \
+  lapack/dptsv.f \
+  lapack/dpttrf.f \
+  lapack/dpttrs.f \
+  lapack/dptts2.f \
+  lapack/drscl.f \
+  lapack/dsteqr.f \
+  lapack/dsteqr.f \
+  lapack/dsterf.f \
+  lapack/dsyev.f \
+  lapack/dsytd2.f \
+  lapack/dsytrd.f \
+  lapack/dtgevc.f \
+  lapack/dtgevc.f \
+  lapack/dtrcon.f \
+  lapack/dtrevc.f \
+  lapack/dtrexc.f \
+  lapack/dtrsen.f \
+  lapack/dtrsyl.f \
+  lapack/dtrsyl.f \
+  lapack/dtrti2.f \
+  lapack/dtrtri.f \
+  lapack/dtrtrs.f \
+  lapack/dtzrzf.f \
+  lapack/dzsum1.f \
+  lapack/dzsum1.f \
+  lapack/icmax1.f \
+  lapack/ieeeck.f \
+  lapack/ilaenv.f \
+  lapack/iparmq.f \
+  lapack/izmax1.f \
+  lapack/izmax1.f \
+  lapack/sbdsqr.f \
+  lapack/scsum1.f \
+  lapack/sgbcon.f \
+  lapack/sgbtf2.f \
+  lapack/sgbtrf.f \
+  lapack/sgbtrf.f \
+  lapack/sgbtrs.f \
+  lapack/sgebak.f \
+  lapack/sgebal.f \
+  lapack/sgebd2.f \
+  lapack/sgebrd.f \
+  lapack/sgebrd.f \
+  lapack/sgecon.f \
+  lapack/sgeesx.f \
+  lapack/sgeev.f \
+  lapack/sgehd2.f \
+  lapack/sgehrd.f \
+  lapack/sgehrd.f \
+  lapack/sgelq2.f \
+  lapack/sgelqf.f \
+  lapack/sgelsd.f \
+  lapack/sgelss.f \
+  lapack/sgelsy.f \
+  lapack/sgelsy.f \
+  lapack/sgeqp3.f \
+  lapack/sgeqpf.f \
+  lapack/sgeqr2.f \
+  lapack/sgeqrf.f \
+  lapack/sgesvd.f \
+  lapack/sgesvd.f \
+  lapack/sgesv.f \
+  lapack/sgetf2.f \
+  lapack/sgetrf.f \
+  lapack/sgetri.f \
+  lapack/sgetrs.f \
+  lapack/sgetrs.f \
+  lapack/sggbak.f \
+  lapack/sggbal.f \
+  lapack/sggev.f \
+  lapack/sgghrd.f \
+  lapack/sgtsv.f \
+  lapack/sgtsv.f \
+  lapack/sgttrf.f \
+  lapack/sgttrs.f \
+  lapack/sgtts2.f \
+  lapack/shgeqz.f \
+  lapack/shseqr.f \
+  lapack/shseqr.f \
+  lapack/slabad.f \
+  lapack/slabrd.f \
+  lapack/slacn2.f \
+  lapack/slacon.f \
+  lapack/slacpy.f \
+  lapack/slacpy.f \
+  lapack/sladiv.f \
+  lapack/slae2.f \
+  lapack/slaed6.f \
+  lapack/slaev2.f \
+  lapack/slaexc.f \
+  lapack/slaexc.f \
+  lapack/slag2.f \
+  lapack/slahqr.f \
+  lapack/slahr2.f \
+  lapack/slahrd.f \
+  lapack/slaic1.f \
+  lapack/slaic1.f \
+  lapack/slaln2.f \
+  lapack/slals0.f \
+  lapack/slalsa.f \
+  lapack/slalsd.f \
+  lapack/slamc1.f \
+  lapack/slamc1.f \
+  lapack/slamc2.f \
+  lapack/slamc3.f \
+  lapack/slamc4.f \
+  lapack/slamc5.f \
+  lapack/slamch.f \
+  lapack/slamch.f \
+  lapack/slamrg.f \
+  lapack/slange.f \
+  lapack/slanhs.f \
+  lapack/slanst.f \
+  lapack/slansy.f \
+  lapack/slansy.f \
+  lapack/slantr.f \
+  lapack/slanv2.f \
+  lapack/slapy2.f \
+  lapack/slapy3.f \
+  lapack/slaqp2.f \
+  lapack/slaqp2.f \
+  lapack/slaqps.f \
+  lapack/slaqr0.f \
+  lapack/slaqr1.f \
+  lapack/slaqr2.f \
+  lapack/slaqr3.f \
+  lapack/slaqr3.f \
+  lapack/slaqr4.f \
+  lapack/slaqr5.f \
+  lapack/slarfb.f \
+  lapack/slarf.f \
+  lapack/slarfg.f \
+  lapack/slarfg.f \
+  lapack/slarft.f \
+  lapack/slarfx.f \
+  lapack/slartg.f \
+  lapack/slarzb.f \
+  lapack/slarz.f \
+  lapack/slarz.f \
+  lapack/slarzt.f \
+  lapack/slas2.f \
+  lapack/slascl.f \
+  lapack/slasd0.f \
+  lapack/slasd1.f \
+  lapack/slasd1.f \
+  lapack/slasd2.f \
+  lapack/slasd3.f \
+  lapack/slasd4.f \
+  lapack/slasd5.f \
+  lapack/slasd6.f \
+  lapack/slasd6.f \
+  lapack/slasd7.f \
+  lapack/slasd8.f \
+  lapack/slasda.f \
+  lapack/slasdq.f \
+  lapack/slasdt.f \
+  lapack/slasdt.f \
+  lapack/slaset.f \
+  lapack/slasq1.f \
+  lapack/slasq2.f \
+  lapack/slasq3.f \
+  lapack/slasq4.f \
+  lapack/slasq4.f \
+  lapack/slasq5.f \
+  lapack/slasq6.f \
+  lapack/slasr.f \
+  lapack/slasrt.f \
+  lapack/slassq.f \
+  lapack/slassq.f \
+  lapack/slasv2.f \
+  lapack/slaswp.f \
+  lapack/slasy2.f \
+  lapack/slatbs.f \
+  lapack/slatrd.f \
+  lapack/slatrd.f \
+  lapack/slatrs.f \
+  lapack/slatrz.f \
+  lapack/slauu2.f \
+  lapack/slauum.f \
+  lapack/slazq3.f \
+  lapack/slazq3.f \
+  lapack/slazq4.f \
+  lapack/sorg2l.f \
+  lapack/sorg2r.f \
+  lapack/sorgbr.f \
+  lapack/sorghr.f \
+  lapack/sorghr.f \
+  lapack/sorgl2.f \
+  lapack/sorglq.f \
+  lapack/sorgql.f \
+  lapack/sorgqr.f \
+  lapack/sorgtr.f \
+  lapack/sorgtr.f \
+  lapack/sorm2r.f \
+  lapack/sormbr.f \
+  lapack/sorml2.f \
+  lapack/sormlq.f \
+  lapack/sormqr.f \
+  lapack/sormqr.f \
+  lapack/sormr3.f \
+  lapack/sormrz.f \
+  lapack/spbcon.f \
+  lapack/spbtf2.f \
+  lapack/spbtrf.f \
+  lapack/spbtrf.f \
+  lapack/spbtrs.f \
+  lapack/spocon.f \
+  lapack/spotf2.f \
+  lapack/spotrf.f \
+  lapack/spotri.f \
+  lapack/spotri.f \
+  lapack/spotrs.f \
+  lapack/sptsv.f \
+  lapack/spttrf.f \
+  lapack/spttrs.f \
+  lapack/sptts2.f \
+  lapack/sptts2.f \
+  lapack/srscl.f \
+  lapack/ssteqr.f \
+  lapack/ssterf.f \
+  lapack/ssyev.f \
+  lapack/ssytd2.f \
+  lapack/ssytd2.f \
+  lapack/ssytrd.f \
+  lapack/stgevc.f \
+  lapack/strcon.f \
+  lapack/strevc.f \
+  lapack/strexc.f \
+  lapack/strexc.f \
+  lapack/strsen.f \
+  lapack/strsyl.f \
+  lapack/strti2.f \
+  lapack/strtri.f \
+  lapack/strtrs.f \
+  lapack/strtrs.f \
+  lapack/stzrzf.f \
+  lapack/zbdsqr.f \
+  lapack/zdrscl.f \
+  lapack/zgbcon.f \
+  lapack/zgbtf2.f \
+  lapack/zgbtf2.f \
+  lapack/zgbtrf.f \
+  lapack/zgbtrs.f \
+  lapack/zgebak.f \
+  lapack/zgebal.f \
+  lapack/zgebd2.f \
+  lapack/zgebd2.f \
+  lapack/zgebrd.f \
+  lapack/zgecon.f \
+  lapack/zgeesx.f \
+  lapack/zgeev.f \
+  lapack/zgehd2.f \
+  lapack/zgehd2.f \
+  lapack/zgehrd.f \
+  lapack/zgelq2.f \
+  lapack/zgelqf.f \
+  lapack/zgelsd.f \
+  lapack/zgelss.f \
+  lapack/zgelss.f \
+  lapack/zgelsy.f \
+  lapack/zgeqp3.f \
+  lapack/zgeqpf.f \
+  lapack/zgeqr2.f \
+  lapack/zgeqrf.f \
+  lapack/zgeqrf.f \
+  lapack/zgesvd.f \
+  lapack/zgesv.f \
+  lapack/zgetf2.f \
+  lapack/zgetrf.f \
+  lapack/zgetri.f \
+  lapack/zgetri.f \
+  lapack/zgetrs.f \
+  lapack/zggbak.f \
+  lapack/zggbal.f \
+  lapack/zggev.f \
+  lapack/zgghrd.f \
+  lapack/zgghrd.f \
+  lapack/zgtsv.f \
+  lapack/zgttrf.f \
+  lapack/zgttrs.f \
+  lapack/zgtts2.f \
+  lapack/zheev.f \
+  lapack/zheev.f \
+  lapack/zhetd2.f \
+  lapack/zhetrd.f \
+  lapack/zhgeqz.f \
+  lapack/zhseqr.f \
+  lapack/zlabrd.f \
+  lapack/zlabrd.f \
+  lapack/zlacgv.f \
+  lapack/zlacn2.f \
+  lapack/zlacon.f \
+  lapack/zlacpy.f \
+  lapack/zladiv.f \
+  lapack/zladiv.f \
+  lapack/zlahqr.f \
+  lapack/zlahr2.f \
+  lapack/zlahrd.f \
+  lapack/zlaic1.f \
+  lapack/zlals0.f \
+  lapack/zlals0.f \
+  lapack/zlalsa.f \
+  lapack/zlalsd.f \
+  lapack/zlange.f \
+  lapack/zlanhe.f \
+  lapack/zlanhs.f \
+  lapack/zlanhs.f \
+  lapack/zlantr.f \
+  lapack/zlaqp2.f \
+  lapack/zlaqps.f \
+  lapack/zlaqr0.f \
+  lapack/zlaqr1.f \
+  lapack/zlaqr1.f \
+  lapack/zlaqr2.f \
+  lapack/zlaqr3.f \
+  lapack/zlaqr4.f \
+  lapack/zlaqr5.f \
+  lapack/zlarfb.f \
+  lapack/zlarfb.f \
+  lapack/zlarf.f \
+  lapack/zlarfg.f \
+  lapack/zlarft.f \
+  lapack/zlarfx.f \
+  lapack/zlartg.f \
+  lapack/zlartg.f \
+  lapack/zlarzb.f \
+  lapack/zlarz.f \
+  lapack/zlarzt.f \
+  lapack/zlascl.f \
+  lapack/zlaset.f \
+  lapack/zlaset.f \
+  lapack/zlasr.f \
+  lapack/zlassq.f \
+  lapack/zlaswp.f \
+  lapack/zlatbs.f \
+  lapack/zlatrd.f \
+  lapack/zlatrd.f \
+  lapack/zlatrs.f \
+  lapack/zlatrz.f \
+  lapack/zlauu2.f \
+  lapack/zlauum.f \
+  lapack/zpbcon.f \
+  lapack/zpbcon.f \
+  lapack/zpbtf2.f \
+  lapack/zpbtrf.f \
+  lapack/zpbtrs.f \
+  lapack/zpocon.f \
+  lapack/zpotf2.f \
+  lapack/zpotf2.f \
+  lapack/zpotrf.f \
+  lapack/zpotri.f \
+  lapack/zpotrs.f \
+  lapack/zptsv.f \
+  lapack/zpttrf.f \
+  lapack/zpttrf.f \
+  lapack/zpttrs.f \
+  lapack/zptts2.f \
+  lapack/zrot.f \
+  lapack/zsteqr.f \
+  lapack/ztgevc.f \
+  lapack/ztgevc.f \
+  lapack/ztrcon.f \
+  lapack/ztrevc.f \
+  lapack/ztrexc.f \
+  lapack/ztrsen.f \
+  lapack/ztrsyl.f \
+  lapack/ztrsyl.f \
+  lapack/ztrti2.f \
+  lapack/ztrtri.f \
+  lapack/ztrtrs.f \
+  lapack/ztzrzf.f \
+  lapack/zung2l.f \
+  lapack/zung2l.f \
+  lapack/zung2r.f \
+  lapack/zungbr.f \
+  lapack/zunghr.f \
+  lapack/zungl2.f \
+  lapack/zunglq.f \
+  lapack/zunglq.f \
+  lapack/zungql.f \
+  lapack/zungqr.f \
+  lapack/zungtr.f \
+  lapack/zunm2r.f \
+  lapack/zunmbr.f \
+  lapack/zunmbr.f \
+  lapack/zunml2.f \
+  lapack/zunmlq.f \
+  lapack/zunmqr.f \
+  lapack/zunmr3.f \
+  lapack/zunmrz.f \
+  lapack/zunmrz.f \
+  lapack/chegs2.f \
+  lapack/chegst.f \
+  lapack/chegv.f \
+  lapack/dsygs2.f \
+  lapack/dsygst.f \
+  lapack/dsygv.f \
+  lapack/ssygs2.f \
+  lapack/ssygst.f \
+  lapack/ssygv.f \
+  lapack/zhegs2.f \
+  lapack/zhegst.f \
+  lapack/zhegv.f
+
+if AMCOND_HAVE_LAPACK
+  EXTRA_DIST += $(LAPACK_SRC)
+else
+  libcruft_la_SOURCES += $(LAPACK_SRC)
+endif
--- a/libcruft/misc/Makefile.in	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +0,0 @@
-# Makefile for octave's libcruft/misc directory
-#
-# Copyright (C) 1993, 1994, 1995, 1996, 1997, 2000, 2001, 2002, 2003,
-#               2006, 2007, 2008 John W. Eaton
-#
-# This file is part of Octave.
-# 
-# Octave is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 3 of the License, or (at
-# your option) any later version.
-# 
-# Octave is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with Octave; see the file COPYING.  If not, see
-# <http://www.gnu.org/licenses/>.
-
-TOPDIR = ../..
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-
-EXTERNAL_DISTFILES = $(DISTFILES)
-
-FSRC = d1mach.f r1mach.f i1mach.f
-
-CSRC = f77-fcn.c lo-error.c cquit.c
-
-CXXSRC = f77-extern.cc quit.cc
-
-MAKEDEPS := $(patsubst %.c, %.d, $(CSRC)) $(patsubst %.cc, %.d, $(CXXSRC))
-
-INCLUDES := f77-fcn.h lo-error.h quit.h
-
-SPECIAL:= d1mach-tst.for $(INCLUDES)
-
-include $(TOPDIR)/Makeconf
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-
-include ../Makerules
-
-install install-strip::
-	$(top_srcdir)/mkinstalldirs $(DESTDIR)$(octincludedir)/octave
-	for f in $(INCLUDES); do \
-	  rm -f $(DESTDIR)$(octincludedir)/octave/$$f; \
-	  $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(octincludedir)/octave/$$f; \
-	done
-	$(mk-includedir-link)
-
-uninstall::
-	for f in $(INCLUDES); do rm -f $(DESTDIR)$(octincludedir)/octave/$$f; done
-
-ifdef omit_deps
-.PHONY: $(MAKEDEPS)
-endif
-
--include $(MAKEDEPS)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libcruft/misc/module.mk	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,18 @@
+EXTRA_DIST += \
+  misc/module.mk \
+  misc/d1mach-tst.for 
+
+libcruft_la_SOURCES += \
+  misc/cquit.c \
+  misc/d1mach.f \
+  misc/f77-extern.cc \
+  misc/f77-fcn.c \
+  misc/i1mach.f \
+  misc/lo-error.c \
+  misc/quit.cc \
+  misc/r1mach.f
+
+octinclude_HEADERS += \
+  misc/f77-fcn.h \
+  misc/lo-error.h \
+  misc/quit.h
--- a/libcruft/odepack/Makefile.in	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-# Makefile for octave's libcruft/odepack directory
-#
-# Copyright (C) 1993, 1994, 1995, 2007, 2008 John W. Eaton
-#
-# This file is part of Octave.
-# 
-# Octave is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 3 of the License, or (at
-# your option) any later version.
-# 
-# Octave is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with Octave; see the file COPYING.  If not, see
-# <http://www.gnu.org/licenses/>.
-
-TOPDIR = ../..
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-
-EXTERNAL_DISTFILES = $(DISTFILES)
-
-FSRC = cfode.f dlsode.f ewset.f intdy.f prepj.f solsy.f stode.f vnorm.f \
-  scfode.f sewset.f sintdy.f slsode.f sprepj.f ssolsy.f sstode.f svnorm.f
-
-include $(TOPDIR)/Makeconf
-
-include ../Makerules
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libcruft/odepack/module.mk	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,19 @@
+EXTRA_DIST += odepack/module.mk
+
+libcruft_la_SOURCES += \
+  odepack/cfode.f \
+  odepack/dlsode.f \
+  odepack/ewset.f \
+  odepack/intdy.f \
+  odepack/prepj.f \
+  odepack/solsy.f \
+  odepack/stode.f \
+  odepack/vnorm.f \
+  odepack/scfode.f \
+  odepack/sewset.f \
+  odepack/sintdy.f \
+  odepack/slsode.f \
+  odepack/sprepj.f \
+  odepack/ssolsy.f \
+  odepack/sstode.f \
+  odepack/svnorm.f
--- a/libcruft/ordered-qz/Makefile.in	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-# Makefile for octave's libcruft/ordered-qz directory
-#
-# Copyright (C) 1998, 2007, 2008 John W. Eaton
-#
-# This file is part of Octave.
-# 
-# Octave is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 3 of the License, or (at
-# your option) any later version.
-# 
-# Octave is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with Octave; see the file COPYING.  If not, see
-# <http://www.gnu.org/licenses/>.
-
-TOPDIR = ../..
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-
-EXTERNAL_DISTFILES = $(DISTFILES)
-
-FSRC = dsubsp.f exchqz.f ssubsp.f sexchqz.f
-
-include $(TOPDIR)/Makeconf
-
-include ../Makerules
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libcruft/ordered-qz/module.mk	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,7 @@
+EXTRA_DIST += ordered-qz/module.mk
+
+libcruft_la_SOURCES += \
+  ordered-qz/dsubsp.f \
+  ordered-qz/exchqz.f \
+  ordered-qz/ssubsp.f \
+  ordered-qz/sexchqz.f
--- a/libcruft/quadpack/Makefile.in	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-# Makefile for octave's libcruft/quadpack directory
-#
-# Copyright (C) 1993, 1994, 1995, 2007, 2008 John W. Eaton
-#
-# This file is part of Octave.
-# 
-# Octave is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 3 of the License, or (at
-# your option) any later version.
-# 
-# Octave is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with Octave; see the file COPYING.  If not, see
-# <http://www.gnu.org/licenses/>.
-
-TOPDIR = ../..
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-
-EXTERNAL_DISTFILES = $(DISTFILES)
-
-FSRC = dqagi.f dqagie.f dqagp.f dqagpe.f dqelg.f dqk15i.f \
-  dqk21.f dqpsrt.f qagie.f qagi.f qagpe.f qagp.f qelg.f \
-  qk15i.f qk21.f qpsrt.f xerror.f
-
-include $(TOPDIR)/Makeconf
-
-include ../Makerules
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libcruft/quadpack/module.mk	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,20 @@
+EXTRA_DIST += quadpack/module.mk
+
+libcruft_la_SOURCES += \
+  quadpack/dqagi.f \
+  quadpack/dqagie.f \
+  quadpack/dqagp.f \
+  quadpack/dqagpe.f \
+  quadpack/dqelg.f \
+  quadpack/dqk15i.f \
+  quadpack/dqk21.f \
+  quadpack/dqpsrt.f \
+  quadpack/qagie.f \
+  quadpack/qagi.f \
+  quadpack/qagpe.f \
+  quadpack/qagp.f \
+  quadpack/qelg.f \
+  quadpack/qk15i.f \
+  quadpack/qk21.f \
+  quadpack/qpsrt.f \
+  quadpack/xerror.f
--- a/libcruft/ranlib/Makefile.in	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-# Makefile for octave's libcruft/ranlib directory
-#
-# Copyright (C) 1993, 1994, 1995, 1997, 1998, 2007 John W. Eaton
-#
-# This file is part of Octave.
-# 
-# Octave is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 3 of the License, or (at
-# your option) any later version.
-# 
-# Octave is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with Octave; see the file COPYING.  If not, see
-# <http://www.gnu.org/licenses/>.
-
-TOPDIR = ../..
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-
-SPECIAL = HOWTOGET README randlib.chs randlib.fdoc \
-	tstbot.for tstgmn.for tstmid.for
-
-EXTERNAL_DISTFILES = $(DISTFILES) $(srcdir)/Basegen.doc
-
-FSRC = advnst.f genbet.f genchi.f genexp.f genf.f gengam.f \
-  genmn.f genmul.f gennch.f gennf.f gennor.f genprm.f genunf.f \
-  getcgn.f getsd.f ignbin.f ignlgi.f ignnbn.f ignpoi.f ignuin.f \
-  initgn.f inrgcm.f lennob.f mltmod.f phrtsd.f qrgnin.f ranf.f \
-  setall.f setant.f setgmn.f setsd.f sexpo.f sgamma.f snorm.f wrap.f
-
-include $(TOPDIR)/Makeconf
-
-include ../Makerules
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libcruft/ranlib/module.mk	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,47 @@
+EXTRA_DIST += \
+  ranlib/module.mk \
+  ranlib/Basegen.doc \
+  ranlib/HOWTOGET \
+  ranlib/README \
+  ranlib/randlib.chs \
+  ranlib/randlib.fdoc \
+  ranlib/tstbot.for \
+  ranlib/tstgmn.for \
+  ranlib/tstmid.for
+
+libcruft_la_SOURCES += \
+  ranlib/advnst.f \
+  ranlib/genbet.f \
+  ranlib/genchi.f \
+  ranlib/genexp.f \
+  ranlib/genf.f \
+  ranlib/gengam.f \
+  ranlib/genmn.f \
+  ranlib/genmul.f \
+  ranlib/gennch.f \
+  ranlib/gennf.f \
+  ranlib/gennor.f \
+  ranlib/genprm.f \
+  ranlib/genunf.f \
+  ranlib/getcgn.f \
+  ranlib/getsd.f \
+  ranlib/ignbin.f \
+  ranlib/ignlgi.f \
+  ranlib/ignnbn.f \
+  ranlib/ignpoi.f \
+  ranlib/ignuin.f \
+  ranlib/initgn.f \
+  ranlib/inrgcm.f \
+  ranlib/lennob.f \
+  ranlib/mltmod.f \
+  ranlib/phrtsd.f \
+  ranlib/qrgnin.f \
+  ranlib/ranf.f \
+  ranlib/setall.f \
+  ranlib/setant.f \
+  ranlib/setgmn.f \
+  ranlib/setsd.f \
+  ranlib/sexpo.f \
+  ranlib/sgamma.f \
+  ranlib/snorm.f \
+  ranlib/wrap.f
--- a/libcruft/slatec-err/Makefile.in	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-# Makefile for octave's libcruft/slatec-err directory
-#
-# Copyright (C) 1999, 2007 John W. Eaton
-#
-# This file is part of Octave.
-# 
-# Octave is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 3 of the License, or (at
-# your option) any later version.
-# 
-# Octave is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with Octave; see the file COPYING.  If not, see
-# <http://www.gnu.org/licenses/>.
-
-TOPDIR = ../..
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-
-EXTERNAL_DISTFILES = $(DISTFILES)
-
-include $(TOPDIR)/Makeconf
-
-FSRC = fdump.f ixsav.f j4save.f xerclr.f xercnt.f xerhlt.f xermsg.f \
-  xerprn.f xerrwd.f xersve.f xgetf.f xgetua.f xsetf.f xsetua.f
-
-include ../Makerules
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libcruft/slatec-err/module.mk	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,17 @@
+EXTRA_DIST += slatec-err/module.mk
+
+libcruft_la_SOURCES += \
+  slatec-err/fdump.f \
+  slatec-err/ixsav.f \
+  slatec-err/j4save.f \
+  slatec-err/xerclr.f \
+  slatec-err/xercnt.f \
+  slatec-err/xerhlt.f \
+  slatec-err/xermsg.f \
+  slatec-err/xerprn.f \
+  slatec-err/xerrwd.f \
+  slatec-err/xersve.f \
+  slatec-err/xgetf.f \
+  slatec-err/xgetua.f \
+  slatec-err/xsetf.f \
+  slatec-err/xsetua.f
--- a/libcruft/slatec-fn/Makefile.in	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-# Makefile for octave's libcruft/slatec-fn directory
-#
-# Copyright (C) 1995, 2007, 2008 John W. Eaton
-#
-# This file is part of Octave.
-# 
-# Octave is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 3 of the License, or (at
-# your option) any later version.
-# 
-# Octave is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with Octave; see the file COPYING.  If not, see
-# <http://www.gnu.org/licenses/>.
-
-TOPDIR = ../..
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-
-EXTERNAL_DISTFILES = $(DISTFILES)
-
-include $(TOPDIR)/Makeconf
-
-FSRC = albeta.f alngam.f alnrel.f algams.f acosh.f asinh.f atanh.f betai.f \
-  csevl.f d9gmit.f d9lgic.f d9lgit.f d9lgmc.f dacosh.f dasinh.f datanh.f \
-  dbetai.f dcsevl.f derf.f derfc.f dgami.f dgamit.f dgamlm.f dgamma.f \
-  dgamr.f dlbeta.f dlgams.f dlngam.f dlnrel.f dpchim.f dpchst.f erf.f erfc.f \
-  gami.f gamit.f gamlim.f gamma.f gamr.f initds.f inits.f pchim.f pchst.f \
-  r9lgmc.f r9lgit.f r9gmit.f r9lgic.f xdacosh.f xdasinh.f xdatanh.f \
-  xdbetai.f xderf.f xderfc.f xdgami.f xdgamit.f xdgamma.f xgmainc.f xacosh.f \
-  xasinh.f xatanh.f xerf.f xerfc.f xsgmainc.f xgamma.f xbetai.f
-
-include ../Makerules
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libcruft/slatec-fn/module.mk	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,67 @@
+EXTRA_DIST += slatec-fn/module.mk
+
+libcruft_la_SOURCES += \
+  slatec-fn/albeta.f \
+  slatec-fn/alngam.f \
+  slatec-fn/alnrel.f \
+  slatec-fn/algams.f \
+  slatec-fn/acosh.f \
+  slatec-fn/asinh.f \
+  slatec-fn/atanh.f \
+  slatec-fn/betai.f \
+  slatec-fn/csevl.f \
+  slatec-fn/d9gmit.f \
+  slatec-fn/d9lgic.f \
+  slatec-fn/d9lgit.f \
+  slatec-fn/d9lgmc.f \
+  slatec-fn/dacosh.f \
+  slatec-fn/dasinh.f \
+  slatec-fn/datanh.f \
+  slatec-fn/dbetai.f \
+  slatec-fn/dcsevl.f \
+  slatec-fn/derf.f \
+  slatec-fn/derfc.f \
+  slatec-fn/dgami.f \
+  slatec-fn/dgamit.f \
+  slatec-fn/dgamlm.f \
+  slatec-fn/dgamma.f \
+  slatec-fn/dgamr.f \
+  slatec-fn/dlbeta.f \
+  slatec-fn/dlgams.f \
+  slatec-fn/dlngam.f \
+  slatec-fn/dlnrel.f \
+  slatec-fn/dpchim.f \
+  slatec-fn/dpchst.f \
+  slatec-fn/erf.f \
+  slatec-fn/erfc.f \
+  slatec-fn/gami.f \
+  slatec-fn/gamit.f \
+  slatec-fn/gamlim.f \
+  slatec-fn/gamma.f \
+  slatec-fn/gamr.f \
+  slatec-fn/initds.f \
+  slatec-fn/inits.f \
+  slatec-fn/pchim.f \
+  slatec-fn/pchst.f \
+  slatec-fn/r9lgmc.f \
+  slatec-fn/r9lgit.f \
+  slatec-fn/r9gmit.f \
+  slatec-fn/r9lgic.f \
+  slatec-fn/xdacosh.f \
+  slatec-fn/xdasinh.f \
+  slatec-fn/xdatanh.f \
+  slatec-fn/xdbetai.f \
+  slatec-fn/xderf.f \
+  slatec-fn/xderfc.f \
+  slatec-fn/xdgami.f \
+  slatec-fn/xdgamit.f \
+  slatec-fn/xdgamma.f \
+  slatec-fn/xgmainc.f \
+  slatec-fn/xacosh.f \
+  slatec-fn/xasinh.f \
+  slatec-fn/xatanh.f \
+  slatec-fn/xerf.f \
+  slatec-fn/xerfc.f \
+  slatec-fn/xsgmainc.f \
+  slatec-fn/xgamma.f \
+  slatec-fn/xbetai.f
--- a/libcruft/villad/Makefile.in	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-# Makefile for octave's libcruft/villad directory
-#
-# Copyright (C) 1993, 1994, 1995, 2007 John W. Eaton
-#
-# This file is part of Octave.
-# 
-# Octave is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 3 of the License, or (at
-# your option) any later version.
-# 
-# Octave is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with Octave; see the file COPYING.  If not, see
-# <http://www.gnu.org/licenses/>.
-
-TOPDIR = ../..
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-
-EXTERNAL_DISTFILES = $(DISTFILES)
-
-FSRC := dfopr.f dif.f intrp.f jcobi.f radau.f vilerr.f
-
-include $(TOPDIR)/Makeconf
-
-include ../Makerules
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libcruft/villad/module.mk	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,9 @@
+EXTRA_DIST += villad/module.mk
+
+libcruft_la_SOURCES += \
+  villad/dfopr.f \
+  villad/dif.f \
+  villad/intrp.f \
+  villad/jcobi.f \
+  villad/radau.f \
+  villad/vilerr.f
--- a/liboctave/ChangeLog	Tue Nov 10 13:25:57 2009 -0500
+++ b/liboctave/ChangeLog	Tue Nov 10 15:02:25 2009 -0500
@@ -1,3 +1,10 @@
+2009-11-10  John W. Eaton  <jwe@octave.org>
+
+	* mx-ops, sparse-mx-ops, vx-ops b/liboctave/vx-ops:
+	Add comment about updating.
+	* Makefile.am, config-ops.sh: New files.
+	* Makefile.in: Delete.
+
 2009-11-09  Jaroslav Hajek  <highegg@gmail.com>
 
 	* dSparse.h (Sparse::max): Use Array<octave_idx_type>.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/liboctave/Makefile.am	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,554 @@
+# Makefile for octave's liboctave directory
+#
+# Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+#               2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 John W. Eaton
+#
+# This file is part of Octave.
+# 
+# Octave is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation; either version 3 of the License, or (at
+# your option) any later version.
+# 
+# Octave is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with Octave; see the file COPYING.  If not, see
+# <http://www.gnu.org/licenses/>.
+
+TOPDIR = ..
+ 
+include ../common.mk
+
+octlib_LTLIBRARIES = liboctave.la
+
+AM_CPPFLAGS = -I$(top_srcdir)/libcruft/misc
+
+AUTOMAKE_OPTIONS = subdir-objects
+
+EXTRA_DIST = \
+  ChangeLog \
+  config-ops.sh \
+  mk-ops.awk \
+  mx-op-inc.mk \
+  mx-op-src.mk \
+  mx-ops \
+  smx-op-inc.mk \
+  smx-op-src.mk \
+  sparse-mk-ops.awk \
+  sparse-mx-ops \
+  vx-op-inc.mk \
+  vx-op-src.mk \
+  vx-ops \
+  $(OPT_IN)
+
+MATRIX_INC = \
+  Array-util.h \
+  Array.h \
+  Array2.h \
+  Array3.h \
+  ArrayN.h \
+  CColVector.h \
+  CDiagMatrix.h \
+  CMatrix.h \
+  CNDArray.h \
+  CRowVector.h \
+  CSparse.h \
+  CmplxAEPBAL.h \
+  CmplxCHOL.h \
+  CmplxGEPBAL.h \
+  CmplxHESS.h \
+  CmplxLU.h \
+  CmplxQR.h \
+  CmplxQRP.h \
+  CmplxSCHUR.h \
+  CmplxSVD.h \
+  DET.h \
+  DiagArray2.h \
+  EIG.h \
+  MArray-decl.h \
+  MArray-defs.h \
+  MArray.h \
+  MArray2.h \
+  MArrayN.h \
+  MDiagArray2.h \
+  MSparse-defs.h \
+  MSparse.h \
+  Matrix.h \
+  MatrixType.h \
+  PermMatrix.h \
+  Sparse-diag-op-defs.h \
+  Sparse-op-defs.h \
+  Sparse-perm-op-defs.h \
+  Sparse.h \
+  SparseCmplxCHOL.h \
+  SparseCmplxLU.h \
+  SparseCmplxQR.h \
+  SparseQR.h \
+  SparsedbleCHOL.h \
+  SparsedbleLU.h \
+  base-aepbal.h \
+  base-lu.h \
+  base-qr.h \
+  boolMatrix.h \
+  boolNDArray.h \
+  boolSparse.h \
+  bsxfun-decl.h \
+  chMatrix.h \
+  chNDArray.h \
+  dColVector.h \
+  dDiagMatrix.h \
+  dMatrix.h \
+  dNDArray.h \
+  dRowVector.h \
+  dSparse.h \
+  dbleAEPBAL.h \
+  dbleCHOL.h \
+  dbleGEPBAL.h \
+  dbleHESS.h \
+  dbleLU.h \
+  dbleQR.h \
+  dbleQRP.h \
+  dbleSCHUR.h \
+  dbleSVD.h \
+  dim-vector.h \
+  fCColVector.h \
+  fCDiagMatrix.h \
+  fCMatrix.h \
+  fCNDArray.h \
+  fCRowVector.h \
+  fCmplxAEPBAL.h \
+  fCmplxCHOL.h \
+  fCmplxGEPBAL.h \
+  fCmplxHESS.h \
+  fCmplxLU.h \
+  fCmplxQR.h \
+  fCmplxQRP.h \
+  fCmplxSCHUR.h \
+  fCmplxSVD.h \
+  fColVector.h \
+  fDiagMatrix.h \
+  fEIG.h \
+  fMatrix.h \
+  fNDArray.h \
+  fRowVector.h \
+  floatAEPBAL.h \
+  floatCHOL.h \
+  floatGEPBAL.h \
+  floatHESS.h \
+  floatLU.h \
+  floatQR.h \
+  floatQRP.h \
+  floatSCHUR.h \
+  floatSVD.h \
+  int16NDArray.h \
+  int32NDArray.h \
+  int64NDArray.h \
+  int8NDArray.h \
+  intNDArray.h \
+  mx-base.h \
+  mx-defs.h \
+  mx-ext.h \
+  mx-op-decl.h \
+  mx-op-defs.h \
+  sparse-base-chol.h \
+  sparse-base-lu.h \
+  uint16NDArray.h \
+  uint32NDArray.h \
+  uint64NDArray.h \
+  uint8NDArray.h
+
+OPT_IN = \
+  DASPK-opts.in \
+  DASRT-opts.in \
+  DASSL-opts.in \
+  LSODE-opts.in \
+  Quad-opts.in
+
+OPT_INC = \
+  DASPK-opts.h \
+  DASRT-opts.h \
+  DASSL-opts.h \
+  LSODE-opts.h \
+  Quad-opts.h
+
+INCS = \
+  CollocWt.h \
+  DAE.h \
+  DAEFunc.h \
+  DAERT.h \
+  DAERTFunc.h \
+  DASPK.h \
+  DASRT.h \
+  DASSL.h \
+  LSODE.h \
+  ODE.h \
+  ODEFunc.h \
+  ODES.h \
+  ODESFunc.h \
+  Quad.h \
+  Range.h \
+  base-dae.h \
+  base-de.h \
+  base-min.h \
+  byte-swap.h \
+  cmd-edit.h \
+  cmd-hist.h \
+  data-conv.h \
+  dir-ops.h \
+  file-ops.h \
+  file-stat.h \
+  functor.h \
+  getopt.h \
+  glob-match.h \
+  idx-vector.h \
+  kpse-xfns.h \
+  lo-ieee.h \
+  lo-mappers.h \
+  lo-math.h \
+  lo-specfun.h \
+  lo-sysdep.h \
+  lo-traits.h \
+  lo-utils.h \
+  mach-info.h \
+  md5.h \
+  oct-alloc.h \
+  oct-cmplx.h \
+  oct-env.h \
+  oct-fftw.h \
+  oct-getopt.h \
+  oct-group.h \
+  oct-inttypes.h \
+  oct-locbuf.h \
+  oct-md5.h \
+  oct-mem.h \
+  oct-mutex.h \
+  oct-norm.h \
+  oct-passwd.h \
+  oct-rand.h \
+  oct-rl-edit.h \
+  oct-rl-hist.h \
+  oct-shlib.h \
+  oct-sort.h \
+  oct-sparse.h \
+  oct-spparms.h \
+  oct-syscalls.h \
+  oct-time.h \
+  oct-uname.h \
+  pathlen.h \
+  pathsearch.h \
+  prog-args.h \
+  randgamma.h \
+  randmtzig.h \
+  randpoisson.h \
+  regex-match.h \
+  sparse-sort.h \
+  sparse-util.h \
+  statdefs.h \
+  str-vec.h \
+  sun-utils.h \
+  sysdir.h \
+  systime.h \
+  syswait.h \
+  $(MATRIX_INC)
+
+OTHER_INC = \
+  intNDArray.cc \
+  kpse.cc \
+  mx-inlines.cc
+
+include vx-op-inc.mk
+include mx-op-inc.mk
+include smx-op-inc.mk
+
+BUILT_INCS = \
+  mx-ops.h \
+  $(OPT_INC) \
+  $(MX_OP_INC) \
+  $(VX_OP_INC) \
+  $(SMX_OP_INC)
+
+BUILT_SOURCES = $(BUILT_INCS)
+
+TEMPLATE_SRC = \
+  Array.cc \
+  DiagArray2.cc \
+  MArray.cc \
+  MArray2.cc \
+  MArrayN.cc \
+  MDiagArray2.cc \
+  base-lu.cc \
+  base-qr.cc \
+  bsxfun-defs.cc \
+  eigs-base.cc \
+  oct-sort.cc \
+  sparse-base-chol.cc \
+  sparse-base-lu.cc \
+  sparse-dmsolve.cc
+
+TI_SRC = \
+  Array-C.cc \
+  Array-b.cc \
+  Array-ch.cc \
+  Array-d.cc \
+  Array-f.cc \
+  Array-fC.cc \
+  Array-i.cc \
+  Array-idx-vec.cc \
+  Array-s.cc \
+  Array-str.cc \
+  Array-voidp.cc \
+  MArray-C.cc \
+  MArray-ch.cc \
+  MArray-d.cc \
+  MArray-f.cc \
+  MArray-fC.cc \
+  MArray-i.cc \
+  MArray-s.cc \
+  MSparse-C.cc \
+  MSparse-d.cc \
+  Sparse-C.cc \
+  Sparse-b.cc \
+  Sparse-d.cc \
+  oct-inttypes.cc
+
+MATRIX_SRC = \
+  Array-util.cc \
+  CColVector.cc \
+  CDiagMatrix.cc \
+  CMatrix.cc \
+  CNDArray.cc \
+  CRowVector.cc \
+  CSparse.cc \
+  CmplxAEPBAL.cc \
+  CmplxCHOL.cc \
+  CmplxGEPBAL.cc \
+  CmplxHESS.cc \
+  CmplxLU.cc \
+  CmplxQR.cc \
+  CmplxQRP.cc \
+  CmplxSCHUR.cc \
+  CmplxSVD.cc \
+  EIG.cc \
+  MSparse.cc \
+  MatrixType.cc \
+  PermMatrix.cc \
+  Sparse.cc \
+  SparseCmplxCHOL.cc \
+  SparseCmplxLU.cc \
+  SparseCmplxQR.cc \
+  SparseQR.cc \
+  SparsedbleCHOL.cc \
+  SparsedbleLU.cc \
+  boolMatrix.cc \
+  boolNDArray.cc \
+  boolSparse.cc \
+  chMatrix.cc \
+  chNDArray.cc \
+  dColVector.cc \
+  dDiagMatrix.cc \
+  dMatrix.cc \
+  dNDArray.cc \
+  dRowVector.cc \
+  dSparse.cc \
+  dbleAEPBAL.cc \
+  dbleCHOL.cc \
+  dbleGEPBAL.cc \
+  dbleHESS.cc \
+  dbleLU.cc \
+  dbleQR.cc \
+  dbleQRP.cc \
+  dbleSCHUR.cc \
+  dbleSVD.cc \
+  fCColVector.cc \
+  fCDiagMatrix.cc \
+  fCMatrix.cc \
+  fCNDArray.cc \
+  fCRowVector.cc \
+  fCmplxAEPBAL.cc \
+  fCmplxCHOL.cc \
+  fCmplxGEPBAL.cc \
+  fCmplxHESS.cc \
+  fCmplxLU.cc \
+  fCmplxQR.cc \
+  fCmplxQRP.cc \
+  fCmplxSCHUR.cc \
+  fCmplxSVD.cc \
+  fColVector.cc \
+  fDiagMatrix.cc \
+  fEIG.cc \
+  fMatrix.cc \
+  fNDArray.cc \
+  fRowVector.cc \
+  floatAEPBAL.cc \
+  floatCHOL.cc \
+  floatGEPBAL.cc \
+  floatHESS.cc \
+  floatLU.cc \
+  floatQR.cc \
+  floatQRP.cc \
+  floatSCHUR.cc \
+  floatSVD.cc \
+  int16NDArray.cc \
+  int32NDArray.cc \
+  int64NDArray.cc \
+  int8NDArray.cc \
+  uint16NDArray.cc \
+  uint32NDArray.cc \
+  uint64NDArray.cc \
+  uint8NDArray.cc
+
+LIBOCTAVE_CXX_SOURCES = \
+  CollocWt.cc \
+  DASPK.cc \
+  DASRT.cc \
+  DASSL.cc \
+  LSODE.cc \
+  ODES.cc \
+  Quad.cc \
+  Range.cc \
+  data-conv.cc \
+  dir-ops.cc \
+  file-ops.cc \
+  file-stat.cc \
+  glob-match.cc \
+  idx-vector.cc \
+  lo-ieee.cc \
+  lo-mappers.cc \
+  lo-specfun.cc \
+  lo-sysdep.cc \
+  lo-utils.cc \
+  mach-info.cc \
+  oct-alloc.cc \
+  oct-env.cc \
+  oct-fftw.cc \
+  oct-group.cc \
+  oct-locbuf.cc \
+  oct-md5.cc \
+  oct-mutex.cc \
+  oct-norm.cc \
+  oct-passwd.cc \
+  oct-rand.cc \
+  oct-shlib.cc \
+  oct-spparms.cc \
+  oct-syscalls.cc \
+  oct-time.cc \
+  oct-uname.cc \
+  prog-args.cc \
+  regex-match.cc \
+  sparse-sort.cc \
+  sparse-util.cc \
+  str-vec.cc \
+  $(TI_SRC) \
+  $(MATRIX_SRC)
+
+include vx-op-src.mk
+include mx-op-src.mk
+include smx-op-src.mk
+
+BUILT_LIBOCTAVE_CXX_SOURCES = \
+  $(MX_OP_SRC) \
+  $(VX_OP_SRC) \
+  $(SMX_OP_SRC)
+
+LIBOCTAVE_C_SOURCES = \
+  f2c-main.c \
+  filemode.c \
+  getopt.c \
+  getopt1.c \
+  lo-cieee.c \
+  lo-cutils.c \
+  md5.c \
+  mkdir.c \
+  oct-getopt.c \
+  randgamma.c \
+  randmtzig.c \
+  randpoisson.c \
+  rename.c \
+  rmdir.c \
+  strcasecmp.c \
+  strftime.c \
+  strncase.c \
+  strptime.c \
+  tempnam.c \
+  tempname.c
+
+LIBOCTAVE_SOURCES = $(LIBOCTAVE_CXX_SOURCES) $(BUILT_LIBOCTAVE_CXX_SOURCES) \
+	$(LIBOCTAVE_C_SOURCES)
+
+LIBOCT_READLINE_CXX_SOURCES = cmd-edit.cc cmd-hist.cc
+
+LIBOCT_READLINE_C_SOURCES = oct-rl-edit.c oct-rl-hist.c
+
+LIBOCT_READLINE_SOURCES = $(LIBOCT_READLINE_CXX_SOURCES) $(LIBOCT_READLINE_C_SOURCES)
+
+LIBOCT_PATHSEARCH_CXX_SOURCES = pathsearch.cc
+
+LIBOCT_PATHSEARCH_C_SOURCES = kpse-xfns.c
+
+LIBOCT_PATHSEARCH_SOURCES = \
+	$(LIBOCT_PATHSEARCH_C_SOURCES) $(LIBOCT_PATHSEARCH_CXX_SOURCES)
+
+LINK_DEPS = \
+  $(RLD_FLAG) \
+  ../libcruft/libcruft.la \
+  $(SPARSE_XLIBS) \
+  $(ARPACK_LIBS) \
+  $(QRUPDATE_LIBS) \
+  $(FFTW_XLIBS) \
+  $(LAPACK_LIBS) $(BLAS_LIBS) \
+  $(READLINE_LIBS) $(TERM_LIBS) \
+  $(LIBGLOB) $(REGEX_LIBS) $(DL_LIBS) \
+  $(FLIBS) \
+  $(PTHREAD_LIBS) $(LIBS)
+
+liboctave_la_SOURCES = \
+  $(LIBOCTAVE_SOURCES) \
+  $(LIBOCT_READLINE_SOURCES) \
+  $(LIBOCT_PATHSEARCH_SOURCES)
+
+liboctave_la_LIBADD = $(LINK_DEPS)
+
+liboctave_la_LDFLAGS = -release $(version) $(NO_UNDEFINED_LDFLAG) \
+  $(SPARSE_XLDFLAGS) \
+  $(ARPACK_LDFLAGS) \
+  $(QRUPDATE_LDFLAGS) \
+  $(FFTW_XLDFLAGS)
+
+liboctave_la_CPPFLAGS = \
+  $(SPARSE_XCPPFLAGS) \
+  $(FFTW_XCPPFLAGS) \
+  $(ARPACK_CPPFLAGS) \
+  $(AM_CPPFLAGS)
+
+octinclude_HEADERS = \
+  $(INCS) \
+  $(BUILT_INCS) \
+  $(OTHER_INC) \
+  $(TEMPLATE_SRC) \
+  $(EXTRA_HEADERS)
+
+$(OPT_INC) : %.h : %.in $(top_srcdir)/mk-opts.pl
+	@echo making $@ from $<
+	@perl $(top_srcdir)/mk-opts.pl --opt-class-header $< > $@-t
+	@mv $@-t $@
+
+$(VX_OP_INC) $(VX_OP_SRC) : $(srcdir)/mk-ops.awk vx-ops
+	$(AWK) -f $(srcdir)/mk-ops.awk prefix=vx $(srcdir)/vx-ops
+
+$(MX_OP_INC) $(MX_OP_SRC) : $(srcdir)/mk-ops.awk mx-ops
+	$(AWK) -f $(srcdir)/mk-ops.awk prefix=mx $(srcdir)/mx-ops
+
+$(SMX_OP_INC) $(SMX_OP_SRC) : $(srcdir)/sparse-mk-ops.awk sparse-mx-ops
+	$(AWK) -f $(srcdir)/sparse-mk-ops.awk prefix=smx $(srcdir)/sparse-mx-ops
+
+mx-ops.h : $(srcdir)/mk-ops.awk mx-ops
+	$(AWK) -f $(srcdir)/mk-ops.awk prefix=mx make_inclusive_header=mx-ops.h $(srcdir)/mx-ops > $@-t
+	$(simple_move_if_change_rule)
+
+distclean-local maintainer-clean-local:
+	rm -f $(BUILT_INCS) $(BUILT_LIBOCTAVE_CXX_SOURCES)
+.PHONY: distclean-local maintainer-clean-local
--- a/liboctave/Makefile.in	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,438 +0,0 @@
-# Makefile for octave's liboctave directory
-#
-# Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-#               2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 John W. Eaton
-#
-# This file is part of Octave.
-# 
-# Octave is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 3 of the License, or (at
-# your option) any later version.
-# 
-# Octave is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with Octave; see the file COPYING.  If not, see
-# <http://www.gnu.org/licenses/>.
-
-TOPDIR = ..
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-
-include $(TOPDIR)/Makeconf
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-
-DLL_CDEFS = @OCTAVE_DLL_DEFS@
-DLL_CXXDEFS = @OCTAVE_DLL_DEFS@
-
-LINK_DEPS = \
-  $(RLD_FLAG) \
-  -L../libcruft $(LIBCRUFT) \
-  $(SPARSE_LDFLAGS) $(SPARSE_LIBS) \
-  $(ARPACK_LIBS) \
-  $(QRUPDATE_LIBS) \
-  $(FFTW_LDFLAGS) $(FFTW_LIBS) \
-  $(BLAS_LIBS) \
-  $(READLINE_LIBS) $(TERM_LIBS) \
-  $(LIBGLOB) $(REGEX_LIBS) $(DL_LIBS) \
-  $(FLIBS) \
-  $(PTHREAD_LIBS) $(LIBS)
-
-MATRIX_INC := Array.h Array2.h Array3.h ArrayN.h DiagArray2.h \
-	Array-util.h MArray-decl.h MArray-defs.h \
-	MArray.h MArray2.h MDiagArray2.h Matrix.h MArrayN.h \
-	base-lu.h base-qr.h base-aepbal.h bsxfun-decl.h dim-vector.h \
-	mx-base.h mx-op-decl.h \
-	mx-op-defs.h mx-defs.h mx-ext.h CColVector.h CDiagMatrix.h \
-	CMatrix.h CNDArray.h CRowVector.h CmplxAEPBAL.h CmplxCHOL.h \
-	CmplxGEPBAL.h CmplxHESS.h CmplxLU.h CmplxQR.h CmplxQRP.h \
-	CmplxSCHUR.h CmplxSVD.h EIG.h fEIG.h boolMatrix.h boolNDArray.h \
-	chMatrix.h chNDArray.h dColVector.h dDiagMatrix.h dMatrix.h \
-	dNDArray.h dRowVector.h dbleAEPBAL.h dbleCHOL.h DET.h \
-	dbleGEPBAL.h dbleHESS.h dbleLU.h dbleQR.h dbleQRP.h dbleSCHUR.h \
-	dbleSVD.h boolSparse.h CSparse.h dSparse.h MSparse-defs.h MSparse.h \
-	Sparse.h sparse-base-lu.h SparseCmplxLU.h SparsedbleLU.h \
-	sparse-base-chol.h SparseCmplxCHOL.h SparsedbleCHOL.h \
-	SparseCmplxQR.h SparseQR.h Sparse-op-defs.h Sparse-diag-op-defs.h \
-	Sparse-perm-op-defs.h MatrixType.h PermMatrix.h \
-	int8NDArray.h uint8NDArray.h int16NDArray.h uint16NDArray.h \
-	int32NDArray.h uint32NDArray.h int64NDArray.h uint64NDArray.h \
-	intNDArray.h \
-	fCColVector.h fCRowVector.h fCDiagMatrix.h fCMatrix.h fCNDArray.h \
-	fColVector.h fRowVector.h fDiagMatrix.h fMatrix.h fNDArray.h \
-	fCmplxAEPBAL.h fCmplxGEPBAL.h fCmplxHESS.h fCmplxCHOL.h \
-	fCmplxLU.h fCmplxSCHUR.h fCmplxSVD.h fCmplxQR.h \
-	fCmplxQRP.h floatAEPBAL.h \
-	floatCHOL.h floatGEPBAL.h floatHESS.h floatLU.h \
-	floatSCHUR.h floatSVD.h floatQR.h floatQRP.h
-
-MX_OP_INC := $(shell $(AWK) -f $(srcdir)/mk-ops.awk prefix=mx list_h_files=1 $(srcdir)/mx-ops)
-
-VX_OP_INC := $(shell $(AWK) -f $(srcdir)/mk-ops.awk prefix=vx list_h_files=1 $(srcdir)/vx-ops)
-
-SPARSE_MX_OP_INC := $(shell $(AWK) -f $(srcdir)/sparse-mk-ops.awk prefix=smx list_h_files=1 $(srcdir)/sparse-mx-ops)
-
-OPT_BASE := $(addsuffix -opts, DASPK DASRT DASSL LSODE Quad)
-OPT_IN := $(addsuffix .in, $(OPT_BASE))
-OPT_INC := $(addsuffix .h, $(OPT_BASE))
-
-INCLUDES := CollocWt.h DAE.h DAEFunc.h DAERT.h \
-	DAERTFunc.h DASPK.h DASRT.h DASSL.h \
-	LSODE.h \
-	ODE.h ODEFunc.h ODES.h ODESFunc.h \
-	Quad.h Range.h base-dae.h \
-	base-de.h base-min.h byte-swap.h cmd-edit.h cmd-hist.h \
-	data-conv.h dir-ops.h file-ops.h file-stat.h functor.h getopt.h \
-	glob-match.h idx-vector.h kpse-xfns.h \
-	lo-ieee.h lo-mappers.h lo-math.h lo-specfun.h lo-sysdep.h \
-	lo-traits.h lo-utils.h mach-info.h md5.h oct-alloc.h oct-cmplx.h \
-	oct-env.h oct-fftw.h oct-getopt.h oct-group.h oct-inttypes.h \
-	oct-locbuf.h oct-md5.h oct-mem.h oct-mutex.h oct-norm.h \
-        oct-passwd.h oct-rand.h oct-rl-edit.h oct-rl-hist.h oct-shlib.h \
-        oct-sort.h oct-spparms.h oct-syscalls.h oct-sparse.h oct-time.h \
-        oct-uname.h pathlen.h pathsearch.h prog-args.h \
-	randgamma.h randmtzig.h randpoisson.h regex-match.h \
-	sparse-sort.h statdefs.h str-vec.h \
-	sparse-util.h sun-utils.h sysdir.h systime.h syswait.h \
-	$(MATRIX_INC)
-
-BUILT_INCLUDES := mx-ops.h \
-	$(OPT_INC) \
-	$(MX_OP_INC) \
-	$(VX_OP_INC) \
-	$(SPARSE_MX_OP_INC)
-
-TEMPLATE_SRC := Array.cc bsxfun-defs.cc eigs-base.cc DiagArray2.cc \
-	MArray.cc MArray2.cc MArrayN.cc MDiagArray2.cc \
-	base-lu.cc base-qr.cc oct-sort.cc sparse-base-lu.cc \
-	sparse-base-chol.cc sparse-dmsolve.cc
-
-TI_SRC := Array-C.cc Array-b.cc Array-ch.cc Array-i.cc Array-d.cc \
-	Array-f.cc Array-fC.cc Array-s.cc Array-str.cc Array-voidp.cc \
-	Array-idx-vec.cc MArray-C.cc MArray-ch.cc MArray-i.cc MArray-d.cc \
-	MArray-f.cc MArray-fC.cc MArray-s.cc MSparse-C.cc MSparse-d.cc \
-	Sparse-C.cc Sparse-b.cc Sparse-d.cc oct-inttypes.cc
-
-MATRIX_SRC := Array-util.cc CColVector.cc \
-	CDiagMatrix.cc CMatrix.cc CNDArray.cc CRowVector.cc \
-	CmplxAEPBAL.cc CmplxCHOL.cc CmplxGEPBAL.cc CmplxHESS.cc \
-	CmplxLU.cc CmplxQR.cc CmplxQRP.cc CmplxSCHUR.cc CmplxSVD.cc \
-	EIG.cc fEIG.cc boolMatrix.cc boolNDArray.cc chMatrix.cc \
-	chNDArray.cc dColVector.cc dDiagMatrix.cc dMatrix.cc \
-	dNDArray.cc dRowVector.cc dbleAEPBAL.cc dbleCHOL.cc \
-	dbleGEPBAL.cc dbleHESS.cc dbleLU.cc dbleQR.cc dbleQRP.cc \
-	dbleSCHUR.cc dbleSVD.cc boolSparse.cc CSparse.cc dSparse.cc \
-	MSparse.cc Sparse.cc SparseCmplxLU.cc SparsedbleLU.cc \
-	SparseCmplxCHOL.cc SparsedbleCHOL.cc \
-	SparseCmplxQR.cc SparseQR.cc MatrixType.cc PermMatrix.cc \
-	int8NDArray.cc uint8NDArray.cc int16NDArray.cc uint16NDArray.cc \
-	int32NDArray.cc uint32NDArray.cc int64NDArray.cc uint64NDArray.cc \
-	fCColVector.cc fCRowVector.cc fCDiagMatrix.cc fCMatrix.cc fCNDArray.cc \
-	fColVector.cc fRowVector.cc fDiagMatrix.cc fMatrix.cc fNDArray.cc \
-	fCmplxAEPBAL.cc fCmplxCHOL.cc fCmplxGEPBAL.cc \
-	fCmplxHESS.cc fCmplxLU.cc fCmplxSCHUR.cc fCmplxSVD.cc fCmplxQR.cc \
-	fCmplxQRP.cc floatAEPBAL.cc floatCHOL.cc \
-	floatGEPBAL.cc floatHESS.cc floatLU.cc \
-	floatSCHUR.cc floatSVD.cc floatQR.cc floatQRP.cc
-
-MX_OP_SRC := $(shell $(AWK) -f $(srcdir)/mk-ops.awk prefix=mx list_cc_files=1 $(srcdir)/mx-ops)
-
-VX_OP_SRC := $(shell $(AWK) -f $(srcdir)/mk-ops.awk prefix=vx list_cc_files=1 $(srcdir)/vx-ops)
-
-SPARSE_MX_OP_SRC := $(shell $(AWK) -f $(srcdir)/sparse-mk-ops.awk prefix=smx list_cc_files=1 $(srcdir)/sparse-mx-ops)
-
-LIBOCTAVE_CXX_SOURCES := oct-locbuf.cc CollocWt.cc DASPK.cc DASRT.cc \
-	DASSL.cc LSODE.cc ODES.cc \
-	Quad.cc Range.cc data-conv.cc dir-ops.cc \
-	file-ops.cc file-stat.cc glob-match.cc idx-vector.cc \
-	lo-ieee.cc lo-mappers.cc lo-specfun.cc lo-sysdep.cc \
-	lo-utils.cc mach-info.cc oct-alloc.cc oct-env.cc \
-	oct-fftw.cc oct-group.cc oct-mutex.cc oct-md5.cc \
-	oct-norm.cc oct-passwd.cc oct-rand.cc \
-	oct-shlib.cc oct-spparms.cc oct-syscalls.cc oct-time.cc oct-uname.cc \
-	prog-args.cc regex-match.cc \
-	sparse-sort.cc sparse-util.cc str-vec.cc \
-	$(TI_SRC) \
-	$(MATRIX_SRC)
-
-BUILT_LIBOCTAVE_CXX_SOURCES := \
-	$(MX_OP_SRC) \
-	$(VX_OP_SRC) \
-	$(SPARSE_MX_OP_SRC)
-
-LIBOCTAVE_C_SOURCES := f2c-main.c filemode.c getopt.c getopt1.c \
-	lo-cieee.c lo-cutils.c md5.c mkdir.c oct-getopt.c \
-	randgamma.c randmtzig.c randpoisson.c rename.c \
-	rmdir.c strftime.c strptime.c strcasecmp.c strncase.c \
-	tempname.c tempnam.c
-
-LIBOCTAVE_SOURCES := $(LIBOCTAVE_CXX_SOURCES) $(BUILT_LIBOCTAVE_CXX_SOURCES) \
-	$(LIBOCTAVE_C_SOURCES)
-
-LIBOCT_READLINE_CXX_SOURCES := cmd-edit.cc cmd-hist.cc
-
-LIBOCT_READLINE_C_SOURCES := oct-rl-edit.c oct-rl-hist.c
-
-LIBOCT_READLINE_SOURCES := $(LIBOCT_READLINE_CXX_SOURCES) $(LIBOCT_READLINE_C_SOURCES)
-
-LIBOCT_PATHSEARCH_CXX_SOURCES := pathsearch.cc
-
-LIBOCT_PATHSEARCH_C_SOURCES := kpse-xfns.c
-
-LIBOCT_PATHSEARCH_SOURCES := \
-	$(LIBOCT_PATHSEARCH_C_SOURCES) $(LIBOCT_PATHSEARCH_CXX_SOURCES)
-
-SOURCES := \
-	$(LIBOCTAVE_SOURCES) \
-	$(LIBOCT_READLINE_SOURCES) \
-	$(LIBOCT_PATHSEARCH_SOURCES)
-
-EXTRAS := mx-inlines.cc kpse.cc intNDArray.cc
-
-INCLUDES_FOR_INSTALL := $(INCLUDES) $(BUILT_INCLUDES) $(TEMPLATE_SRC) $(EXTRAS)
-
-DISTFILES := $(addprefix $(srcdir)/, Makefile.in ChangeLog mk-ops.awk \
-	mx-ops vx-ops sparse-mk-ops.awk sparse-mx-ops \
-	$(TEMPLATE_SRC) \
-	$(LIBOCTAVE_CXX_SOURCES) \
-	$(LIBOCT_READLINE_SOURCES) \
-	$(LIBOCT_PATHSEARCH_SOURCES) \
-	$(LIBOCTAVE_C_SOURCES) \
-	$(INCLUDES) $(EXTRAS) $(OPT_IN)) \
-	$(BUILT_LIBOCTAVE_CXX_SOURCES) $(BUILT_INCLUDES)
-
-MAKEDEPS_1 := $(patsubst %.cc, %.d, $(SOURCES))
-MAKEDEPS := $(patsubst %.c, %.d, $(MAKEDEPS_1))
-
-LIBOCTAVE_OBJECTS := \
-	$(LIBOCTAVE_CXX_SOURCES:.cc=.o) \
-	$(BUILT_LIBOCTAVE_CXX_SOURCES:.cc=.o) \
-	$(LIBOCTAVE_C_SOURCES:.c=.o) \
-	$(LIBOCT_READLINE_CXX_SOURCES:.cc=.o) \
-	$(LIBOCT_READLINE_C_SOURCES:.c=.o) \
-	$(LIBOCT_PATHSEARCH_CXX_SOURCES:.cc=.o) \
-	$(LIBOCT_PATHSEARCH_C_SOURCES:.c=.o)
-
-ifeq ($(SHARED_LIBS), true)
-  ifdef CXXPICFLAG
-    LIBOCTAVE_PICOBJ := $(addprefix pic/, $(LIBOCTAVE_OBJECTS))
-  else
-    LIBOCTAVE_PICOBJ := $(LIBOCTAVE_OBJECTS)
-  endif
-endif
-
-all: libraries
-.PHONY: all
-
-objects: $(LIBOCTAVE_OBJECTS)
-
-stmp-pic: pic
-	@if [ -f stmp-pic ]; then \
-	  true; \
-	else \
-	  echo "touch stmp-pic"; \
-	  touch stmp-pic; \
-	fi
-
-pic:
-	@if [ -d pic ]; then \
-	  true; \
-	else \
-	  echo "mkdir pic"; \
-	  mkdir pic; \
-	fi
-
-PREREQ := $(OPT_INC) $(VX_OP_INC) $(VX_OP_SRC) \
-	$(MX_OP_INC) $(MX_OP_SRC) mx-ops.h \
-	$(SPARSE_MX_OP_INC) $(SPARSE_MX_OP_SRC)
-
-ifeq ($(SHARED_LIBS), true)
-  ifeq ($(STATIC_LIBS), true)
-    LIBRARIES = $(LIBPRE)octave.$(LIBEXT) $(SHLPRE)octave.$(SHLEXT_VER)
-  else
-    LIBRARIES = $(SHLPRE)octave.$(SHLEXT_VER)
-  endif
-else
-  ifeq ($(STATIC_LIBS), true)
-    LIBRARIES = $(LIBPRE)octave.$(LIBEXT)
-  else
-    LIBRARIES =
-  endif
-endif
-
-libraries: $(LIBRARIES)
-.PHONY: libraries
-
-$(LIBPRE)octave.$(LIBEXT): $(LIBOCTAVE_OBJECTS)
-	rm -f $@
-	$(TEMPLATE_AR) $(TEMPLATE_ARFLAGS) $@ $(LIBOCTAVE_OBJECTS)
-	$(RANLIB) $@
-
-$(SHLPRE)octave.$(SHLEXT_VER): $(SHLPRE)octave.$(SHLEXT)
-	rm -f $@
-	$(LN_S) $< $@
-
-$(SHLPRE)octave.$(SHLEXT): $(LIBOCTAVE_PICOBJ)
-	rm -f $@
-	$(SH_LD) $(SH_LDFLAGS) $(LDFLAGS) $(SONAME_FLAGS) -o $@ \
-	$(LIBOCTAVE_PICOBJ) $(LINK_DEPS)
-
-$(LIBOCTAVE_PICOBJ): stmp-pic
-
-ifndef omit_deps
-$(MAKEDEPS): $(PREREQ)
-endif
-
-check: all
-.PHONY: check
-
-install: install-lib install-inc
-.PHONY: install
-
-install-strip:
-	$(MAKE) INSTALL_PROGRAM="$(INSTALL_PROGRAM) -s" install
-.PHONY: install-strip
-
-install-lib:
-	$(top_srcdir)/mkinstalldirs $(DESTDIR)$(octlibdir)
-	if $(STATIC_LIBS); then \
-	  rm -f $(DESTDIR)$(octlibdir)/$(LIBPRE)octave.$(LIBEXT); \
-	  $(INSTALL_DATA) $(LIBPRE)octave.$(LIBEXT) \
-	    $(DESTDIR)$(octlibdir)/$(LIBPRE)octave.$(LIBEXT); \
-	  $(RANLIB) $(DESTDIR)$(octlibdir)/$(LIBPRE)octave.$(LIBEXT); \
-	fi
-	if $(SHARED_LIBS); then \
-	  rm -f $(DESTDIR)$(octlibdir)/$(SHLLIBPRE)octave.$(SHLLIB_VER); \
-	  $(INSTALL) \
-	    $(SHLLIBPRE)octave.$(SHLLIB) $(DESTDIR)$(octlibdir)/$(SHLLIBPRE)octave.$(SHLLIB_VER); \
-	  rm -f $(DESTDIR)$(octlibdir)/$(SHLLIBPRE)octave.$(SHLLIB); \
-	  (cd $(DESTDIR)$(octlibdir) ; $(LN_S) $(SHLLIBPRE)octave.$(SHLLIB_VER) $(DESTDIR)$(octlibdir)/$(SHLLIBPRE)octave.$(SHLLIB)); \
-	  if  test x$(SHLBIN) != x ; then \
-	    rm -f $(DESTDIR)$(bindir)/$(SHLBINPRE)octave.$(SHLBIN); \
-	    $(INSTALL_PROGRAM) \
-	      $(SHLBINPRE)octave.$(SHLBIN) $(DESTDIR)$(bindir)/$(SHLBINPRE)octave.$(SHLBIN); \
-	  fi; \
-	fi
-.PHONY: install-lib
-
-install-inc:
-	$(top_srcdir)/mkinstalldirs $(DESTDIR)$(octincludedir)/octave
-	for f in $(INCLUDES_FOR_INSTALL); do \
-	  rm -f $(DESTDIR)$(octincludedir)/octave/$$f; \
-	  if [ -f $$f ]; then \
-	    $(INSTALL_DATA) $$f $(DESTDIR)$(octincludedir)/octave/$$f; \
-	  else \
-	    $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(octincludedir)/octave/$$f; \
-	  fi ; \
-	done
-.PHONY: install-inc
-
-uninstall:
-	rm -f $(DESTDIR)$(octlibdir)/$(LIBPRE)octave.$(LIBEXT)
-	rm -f $(DESTDIR)$(octlibdir)/$(SHLLIBPRE)octave.$(SHLLIB)
-	rm -f $(DESTDIR)$(octlibdir)/$(SHLLIBPRE)octave.$(SHLLIB_VER)
-	if test x$(SHLBIN) != x; then \
-	  rm -f $(DESTDIR)$(bindir)/$(SHLBINPRE)octave.$(SHLBIN); \
-	  rm -f $(DESTDIR)$(bindir)/$(SHLBINPRE)octave.$(SHLBIN_VER); \
-	fi
-	for f in $(INCLUDES_FOR_INSTALL); do rm -f $(DESTDIR)$(octincludedir)/octave/$$f; done
-.PHONY: uninstall
-
-tags: $(SOURCES)
-	ctags $(SOURCES)
-
-TAGS: $(SOURCES)
-	etags $(SOURCES)
-
-clean:
-	rm -f $(LIBPRE)octave.$(LIBEXT)
-	rm -f $(SHLPRE)octave.$(SHLEXT_VER) $(SHLPRE)octave.$(SHLEXT)
-	rm -f $(SHLBINPRE)octave.$(SHLBIN_VER) $(SHLBINPRE)octave.$(SHLBIN)
-	rm -f $(LIBOCTAVE_OBJECTS) $(MAKEDEPS) $(LIBOCTAVE_PICOBJ) stmp-pic
-	-rmdir pic
-.PHONY: clean
-
-mostlyclean: clean
-.PHONY: mostlyclean
-
-distclean maintainer-clean: clean
-	rm -f tags TAGS
-	rm -f Makefile so_locations $(PREREQ)
-.PHONY: distclean maintainer-clean
-
-dist: $(PREREQ)
-	ln $(DISTFILES) ../`cat ../.fname`/liboctave
-.PHONY: dist
-
-$(OPT_INC) : %.h : %.in $(top_srcdir)/mk-opts.pl
-	@echo making $@ from $<
-	@perl $(top_srcdir)/mk-opts.pl --opt-class-header $< > $@-t
-	@mv $@-t $@
-
-$(VX_OP_INC) $(VX_OP_SRC) : $(srcdir)/mk-ops.awk vx-ops
-	$(AWK) -f $(srcdir)/mk-ops.awk prefix=vx $(srcdir)/vx-ops
-
-$(MX_OP_INC) $(MX_OP_SRC) : $(srcdir)/mk-ops.awk mx-ops
-	$(AWK) -f $(srcdir)/mk-ops.awk prefix=mx $(srcdir)/mx-ops
-
-$(SPARSE_MX_OP_INC) $(SPARSE_MX_OP_SRC) : $(srcdir)/sparse-mk-ops.awk sparse-mx-ops
-	$(AWK) -f $(srcdir)/sparse-mk-ops.awk prefix=smx $(srcdir)/sparse-mx-ops
-
-mx-ops.h : $(srcdir)/mk-ops.awk mx-ops
-	$(AWK) -f $(srcdir)/mk-ops.awk prefix=mx make_inclusive_header=mx-ops.h $(srcdir)/mx-ops > $@-t
-	$(simple-move-if-change-rule)
-
-CSparse.d CSparse.df pic/CSparse.o CSparse.o: CPPFLAGS += $(SPARSE_CPPFLAGS)
-
-dSparse.d dSparse.df pic/dSparse.o dSparse.o: CPPFLAGS += $(SPARSE_CPPFLAGS)
-
-SparseCmplxLU.d SparseCmplxLU.df pic/SparseCmplxLU.o SparseCmplxLU.o: \
-  CPPFLAGS += $(SPARSE_CPPFLAGS)
-
-SparsedbleLU.d SparsedbleLU.df pic/SparsedbleLU.o SparsedbleLU.o: \
-  CPPFLAGS += $(SPARSE_CPPFLAGS)
-
-SparseCmplxQR.d SparseCmplxQR.df pic/SparseCmplxQR.o SparseCmplxQR.o: \
-  CPPFLAGS += $(SPARSE_CPPFLAGS)
-
-SparsedbleQR.d SparsedbleQR.df pic/SparsedbleQR.o SparsedbleQR.o: \
-  CPPFLAGS += $(SPARSE_CPPFLAGS)
-
-SparseCmplxCHOL.d SparseCmplxCHOL.df pic/SparseCmplxCHOL.o SparseCmplxCHOL.o: \
-  CPPFLAGS += $(SPARSE_CPPFLAGS)
-
-SparsedbleCHOL.d SparsedbleCHOL.df pic/SparsedbleCHOL.o SparsedbleCHOL.o: \
-  CPPFLAGS += $(SPARSE_CPPFLAGS)
-
-CMatrix.d CMatrix.df pic/CMatrix.o CMatrix.o: CPPFLAGS += $(FFTW_CPPFLAGS)
-
-CNDArray.d CNDArray.df pic/CNDArray.o CNDArray.o: CPPFLAGS += $(FFTW_CPPFLAGS)
-
-dMatrix.d dMatrix.df pic/dMatrix.o dMatrix.o: CPPFLAGS += $(FFTW_CPPFLAGS)
-
-dNDArray.d dNDArray.df pic/dNDArray.o dNDArray.o: CPPFLAGS += $(FFTW_CPPFLAGS)
-
-fCMatrix.d fCMatrix.df pic/fCMatrix.o fCMatrix.o: CPPFLAGS += $(FFTW_CPPFLAGS)
-
-fCNDArray.d fCNDArray.df pic/fCNDArray.o fCNDArray.o: CPPFLAGS += $(FFTW_CPPFLAGS)
-
-fMatrix.d fMatrix.df pic/fMatrix.o fMatrix.o: CPPFLAGS += $(FFTW_CPPFLAGS)
-
-fNDArray.d fNDArray.df pic/fNDArray.o fNDArray.o: CPPFLAGS += $(FFTW_CPPFLAGS)
-
-oct-fftw.d oct-fftw.df pic/oct-fftw.o oct-fftw.o: CPPFLAGS += $(FFTW_CPPFLAGS)
-
-ifdef omit_deps
-.PHONY: $(MAKEDEPS)
-endif
-
--include $(MAKEDEPS)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/liboctave/config-ops.sh	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,35 @@
+#! /bin/sh
+
+set -e
+
+: ${AWK=awk}
+
+VX_INC=$($AWK -f mk-ops.awk prefix=vx list_h_files=1 vx-ops)
+
+MX_INC=$($AWK -f mk-ops.awk prefix=mx list_h_files=1 mx-ops)
+
+SMX_INC=$($AWK -f sparse-mk-ops.awk prefix=smx list_h_files=1 sparse-mx-ops)
+
+VX_SRC=$($AWK -f mk-ops.awk prefix=vx list_cc_files=1 vx-ops)
+
+MX_SRC=$($AWK -f mk-ops.awk prefix=mx list_cc_files=1 mx-ops)
+
+SMX_SRC=$($AWK -f sparse-mk-ops.awk prefix=smx list_cc_files=1 sparse-mx-ops)
+
+echo "VX_OP_INC = $(echo $VX_INC)" > vx-op-inc.mk-t
+../move-if-change vx-op-inc.mk-t vx-op-inc.mk
+
+echo "MX_OP_INC = $(echo $MX_INC)" > mx-op-inc.mk-t
+../move-if-change mx-op-inc.mk-t mx-op-inc.mk
+
+echo "SMX_OP_INC = $(echo $SMX_INC)" > smx-op-inc.mk-t
+../move-if-change smx-op-inc.mk-t smx-op-inc.mk
+
+echo "VX_OP_SRC = $(echo $VX_SRC)" > vx-op-src.mk-t
+../move-if-change vx-op-src.mk-t vx-op-src.mk
+
+echo "MX_OP_SRC = $(echo $MX_SRC)" > mx-op-src.mk-t
+../move-if-change mx-op-src.mk-t mx-op-src.mk
+
+echo "SMX_OP_SRC = $(echo $SMX_SRC)" > smx-op-src.mk-t
+../move-if-change smx-op-src.mk-t smx-op-src.mk
--- a/liboctave/mx-ops	Tue Nov 10 13:25:57 2009 -0500
+++ b/liboctave/mx-ops	Tue Nov 10 15:02:25 2009 -0500
@@ -16,6 +16,9 @@
 # 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
+# rebuild the source file lists for Make.
+
 # types
 #
 # key typename object-type header fwd-decl-ok scalar-zero core-type
--- a/liboctave/sparse-mx-ops	Tue Nov 10 13:25:57 2009 -0500
+++ b/liboctave/sparse-mx-ops	Tue Nov 10 15:02:25 2009 -0500
@@ -16,6 +16,9 @@
 # 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
+# rebuild the source file lists for Make.
+
 # types
 #
 # key typename object-type header fwd-decl-ok scalar-zero
--- a/liboctave/vx-ops	Tue Nov 10 13:25:57 2009 -0500
+++ b/liboctave/vx-ops	Tue Nov 10 15:02:25 2009 -0500
@@ -16,6 +16,9 @@
 # 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
+# rebuild the source file lists for Make.
+
 # types
 ccv ComplexColumnVector V CColVector.h YES 0.0
 crv ComplexRowVector V CRowVector.h YES 0.0
--- a/m4/Makefile.in	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,62 +0,0 @@
-# Makefile for octave's m4 directory
-#
-# Copyright (C) 2009 John W. Eaton
-#
-# This file is part of Octave.
-# 
-# Octave is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 3 of the License, or (at
-# your option) any later version.
-# 
-# Octave is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with Octave; see the file COPYING.  If not, see
-# <http://www.gnu.org/licenses/>.
-
-TOPDIR = ..
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-
-include $(TOPDIR)/Makeconf
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_DATA = @INSTALL_DATA@
-
-M4_FILES = acx_blas.m4 acx_blas_f77_func.m4 acx_lapack.m4 acx_pthread.m4
-
-DISTFILES = $(addprefix $(srcdir)/, Makefile.in $(M4_FILES))
-
-all:
-.PHONY: all
-
-install install-strip:
-.PHONY: install install-strip
-
-uninstall:
-.PHONY: uninstall
-
-tags TAGS:
-.PHONY: tags TAGS
-
-clean mostlyclean:
-.PHONY: clean mostlyclean
-
-distclean:
-	rm -f Makefile
-.PHONY: distclean
-
-maintainer-clean: distclean
-.PHONY: maintainer-clean
-
-conf-dist dist:
-	ln $(DISTFILES) ../`cat ../.fname`/m4
-.PHONY: conf-dist dist
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/m4/module.mk	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,11 @@
+EXTRA_DIST += \
+  m4/module.mk \
+  m4/acx_blas.m4 \
+  m4/acx_blas_f77_func.m4 \
+  m4/acx_lapack.m4	\
+  m4/acx_pthread.m4 \
+  m4/libtool.m4 \
+  m4/ltoptions.m4 \
+  m4/ltsugar.m4 \
+  m4/ltversion.m4 \
+  m4/lt~obsolete.m4
--- a/mkoctfile.cc.in	Tue Nov 10 13:25:57 2009 -0500
+++ b/mkoctfile.cc.in	Tue Nov 10 15:02:25 2009 -0500
@@ -184,11 +184,13 @@
   vars["OCTLIBDIR"] = get_variable ("OCTLIBDIR", DEFAULT_OCTLIBDIR);
 
 #if defined (__WIN32__) && ! defined (_POSIX_VERSION)
-  std::string DEFAULT_INCFLAGS = "-I" + quote_path (vars["OCTINCLUDEDIR"])
-    + " -I" + quote_path (vars["OCTINCLUDEDIR"] + "\\octave");
+  std::string DEFAULT_INCFLAGS
+    = "-I" + quote_path (vars["OCTINCLUDEDIR"] + "\\..")
+    + " -I" + quote_path (vars["OCTINCLUDEDIR"]);
 #else
-  std::string DEFAULT_INCFLAGS = "-I" + quote_path (vars["OCTINCLUDEDIR"])
- + " -I" + quote_path (vars["OCTINCLUDEDIR"] + "/octave");
+  std::string DEFAULT_INCFLAGS
+    = "-I" + quote_path (vars["OCTINCLUDEDIR"] + "/..")
+    + " -I" + quote_path (vars["OCTINCLUDEDIR"]);
 #endif
   if (vars["INCLUDEDIR"] != "/usr/include")
     DEFAULT_INCFLAGS += " -I" + quote_path (vars["INCLUDEDIR"]);
--- a/mkoctfile.in	Tue Nov 10 13:25:57 2009 -0500
+++ b/mkoctfile.in	Tue Nov 10 15:02:25 2009 -0500
@@ -51,7 +51,7 @@
 : ${OCTINCLUDEDIR=$DEFAULT_OCTINCLUDEDIR}
 : ${OCTLIBDIR=$DEFAULT_OCTLIBDIR}
 
-DEFAULT_INCFLAGS="-I$OCTINCLUDEDIR -I$OCTINCLUDEDIR/octave"
+DEFAULT_INCFLAGS="-I$OCTINCLUDEDIR/.. -I$OCTINCLUDEDIR"
 if [ "$INCLUDEDIR" != /usr/include ]; then
   DEFAULT_INCFLAGS="$DEFAULT_INCFLAGS -I$INCLUDEDIR"
 fi
--- a/octMakefile.in	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,309 +0,0 @@
-# Makefile for octave
-#
-# Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-#               2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 John W. Eaton
-#
-# This file is part of Octave.
-# 
-# Octave is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 3 of the License, or (at
-# your option) any later version.
-# 
-# Octave is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with Octave; see the file COPYING.  If not, see
-# <http://www.gnu.org/licenses/>.
-
-TOPDIR = .
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-abs_top_srcdir = @abs_top_srcdir@
-VPATH = @srcdir@
-
-SCRIPTS_EXE_SUFFIX = @SCRIPTS_EXE_SUFFIX@
-
-include $(TOPDIR)/Makeconf
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_DATA = @INSTALL_DATA@
-
-CONF_DISTFILES = Makefile octMakefile.in Makeconf.in \
-	configure configure.ac config.guess config.sub aclocal.m4 \
-	config.h.in install-sh autogen.sh
-
-BUILT_DISTFILES = BUGS INSTALL.OCTAVE
-
-DISTFILES = $(CONF_DISTFILES) \
-	COPYING INSTALL NEWS \
-	NEWS.[0-9] PROJECTS README README.Linux README.Windows \
-	README.Cygwin README.MSVC README.kpathsea ROADMAP SENDING-PATCHES \
-	move-if-change octave-sh octave-bug.in octave-bug.cc.in \
-	octave-config.in octave-config.cc.in missing mk-opts.pl mkinstalldirs \
-	mkoctfile.in mkoctfile.cc.in run-octave.in ChangeLog ChangeLog.[0-9]
-
-# Subdirectories in which to run `make all'.
-SUBDIRS = libcruft liboctave src scripts doc examples
-
-# Subdirectories in which to run `make all'.
-INSTALL_SUBDIRS = libcruft liboctave src scripts doc examples
-
-# Subdirectories in which to run `make conf-dist'.
-CONF_DISTSUBDIRS = src m4
-
-# Subdirectories in which to run `make dist'.
-DISTSUBDIRS = $(sort $(SUBDIRS) test emacs m4)
-
-# Subdirectories in which to run clean targets.
-CLEANSUBDIRS = $(DISTSUBDIRS)
-
-DIRS_TO_MAKE = $(bindir) $(datadir) $(libdir) $(octincludedir)/octave \
-  $(fcnfiledir) $(localfcnfiledir) $(localapifcnfiledir) \
-  $(localverfcnfiledir) $(octetcdir) $(octfiledir) $(localoctfiledir) \
-  $(localapioctfiledir) $(localveroctfiledir) $(imagedir) $(archlibdir) \
-  $(localarchlibdir) $(localapiarchlibdir) $(localverarchlibdir)
-
-SHELL_SCRIPTS = octave-bug$(SCRIPTS_EXE_SUFFIX) octave-config$(SCRIPTS_EXE_SUFFIX) \
-		mkoctfile$(SCRIPTS_EXE_SUFFIX)  run-octave
-
-CONFIG_FILES = @ac_config_headers@ @ac_config_files@
-
-all: $(SHELL_SCRIPTS) $(filter-out libcruft liboctave, $(SUBDIRS)) dist-info-files
-	@echo ""
-	@echo "Octave successfully built.  Now choose from the following:"
-	@echo ""
-	@echo "   ./run-octave    - to run in place to test before installing"
-	@echo "   make check      - to run the tests"
-	@echo "   make install    - to install (PREFIX=$(prefix))"
-	@echo ""
-.PHONY: all
-
-configfiles: $(CONFIG_FILES)
-	for dir in $(CONFIG_SUBDIRS); do \
-	  $(MAKE) -C $$dir configfiles; \
-	done
-.PHONY: configfiles
-
-$(CONFIG_FILES): %: %.in config.status
-	./config.status $@
-
-config.status: configure
-	./config.status --recheck
-
-M4_FILES = $(wildcard m4/*.m4)
-
-configure: configure.ac $(M4_FILES)
-	(cd $(top_srcdir); autoconf --force)
-	(cd $(top_srcdir); autoheader --force)
-
-src: liboctave
-
-liboctave: libcruft
-
-$(SUBDIRS):
-	$(MAKE) -C $@ all
-.PHONY: $(SUBDIRS)
-
-octave-bug: octave-bug.in Makeconf octMakefile $(top_srcdir)/src/version.h
-	@$(do-subst-config-vals)
-	chmod a+rx $@
-
-octave-bug.cc: octave-bug.cc.in Makeconf octMakefile
-	@$(do-subst-config-vals)
-
-ifneq ($(EXEEXT),)
-octave-bug$(EXEEXT): octave-bug.o
-	$(LD_CXX) $(CPPFLAGS) $(ALL_CXXFLAGS) $(RDYNAMIC_FLAG) \
-	    $(ALL_LDFLAGS) -o $@ octave-bug.o
-endif
-
-octave-config: octave-config.in Makeconf octMakefile $(top_srcdir)/src/version.h
-	@$(do-subst-default-vals)
-	chmod a+rx $@
-
-octave-config.cc: octave-config.cc.in Makeconf octMakefile
-	@$(do-subst-default-vals)
-
-ifneq ($(EXEEXT),)
-octave-config$(EXEEXT): octave-config.o
-	$(LD_CXX) $(CPPFLAGS) $(ALL_CXXFLAGS) $(RDYNAMIC_FLAG) \
-	    $(ALL_LDFLAGS) -o $@ octave-config.o
-endif
-
-mkoctfile: mkoctfile.in Makeconf octMakefile $(top_srcdir)/src/version.h
-	@$(do-subst-config-vals)
-	chmod a+rx $@
-
-mkoctfile.cc: mkoctfile.cc.in Makeconf octMakefile
-	@$(do-subst-config-vals)
-
-ifneq ($(EXEEXT),)
-mkoctfile$(EXEEXT): mkoctfile.o
-	$(LD_CXX) $(CPPFLAGS) $(ALL_CXXFLAGS) $(RDYNAMIC_FLAG) \
-	    $(ALL_LDFLAGS) -o $@ mkoctfile.o
-endif
-
-run-octave: run-octave.in Makeconf octMakefile
-	@$(do-subst-script-vals)
-	chmod a+rx "$@"
-
-check:
-	$(MAKE) -C test $@
-.PHONY: check
-
-octave.info:
-	$(MAKE) -C doc/interpreter octave.info
-.PHONY: octave.info
-
-BUGS INSTALL.OCTAVE:
-	$(MAKE) -C doc ../$@
-.PHONY: BUGS INSTALL.OCTAVE
-
-install install-strip ::
-	$(top_srcdir)/mkinstalldirs $(addprefix $(DESTDIR), $(DIRS_TO_MAKE))
-	rm -f $(DESTDIR)$(bindir)/octave-bug$(SCRIPTS_EXE_SUFFIX)
-	$(INSTALL_SCRIPT) octave-bug$(SCRIPTS_EXE_SUFFIX) \
-	    $(DESTDIR)$(bindir)/octave-bug-$(version)$(SCRIPTS_EXE_SUFFIX)
-	(cd $(DESTDIR)$(bindir); $(LN_S) octave-bug-$(version)$(SCRIPTS_EXE_SUFFIX) \
-	    $(DESTDIR)$(bindir)/octave-bug$(SCRIPTS_EXE_SUFFIX))
-	rm -f $(DESTDIR)$(bindir)/octave-config$(SCRIPTS_EXE_SUFFIX)
-	$(INSTALL_SCRIPT) \
-	  octave-config$(SCRIPTS_EXE_SUFFIX) $(DESTDIR)$(bindir)/octave-config-$(version)$(SCRIPTS_EXE_SUFFIX)
-	(cd $(DESTDIR)$(bindir); $(LN_S) octave-config-$(version)$(SCRIPTS_EXE_SUFFIX) \
-	    $(DESTDIR)$(bindir)/octave-config$(SCRIPTS_EXE_SUFFIX))
-	rm -f $(DESTDIR)$(bindir)/mkoctfile$(SCRIPTS_EXE_SUFFIX)
-	$(INSTALL_SCRIPT) mkoctfile$(SCRIPTS_EXE_SUFFIX) \
-	    $(DESTDIR)$(bindir)/mkoctfile-$(version)$(SCRIPTS_EXE_SUFFIX)
-	(cd $(DESTDIR)$(bindir); $(LN_S) mkoctfile-$(version)$(SCRIPTS_EXE_SUFFIX) \
-	    $(DESTDIR)$(bindir)/mkoctfile$(SCRIPTS_EXE_SUFFIX))
-	$(INSTALL_DATA) config.h $(DESTDIR)$(octincludedir)/octave/config.h
-	$(INSTALL_DATA) $(srcdir)/NEWS $(DESTDIR)$(octetcdir)/NEWS
-
-uninstall::
-	rm -f $(DESTDIR)$(bindir)/octave-bug$(SCRIPTS_EXE_SUFFIX)
-	rm -f $(DESTDIR)$(bindir)/octave-bug-$(version)$(SCRIPTS_EXE_SUFFIX)
-	rm -f $(DESTDIR)$(bindir)/octave-config$(SCRIPTS_EXE_SUFFIX)
-	rm -f $(DESTDIR)$(bindir)/octave-config-$(version)$(SCRIPTS_EXE_SUFFIX)
-	rm -f $(DESTDIR)$(bindir)/mkoctfile$(SCRIPTS_EXE_SUFFIX)
-	rm -f $(DESTDIR)$(bindir)/mkoctfile-$(version)$(SCRIPTS_EXE_SUFFIX)
-	rm -f $(DESTDIR)$(octincludedir)/octave/config.h
-	rm -f $(DESTDIR)$(octetcdir)/NEWS
-
-maintainer-clean::
-	@echo ""
-	@echo "************************************************************"
-	@echo "*                                                          *"
-	@echo "* This command is intended for maintainers to use; it      *"
-	@echo "* deletes files that may require special tools to rebuild. *"
-	@echo "*                                                          *"
-	@echo "************************************************************"
-	@echo ""
-
-install install-strip uninstall tags TAGS::
-	$(foreach d, $(INSTALL_SUBDIRS), $(do-subdir-for-command))
-.PHONY: install install-strip uninstall tags
-
-clean mostlyclean distclean maintainer-clean::
-	$(foreach d, $(CLEANSUBDIRS), $(do-subdir-for-command))
-.PHONY: clean mostlyclean distclean maintainer-clean
-
-maintainer-clean distclean::
-	rm -f octMakefile Makeconf
-	rm -f config.cache config.h config.log config.status
-	rm -rf autom4te.cache
-	rm -f $(SHELL_SCRIPTS)
-	rm -f mkoctfile.cc octave-config.cc octave-bug.cc
-	rm -f unistd.h
-
-maintainer-clean::
-	rm -f configure config.h.in BUGS INSTALL.OCTAVE
-
-maintainer-clean distclean clean::
-	rm -f mkoctfile$(EXEEXT) octave-config$(EXEEXT) octave-bug$(EXEEXT)
-	rm -f mkoctfile.o octave-config.o octave-bug.o
-
-# Rules for making a source distribution.
-
-dist-info-files: INSTALL.OCTAVE BUGS
-.PHONY: dist-info-files
-
-# The dist target depends on all because we use Octave to build some
-# figures for the manual.  It's best to create those figures with the
-# version of Octave that we are distributing (it may even be required).
-
-dist: all
-	echo octave-$(version) > .fname
-	rm -rf `cat .fname`
-	mkdir `cat .fname`
-	ln $(addprefix $(srcdir)/, $(DISTFILES)) `cat .fname`
-	ln $(BUILT_DISTFILES) `cat .fname`
-	for dir in $(DISTSUBDIRS); do \
-	  mkdir `cat .fname`/$$dir; \
-	  $(MAKE) -C $$dir dist; \
-	done
-	tar chf `cat .fname`.tar `cat .fname`
-	rm -rf `cat .fname`
-	tar xf `cat .fname`.tar
-	find `cat .fname` \( \( -name RCS -a -type d \) \
-	  -o \( -name CVS -a -type d \) -o \( -name OLD -a -type d \) \
-	  -o \( -name autom4te.cache -a -type d \) \
-	  -o -name "=*" -o -name '*~' -o -name '#*#' -o -name config.log \
-	  -o -name config.status -o -name config.cache -o -name stamp-h \
-	  -o -name klibtool.config -o -name stamp-auto \
-	  -o -name c-auto.h \) -print | xargs rm -rf
-	rm -f `cat .fname`/test/octave.test/*.m
-	chmod -R a+rwX `cat .fname`
-	tar cf `cat .fname`.tar `cat .fname`
-	rm -rf `cat .fname`
-	gzip -9 --stdout `cat .fname`.tar > `cat .fname`.tar.gz
-	bzip2 -9 --stdout `cat .fname`.tar > `cat .fname`.tar.bz2
-	date -u > md5sum
-	md5sum `cat .fname`.tar.gz `cat .fname`.tar.bz2 >> md5sum
-	touch `cat .fname`.tar.gz `cat .fname`.tar.bz2 md5sum
-	rm -f .fname
-	@echo "*******************"
-	@echo "Tag the CVS archive"
-	@echo "*******************"
-.PHONY: dist
-
-# Rules for making a snapshot.
-
-snapshot-version:
-	@echo "creating src/version.h"
-	@gawk '/#define OCTAVE_VERSION[ \t]*/ { \
-	  datestring = strftime("%y%m%d", systime()); \
-	  printf("#define OCTAVE_VERSION \"ss-%s\"\n", datestring); \
-	  next; \
-	} { print $$0 }' src/version.h > src/version.h.new
-	@$(top_srcdir)/move-if-change src/version.h.new src/version.h
-.PHONY: snapshot-version
-
-snapshot: snapshot-version
-	$(MAKE) dist
-.PHONY: snapshot
-
-# Rules for making a dist of just the stuff needed to run configure.
-
-conf-dist:
-	echo config-dist-$(version) > .fname
-	rm -rf `cat .fname`
-	mkdir `cat .fname`
-	ln $(CONF_DISTFILES) `cat .fname`
-	for dir in $(CONF_DISTSUBDIRS); do \
-	  mkdir `cat .fname`/$$dir; \
-	  $(MAKE) -C $$dir conf-dist; \
-	done
-	tar chf `cat .fname`.tar `cat .fname`
-	rm -rf `cat .fname`
-	gzip --best `cat .fname`.tar
-	rm -f .fname
-.PHONY: conf-dist
-
-.NOTPARALLEL:
--- a/run-octave.in	Tue Nov 10 13:25:57 2009 -0500
+++ b/run-octave.in	Tue Nov 10 15:02:25 2009 -0500
@@ -30,11 +30,6 @@
 top_srcdir='%abs_top_srcdir%'
 builddir='%builddir%'
 
-ldpreloadsep="%ldpreloadsep%"
-liboctinterp="$builddir/src/%liboctinterp%"
-liboctave="$builddir/liboctave/%liboctave%"
-libcruft="$builddir/libcruft/%libcruft%"
-
 d1="$top_srcdir/test"
 d2="$top_srcdir/scripts"
 d3="$builddir/scripts"
@@ -53,7 +48,7 @@
 LOADPATH="$d1_path:$d2_path:$d3_path:$d4_path"
 IMAGEPATH="$top_srcdir/scripts/image"
 DOCFILE="$builddir/doc/interpreter/doc-cache"
-INFOFILE="$builddir/doc/interpreter/octave.info"
+INFOFILE="$top_srcdir/doc/interpreter/octave.info"
 
 if [ $# -gt 0 ]; then
   if [ "x$1" = "x-g" ]; then
@@ -69,7 +64,7 @@
 fi
 
 OCTAVE_SITE_INITFILE="$top_srcdir/scripts/startup/main-rcfile" \
-LD_PRELOAD="$libcruft$ldpreloadsep$liboctave$ldpreloadsep$liboctinterp" \
-%library_path_var%="$builddir/src:$builddir/liboctave:$builddir/libcruft:$%library_path_var%" \
-  exec $driver "$builddir/src/octave" --no-init-path --path="$LOADPATH" --image-path="$IMAGEPATH" --doc-cache-file="$DOCFILE" --info-file="$INFOFILE" "$@"
-
+  exec $builddir/libtool --mode=execute $driver \
+    "$builddir/src/octave" --no-init-path --path="$LOADPATH" \
+    --image-path="$IMAGEPATH" --doc-cache-file="$DOCFILE" \
+    --info-file="$INFOFILE" "$@"
--- a/scripts/ChangeLog	Tue Nov 10 13:25:57 2009 -0500
+++ b/scripts/ChangeLog	Tue Nov 10 15:02:25 2009 -0500
@@ -1,3 +1,35 @@
+2009-11-10  John W. Eaton  <jwe@octave.org>
+
+	* Makefile.am, audio/module.mk, deprecated/module.mk,
+	elfun/module.mk, general/module.mk, geometry/module.mk,
+	help/module.mk, image/module.mk, io/module.mk,
+	linear-algebra/module.mk, miscellaneous/module.mk,
+	optimization/module.mk, path/module.mk, pkg/module.mk,
+	plot/module.mk, polynomial/module.mk, set/module.mk,
+	signal/module.mk, sparse/Makefile.in, specfun/Makefile.in,
+	special-matrix/Makefile.in, startup/Makefile.in,
+	statistics/Makefile.in, statistics/base/module.mk,
+	statistics/distributions/module.mk, statistics/models/module.mk,
+	statistics/tests/module.mk, strings/module.mk, testfun/module.mk,
+	time/module.mk: New files.
+	* Makefile.in, move-if-change, configure.ac, audio/Makefile.in,
+	deprecated/Makefile.in, elfun/Makefile.in, general/Makefile.in,
+	geometry/Makefile.in, help/Makefile.in, image/Makefile.in,
+	io/Makefile.in, linear-algebra/Makefile.in,
+	miscellaneous/Makefile.in, optimization/Makefile.in,
+	path/Makefile.in, pkg/Makefile.in, plot/Makefile.in,
+	polynomial/Makefile.in, set/Makefile.in, signal/Makefile.in,
+	skip-autoheader, sparse/module.mk, specfun/module.mk,
+	special-matrix/module.mk, startup/module.mk,
+	statistics/base/Makefile.in, statistics/distributions/Makefile.in,
+	statistics/models/Makefile.in, statistics/tests/Makefile.in,
+	strings/Makefile.in, testfun/Makefile.in, time/Makefile.in:
+	Delete.
+	* mk-pkg-add: Rename from mkpkgadd.
+	* mkdoc, mk-pkg-addd: Operate on explicit lists of files instead
+	of directory names.
+	* mkdoc: Skip files not ending in .m.
+
 2009-11-10  Ben Abbott <bpabbott@mac.com>
 
 	* plot/__go_draw_axes__.m: No 'with linestyle' when linestyle == 'none'.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/Makefile.am	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,439 @@
+# Makefile for octave's scripts directory
+#
+# Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002,
+#               2003, 2004, 2005, 2006, 2007, 2008, 2009 John W. Eaton
+#
+# This file is part of Octave.
+# 
+# Octave is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation; either version 3 of the License, or (at
+# your option) any later version.
+# 
+# Octave is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with Octave; see the file COPYING.  If not, see
+# <http://www.gnu.org/licenses/>.
+
+TOPDIR = ..
+
+include ../common.mk 
+
+AUTOMAKE_OPTIONS = subdir-objects
+
+FCN_FILE_DIRS =
+
+EXTRA_DIST = \
+  gethelp.cc \
+  mkdoc \
+  mk-pkg-add
+
+FCN_FILES =
+
+GEN_FCN_FILES =
+
+PKG_ADD_FILES =
+
+IMAGES =
+
+include audio/module.mk
+include deprecated/module.mk
+include elfun/module.mk
+include general/module.mk
+include geometry/module.mk
+include help/module.mk
+include image/module.mk
+include io/module.mk
+include linear-algebra/module.mk
+include miscellaneous/module.mk
+include optimization/module.mk
+include path/module.mk
+include pkg/module.mk
+include plot/module.mk
+include polynomial/module.mk
+include set/module.mk
+include signal/module.mk
+include sparse/module.mk
+include specfun/module.mk
+include special-matrix/module.mk
+include startup/module.mk
+include statistics/base/module.mk
+include statistics/distributions/module.mk
+include statistics/models/module.mk
+include statistics/tests/module.mk
+include strings/module.mk
+include testfun/module.mk
+include time/module.mk
+
+nobase_fcnfile_DATA = $(FCN_FILES) $(GEN_FCN_FILES)
+
+octave_dirstamp = $(am__leading_dot)dirstamp
+
+audio/PKG_ADD: $(audio_FCN_FILES) $(audio_GEN_FCN_FILES) audio/$(octave_dirstamp) mk-pkg-add
+	@echo "generating $@"
+	@$(srcdir)/mk-pkg-add $(srcdir) $(audio_FCN_FILES) -- $(audio_GEN_FCN_FILES) > $@-t
+	@mv $@-t $@
+
+deprecated/PKG_ADD: $(deprecated_FCN_FILES) $(deprecated_GEN_FCN_FILES) deprecated/$(octave_dirstamp) mk-pkg-add
+	@echo "generating $@"
+	@$(srcdir)/mk-pkg-add $(srcdir) $(deprecated_FCN_FILES) -- $(deprecated_GEN_FCN_FILES) > $@-t
+	@mv $@-t $@
+
+elfun/PKG_ADD: $(elfun_FCN_FILES) $(elfun_GEN_FCN_FILES) elfun/$(octave_dirstamp) mk-pkg-add
+	@echo "generating $@"
+	@$(srcdir)/mk-pkg-add $(srcdir) $(elfun_FCN_FILES) -- $(elfun_GEN_FCN_FILES) > $@-t
+	@mv $@-t $@
+
+general/PKG_ADD: $(general_FCN_FILES) $(general_GEN_FCN_FILES) general/$(octave_dirstamp) mk-pkg-add
+	@echo "generating $@"
+	@$(srcdir)/mk-pkg-add $(srcdir) $(general_FCN_FILES) -- $(general_GEN_FCN_FILES) > $@-t
+	@mv $@-t $@
+
+geometry/PKG_ADD: $(geometry_FCN_FILES) $(geometry_GEN_FCN_FILES) geometry/$(octave_dirstamp) mk-pkg-add
+	@echo "generating $@"
+	@$(srcdir)/mk-pkg-add $(srcdir) $(geometry_FCN_FILES) -- $(geometry_GEN_FCN_FILES) > $@-t
+	@mv $@-t $@
+
+help/PKG_ADD: $(help_FCN_FILES) $(help_GEN_FCN_FILES) help/$(octave_dirstamp) mk-pkg-add
+	@echo "generating $@"
+	@$(srcdir)/mk-pkg-add $(srcdir) $(help_FCN_FILES) -- $(help_GEN_FCN_FILES) > $@-t
+	@mv $@-t $@
+
+image/PKG_ADD: $(image_FCN_FILES) $(image_GEN_FCN_FILES) image/$(octave_dirstamp) mk-pkg-add
+	@echo "generating $@"
+	@$(srcdir)/mk-pkg-add $(srcdir) $(image_FCN_FILES) -- $(image_GEN_FCN_FILES) > $@-t
+	@mv $@-t $@
+
+io/PKG_ADD: $(io_FCN_FILES) $(io_GEN_FCN_FILES) io/$(octave_dirstamp) mk-pkg-add
+	@echo "generating $@"
+	@$(srcdir)/mk-pkg-add $(srcdir) $(io_FCN_FILES) -- $(io_GEN_FCN_FILES) > $@-t
+	@mv $@-t $@
+
+linear-algebra/PKG_ADD: $(linear_algebra_FCN_FILES) $(linear_algebra_GEN_FCN_FILES) linear-algebra/$(octave_dirstamp) mk-pkg-add
+	@echo "generating $@"
+	@$(srcdir)/mk-pkg-add $(srcdir) $(linear_algebra_FCN_FILES) -- $(linear_algebra_GEN_FCN_FILES) > $@-t
+	@mv $@-t $@
+
+miscellaneous/PKG_ADD: $(miscellaneous_FCN_FILES) $(miscellaneous_GEN_FCN_FILES) miscellaneous/$(octave_dirstamp) mk-pkg-add
+	@echo "generating $@"
+	@$(srcdir)/mk-pkg-add $(srcdir) $(miscellaneous_FCN_FILES) -- $(miscellaneous_GEN_FCN_FILES) > $@-t
+	@mv $@-t $@
+
+optimization/PKG_ADD: $(optimization_FCN_FILES) $(optimization_GEN_FCN_FILES) optimization/$(octave_dirstamp) mk-pkg-add
+	@echo "generating $@"
+	@$(srcdir)/mk-pkg-add "$(srcdir)" $(optimization_FCN_FILES) -- $(optimization_GEN_FCN_FILES) > $@-t
+	@mv $@-t $@
+
+path/PKG_ADD: $(path_FCN_FILES) $(path_GEN_FCN_FILES) path/$(octave_dirstamp) mk-pkg-add
+	@echo "generating $@"
+	@$(srcdir)/mk-pkg-add $(srcdir) $(path_FCN_FILES) -- $(path_GEN_FCN_FILES) > $@-t
+	@mv $@-t $@
+
+pkg/PKG_ADD: $(pkg_FCN_FILES) $(pkg_GEN_FCN_FILES) pkg/$(octave_dirstamp) mk-pkg-add
+	@echo "generating $@"
+	@$(srcdir)/mk-pkg-add $(srcdir) $(pkg_FCN_FILES) -- $(pkg_GEN_FCN_FILES) > $@-t
+	@mv $@-t $@
+
+plot/PKG_ADD: $(plot_FCN_FILES) $(plot_GEN_FCN_FILES) plot/$(octave_dirstamp) mk-pkg-add
+	@echo "generating $@"
+	@$(srcdir)/mk-pkg-add $(srcdir) $(plot_FCN_FILES) -- $(plot_GEN_FCN_FILES) > $@-t
+	@mv $@-t $@
+
+polynomial/PKG_ADD: $(polynomial_FCN_FILES) $(polynomial_GEN_FCN_FILES) polynomial/$(octave_dirstamp) mk-pkg-add
+	@echo "generating $@"
+	@$(srcdir)/mk-pkg-add $(srcdir) $(polynomial_FCN_FILES) -- $(polynomial_GEN_FCN_FILES) > $@-t
+	@mv $@-t $@
+
+set/PKG_ADD: $(set_FCN_FILES) $(set_GEN_FCN_FILES) set/$(octave_dirstamp) mk-pkg-add
+	@echo "generating $@"
+	@$(srcdir)/mk-pkg-add $(srcdir) $(set_FCN_FILES) -- $(set_GEN_FCN_FILES) > $@-t
+	@mv $@-t $@
+
+signal/PKG_ADD: $(signal_FCN_FILES) $(signal_GEN_FCN_FILES) signal/$(octave_dirstamp) mk-pkg-add
+	@echo "generating $@"
+	@$(srcdir)/mk-pkg-add $(srcdir) $(signal_FCN_FILES) -- $(signal_GEN_FCN_FILES) > $@-t
+	@mv $@-t $@
+
+sparse/PKG_ADD: $(sparse_FCN_FILES) $(sparse_GEN_FCN_FILES) sparse/$(octave_dirstamp) mk-pkg-add
+	@echo "generating $@"
+	@$(srcdir)/mk-pkg-add $(srcdir) $(sparse_FCN_FILES) -- $(sparse_GEN_FCN_FILES) > $@-t
+	@mv $@-t $@
+
+specfun/PKG_ADD: $(specfun_FCN_FILES) $(specfun_GEN_FCN_FILES) specfun/$(octave_dirstamp) mk-pkg-add
+	@echo "generating $@"
+	@$(srcdir)/mk-pkg-add $(srcdir) $(specfun_FCN_FILES) -- $(specfun_GEN_FCN_FILES) > $@-t
+	@mv $@-t $@
+
+special-matrix/PKG_ADD: $(special_matrix_FCN_FILES) $(special_matrix_GEN_FCN_FILES) special-matrix/$(octave_dirstamp) mk-pkg-add
+	@echo "generating $@"
+	@$(srcdir)/mk-pkg-add $(srcdir) $(special_matrix_FCN_FILES) -- $(special_matrix_GEN_FCN_FILES) > $@-t
+	@mv $@-t $@
+
+startup/PKG_ADD: $(startup_FCN_FILES) $(startup_GEN_FCN_FILES) startup/$(octave_dirstamp) mk-pkg-add
+	@echo "generating $@"
+	@$(srcdir)/mk-pkg-add $(srcdir) $(startup_FCN_FILES) -- $(startup_GEN_FCN_FILES) > $@-t
+	@mv $@-t $@
+
+statistics/base/PKG_ADD: $(statistics_base_FCN_FILES) $(statistics_base_GEN_FCN_FILES) statistics/base/$(octave_dirstamp) mk-pkg-add
+	@echo "generating $@"
+	@$(srcdir)/mk-pkg-add $(srcdir) $(statistics_base_FCN_FILES) -- $(statistics_base_GEN_FCN_FILES) > $@-t
+	@mv $@-t $@
+
+statistics/distributions/PKG_ADD: $(statistics_distributions_FCN_FILES) $(statistics_distributions_GEN_FCN_FILES) statistics/distributions/$(octave_dirstamp) mk-pkg-add
+	@echo "generating $@"
+	@$(srcdir)/mk-pkg-add $(srcdir) $(statistics_distributions_FCN_FILES) -- $(statistics_distributions_GEN_FCN_FILES) > $@-t
+	@mv $@-t $@
+
+statistics/models/PKG_ADD: $(statistics_models_FCN_FILES) $(statistics_models_GEN_FCN_FILES) statistics/models/$(octave_dirstamp) mk-pkg-add
+	@echo "generating $@"
+	@$(srcdir)/mk-pkg-add $(srcdir) $(statistics_models_FCN_FILES) -- $(statistics_models_GEN_FCN_FILES) > $@-t
+	@mv $@-t $@
+
+statistics/tests/PKG_ADD: $(statistics_tests_FCN_FILES) $(statistics_tests_GEN_FCN_FILES) statistics/tests/$(octave_dirstamp) mk-pkg-add
+	@echo "generating $@"
+	@$(srcdir)/mk-pkg-add $(srcdir) $(statistics_tests_FCN_FILES) -- $(statistics_tests_GEN_FCN_FILES) > $@-t
+	@mv $@-t $@
+
+strings/PKG_ADD: $(strings_FCN_FILES) $(strings_GEN_FCN_FILES) strings/$(octave_dirstamp) mk-pkg-add
+	@echo "generating $@"
+	@$(srcdir)/mk-pkg-add $(srcdir) $(strings_FCN_FILES) -- $(strings_GEN_FCN_FILES) > $@-t
+	@mv $@-t $@
+
+testfun/PKG_ADD: $(testfun_FCN_FILES) $(testfun_GEN_FCN_FILES) testfun/$(octave_dirstamp) mk-pkg-add
+	@echo "generating $@"
+	@$(srcdir)/mk-pkg-add $(srcdir) $(testfun_FCN_FILES) -- $(testfun_GEN_FCN_FILES) > $@-t
+	@mv $@-t $@
+
+time/PKG_ADD: $(time_FCN_FILES) $(time_GEN_FCN_FILES) time/$(octave_dirstamp) mk-pkg-add
+	@echo "generating $@"
+	@$(srcdir)/mk-pkg-add $(srcdir) $(time_FCN_FILES) -- $(time_GEN_FCN_FILES) > $@-t
+	@mv $@-t $@
+
+$(audio_GEN_FCN_FILES): audio/$(octave_dirstamp)
+$(deprecated_GEN_FCN_FILES): deprecated/$(octave_dirstamp)
+$(elfun_GEN_FCN_FILES): elfun/$(octave_dirstamp)
+$(general_GEN_FCN_FILES): general/$(octave_dirstamp)
+$(geometry_GEN_FCN_FILES): geometry/$(octave_dirstamp)
+$(help_GEN_FCN_FILES): help/$(octave_dirstamp)
+$(image_GEN_FCN_FILES): image/$(octave_dirstamp)
+$(io_GEN_FCN_FILES): io/$(octave_dirstamp)
+$(linear_algebra_GEN_FCN_FILES): linear-algebra/$(octave_dirstamp)
+$(miscellaneous_GEN_FCN_FILES): miscellaneous/$(octave_dirstamp)
+$(optimization_GEN_FCN_FILES): optimization/$(octave_dirstamp)
+$(path_GEN_FCN_FILES): path/$(octave_dirstamp)
+$(pkg_GEN_FCN_FILES): pkg/$(octave_dirstamp)
+$(plot_GEN_FCN_FILES): plot/$(octave_dirstamp)
+$(polynomial_GEN_FCN_FILES): polynomial/$(octave_dirstamp)
+$(set_GEN_FCN_FILES): set/$(octave_dirstamp)
+$(signal_GEN_FCN_FILES): signal/$(octave_dirstamp)
+$(sparse_GEN_FCN_FILES): sparse/$(octave_dirstamp)
+$(specfun_GEN_FCN_FILES): specfun/$(octave_dirstamp)
+$(special_matrix_GEN_FCN_FILES): special-matrix/$(octave_dirstamp)
+$(startup_GEN_FCN_FILES): startup/$(octave_dirstamp)
+$(statistics_base_GEN_FCN_FILES): statistics/base/$(octave_dirstamp)
+$(statistics_distributions_GEN_FCN_FILES): statistics/distributions/$(octave_dirstamp)
+$(statistics_models_GEN_FCN_FILES): statistics/models/$(octave_dirstamp)
+$(statistics_tests_GEN_FCN_FILES): statistics/tests/$(octave_dirstamp)
+$(strings_GEN_FCN_FILES): strings/$(octave_dirstamp)
+$(testfun_GEN_FCN_FILES): testfun/$(octave_dirstamp)
+$(time_GEN_FCN_FILES): time/$(octave_dirstamp)
+
+audio/$(octave_dirstamp):
+	@$(MKDIR_P) audio
+	@: > audio/$(octave_dirstamp)
+deprecated/$(octave_dirstamp):
+	@$(MKDIR_P) deprecated
+	@: > deprecated/$(octave_dirstamp)
+elfun/$(octave_dirstamp):
+	@$(MKDIR_P) elfun
+	@: > elfun/$(octave_dirstamp)
+general/$(octave_dirstamp):
+	@$(MKDIR_P) general
+	@: > general/$(octave_dirstamp)
+geometry/$(octave_dirstamp):
+	@$(MKDIR_P) geometry
+	@: > geometry/$(octave_dirstamp)
+help/$(octave_dirstamp):
+	@$(MKDIR_P) help
+	@: > help/$(octave_dirstamp)
+image/$(octave_dirstamp):
+	@$(MKDIR_P) image
+	@: > image/$(octave_dirstamp)
+io/$(octave_dirstamp):
+	@$(MKDIR_P) io
+	@: > io/$(octave_dirstamp)
+linear-algebra/$(octave_dirstamp):
+	@$(MKDIR_P) linear-algebra
+	@: > linear-algebra/$(octave_dirstamp)
+miscellaneous/$(octave_dirstamp):
+	@$(MKDIR_P) miscellaneous
+	@: > miscellaneous/$(octave_dirstamp)
+optimization/$(octave_dirstamp):
+	@$(MKDIR_P) optimization
+	@: > optimization/$(octave_dirstamp)
+path/$(octave_dirstamp):
+	@$(MKDIR_P) path
+	@: > path/$(octave_dirstamp)
+pkg/$(octave_dirstamp):
+	@$(MKDIR_P) pkg
+	@: > pkg/$(octave_dirstamp)
+plot/$(octave_dirstamp):
+	@$(MKDIR_P) plot
+	@: > plot/$(octave_dirstamp)
+polynomial/$(octave_dirstamp):
+	@$(MKDIR_P) polynomial
+	@: > polynomial/$(octave_dirstamp)
+set/$(octave_dirstamp):
+	@$(MKDIR_P) set
+	@: > set/$(octave_dirstamp)
+signal/$(octave_dirstamp):
+	@$(MKDIR_P) signal
+	@: > signal/$(octave_dirstamp)
+sparse/$(octave_dirstamp):
+	@$(MKDIR_P) sparse
+	@: > sparse/$(octave_dirstamp)
+specfun/$(octave_dirstamp):
+	@$(MKDIR_P) specfun
+	@: > specfun/$(octave_dirstamp)
+special-matrix/$(octave_dirstamp):
+	@$(MKDIR_P) special-matrix
+	@: > special-matrix/$(octave_dirstamp)
+startup/$(octave_dirstamp):
+	@$(MKDIR_P) startup
+	@: > startup/$(octave_dirstamp)
+statistics/base/$(octave_dirstamp):
+	@$(MKDIR_P) statistics/base
+	@: > statistics/base/$(octave_dirstamp)
+statistics/distributions/$(octave_dirstamp):
+	@$(MKDIR_P) statistics/distributions
+	@: > statistics/distributions/$(octave_dirstamp)
+statistics/models/$(octave_dirstamp):
+	@$(MKDIR_P) statistics/models
+	@: > statistics/models/$(octave_dirstamp)
+statistics/tests/$(octave_dirstamp):
+	@$(MKDIR_P) statistics/tests
+	@: > statistics/tests/$(octave_dirstamp)
+strings/$(octave_dirstamp):
+	@$(MKDIR_P) strings
+	@: > strings/$(octave_dirstamp)
+testfun/$(octave_dirstamp):
+	@$(MKDIR_P) testfun
+	@: > testfun/$(octave_dirstamp)
+time/$(octave_dirstamp):
+	@$(MKDIR_P) time
+	@: > time/$(octave_dirstamp)
+
+FCN_FILES_IN = $(GEN_FCN_FILES:.m=.in)
+
+EXTRA_DIST += \
+  $(IMAGES) \
+  $(FCN_FILES) \
+  $(FCN_FILES_IN)
+
+all-local: $(GEN_FCN_FILES) $(PKG_ADD_FILES) DOCSTRINGS
+
+DOCSTRINGS: gethelp$(BUILD_EXEEXT) mkdoc $(FCN_FILES)
+	@echo "generating $@"
+	@$(srcdir)/mkdoc "$(srcdir)" $(FCN_FILES) -- $(GEN_FCN_FILES) > $@.t
+	@mv $@.t $@
+
+gethelp$(BUILD_EXEEXT): gethelp.cc
+	$(BUILD_CXX) $(BUILD_CXXFLAGS) -o $@ $^ $(BUILD_LDFLAGS)
+
+$(GEN_FCN_FILES) : %.m : %.in Makefile
+	@$(do_subst_config_vals)
+
+check-m-sources:
+	@echo -n "checking whether files in source tree are listed in module.mk files..."; \
+	for f in $$(find $(srcdir) -name '*.m'); do \
+	  found=false; \
+	  for m in $(FCN_FILES); do \
+	    if [ "$$f" = $(srcdir)/"$$m" ]; then \
+	      found=true; \
+	      break; \
+	    fi; \
+	  done; \
+	  if $$found; then \
+	    true; \
+	  else \
+	    missing=$$(echo $$f | $(SED) "s|^$(srcdir)||"); \
+	    echo "$$missing: not listed in SOURCES"; \
+	  fi; \
+	done; \
+	if test -z "$$missing"; then \
+	  echo "yes"; \
+	fi
+.PHONY: check-m-sources
+
+install-data-local: install-images install-startup-files install-pkg-add
+.PHONY: install-data-local
+
+uninstall-local: uninstall-images uninstall-startup-files uninstall-pkg-add
+.PHONY: uninstall-local
+
+install-images:
+	$(MKDIR_P) $(DESTDIR)$(imagedir)
+	for im in $(IMAGES); do \
+	  f=`echo $$im | $(SED) 's,image/,,'`; \
+	  echo "$(INSTALL_DATA) $(srcdir)/$$im $(DESTDIR)$(imagedir)/$$f"; \
+	  $(INSTALL_DATA) $(srcdir)/$$im $(DESTDIR)$(imagedir)/$$f; \
+	done
+.PHONY: install-images
+
+uninstall-images:
+	for im in $(IMAGES); do \
+	  f=`echo $$im | $(SED) 's,.*/,,'`; \
+	  echo "rm -f $(DESTDIR)$(imagedir)/$$f"; \
+	  rm -f $(DESTDIR)$(imagedir)/$$f; \
+	done
+.PHONY: uninstall-images
+
+install-startup-files:
+	$(MKDIR_P) $(DESTDIR)$(fcnfiledir)/startup
+	if test -f $(DESTDIR)$(fcnfiledir)/startup/octaverc; then true; \
+	else \
+	  $(INSTALL_DATA) $(srcdir)/$(SYSTEM_STARTUP_FILE_SRC) \
+	    $(DESTDIR)$(fcnfiledir)/startup/octaverc; \
+	fi
+	if test -f $(DESTDIR)$(fcnfiledir)/startup/inputrc; then true; \
+	else \
+	  $(INSTALL_DATA) $(srcdir)/$(SYSTEM_INPUTRC_FILE_SRC) \
+	    $(DESTDIR)$(fcnfiledir)/startup/inputrc; \
+	fi
+	$(MKDIR_P) $(DESTDIR)$(localfcnfiledir)/startup
+	if test -f $(DESTDIR)$(localfcnfiledir)/startup/octaverc; \
+	then true; \
+	else \
+	  $(INSTALL_DATA) $(srcdir)/$(LOCAL_STARTUP_FILE_SRC) \
+	    $(DESTDIR)$(localfcnfiledir)/startup/octaverc; \
+	fi
+.PHONY: install-startup-files
+
+uninstall-startup-files:
+	rm -f $(DESTDIR)$(fcnfiledir)/startup/octaverc
+	rm -f $(DESTDIR)$(fcnfiledir)/startup/inputrc
+	rm -f $(DESTDIR)$(localfcnfiledir)/startup/octaverc
+.PHONY: uninstall-startup-files
+
+install-pkg-add:
+	for f in $(PKG_ADD_FILES); do \
+	  if [ -n "`cat $$f`" ]; then \
+	    $(MKDIR_P) $(DESTDIR)$(fcnfiledir)/`echo $$f | $(SED) 's,/[^/]*$$,,'`; \
+	    $(INSTALL_DATA) $$f $(DESTDIR)$(fcnfiledir)/$$f; \
+	  fi \
+	done
+.PHONY: install-pkg-add
+
+uninstall-pkg-add:
+	for f in $(PKG_ADD_FILES); do \
+	  rm -f $(DESTDIR)$(fcnfiledir)/$$f; \
+	done
+.PHONY: uninstall-pkg-add
+
+# ## optimization:
+
+# EXTRAS = glpktest1 glpktest2
--- a/scripts/Makefile.in	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,126 +0,0 @@
-# Makefile for octave's scripts directory
-#
-# Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002,
-#               2003, 2004, 2005, 2006, 2007, 2008, 2009 John W. Eaton
-#
-# This file is part of Octave.
-# 
-# Octave is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 3 of the License, or (at
-# your option) any later version.
-# 
-# Octave is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with Octave; see the file COPYING.  If not, see
-# <http://www.gnu.org/licenses/>.
-
-TOPDIR = ..
-
-script_sub_dir = .
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-
-include $(TOPDIR)/Makeconf
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-
-SOURCES =
-
-ifeq ($(srcdir),.)
-  M_FILE_DIRS := $(srcdir)
-else
-  M_FILE_DIRS := $(srcdir) .
-endif
-
-## Define this with =, not := so that the generated plot/gnuplot_binary.m
-## file will be included in the list when it is available.
-ALL_M_FILES = $(shell find $(M_FILE_DIRS) -name '*.m' -print)
-
-DISTFILES = $(addprefix $(srcdir)/, Makefile.in ChangeLog $(SOURCES) \
-	configure.ac configure mkinstalldirs mkdoc mkpkgadd gethelp.cc \
-	skip-autoheader move-if-change) DOCSTRINGS
-
-SUBDIRS = audio deprecated elfun general geometry help image io \
-	linear-algebra miscellaneous optimization path pkg plot polynomial \
-	set signal sparse specfun special-matrix startup \
-	statistics strings testfun time
-
-DISTSUBDIRS = $(SUBDIRS)
-
-FCN_FILES = # $(wildcard $(srcdir)/*.m)
-FCN_FILES_NO_DIR = # $(notdir $(FCN_FILES))
-
-CONFIG_FILES = @ac_config_files@
-
-all: $(SUBDIRS) DOCSTRINGS
-.PHONY: all
-
-configfiles: $(CONFIG_FILES)
-.PHONY: configfiles
-
-$(CONFIG_FILES): %: %.in config.status
-	./config.status $@
-
-config.status: configure
-	./config.status --recheck
-
-configure: configure.ac
-	if [ ! -f skip-autoconf ]; then autoconf --force; fi
-	if [ ! -f skip-autoheader ]; then autoheader --force; fi
-
-$(SUBDIRS):
-	$(MAKE) -C $@ all
-.PHONY: $(SUBDIRS)
-
-## Kluge alert:
-plot/gnuplot_binary.m:
-	$(MAKE) -C plot $(notdir $@)
-
-DOCSTRINGS: plot/gnuplot_binary.m gethelp$(BUILD_EXEEXT) mkdoc $(ALL_M_FILES)
-	$(srcdir)/mkdoc $(ALL_M_FILES) > $@.t
-	mv $@.t $@
-
-gethelp$(BUILD_EXEEXT): gethelp.cc
-	$(BUILD_CXX) $(BUILD_CXXFLAGS) -o $@ $^ $(BUILD_LDFLAGS)
-
-install install-strip uninstall clean mostlyclean distclean maintainer-clean::
-	@$(subdir-for-command)
-.PHONY: install install-strip uninstall
-.PHONY: clean mostlyclean distclean maintainer-clean
-
-tags TAGS:: $(SOURCES)
-	$(subdir-for-command)
-
-tags::
-	ctags $(SOURCES)
-
-TAGS:: $(SOURCES)
-	etags $(SOURCES)
-
-clean distclean maintainer-clean::
-	rm -f gethelp$(BUILD_EXEEXT)
-
-distclean maintainer-clean::
-	rm -f tags TAGS Makefile config.log config.status DOCSTRINGS
-	rm -rf autom4te.cache
-
-maintainer-clean::
-	rm -f configure
-
-dist:
-	ln $(DISTFILES) ../`cat ../.fname`/scripts
-	for dir in $(DISTSUBDIRS); do mkdir ../`cat ../.fname`/scripts/$$dir; $(MAKE) -C $$dir $@; done
-.PHONY: dist
-
-check-m-sources:
-	@$(subdir-for-command)
-.PHONY: check-m-sources
--- a/scripts/audio/Makefile.in	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,84 +0,0 @@
-# Makefile for octave's scripts/audio directory
-#
-# Copyright (C) 1995, 1996, 1997, 2002, 2005, 2006, 2007, 2008 John W. Eaton
-#
-# This file is part of Octave.
-# 
-# Octave is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 3 of the License, or (at
-# your option) any later version.
-# 
-# Octave is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with Octave; see the file COPYING.  If not, see
-# <http://www.gnu.org/licenses/>.
-
-TOPDIR = ../..
-
-script_sub_dir = audio
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-
-include $(TOPDIR)/Makeconf
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-
-SOURCES = lin2mu.m loadaudio.m mu2lin.m playaudio.m record.m \
-  saveaudio.m setaudio.m wavread.m wavwrite.m
-
-DISTFILES = $(addprefix $(srcdir)/, Makefile.in $(SOURCES))
-
-FCN_FILES = $(addprefix $(srcdir)/, $(SOURCES))
-FCN_FILES_NO_DIR = $(notdir $(FCN_FILES))
-
-all: PKG_ADD
-.PHONY: all
-
-install install-strip:
-	$(do-script-install)
-.PHONY: install install-strip
-
-uninstall:
-	$(do-script-uninstall)
-.PHONY: uninstall
-
-clean:
-.PHONY: clean
-
-PKG_ADD: $(FCN_FILES)
-	@echo "making PKG_ADD"
-	@$(do-mkpkgadd)
-
-tags: $(SOURCES)
-	ctags $(SOURCES)
-
-TAGS: $(SOURCES)
-	etags $(SOURCES)
-
-mostlyclean: clean
-.PHONY: mostlyclean
-
-distclean: clean
-	rm -f Makefile PKG_ADD
-.PHONY: distclean
-
-maintainer-clean: distclean
-	rm -f tags TAGS
-.PHONY: maintainer-clean
-
-dist:
-	ln $(DISTFILES) ../../`cat ../../.fname`/scripts/audio
-.PHONY: dist
-
-check-m-sources:
-	@$(do-check-m-sources)
-.PHONY: check-m-sources
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/audio/module.mk	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,16 @@
+FCN_FILE_DIRS += audio
+
+audio_FCN_FILES = \
+  audio/lin2mu.m \
+  audio/loadaudio.m \
+  audio/mu2lin.m \
+  audio/playaudio.m \
+  audio/record.m \
+  audio/saveaudio.m \
+  audio/setaudio.m \
+  audio/wavread.m \
+  audio/wavwrite.m
+
+FCN_FILES += $(audio_FCN_FILES)
+
+PKG_ADD_FILES += audio/PKG_ADD
--- a/scripts/configure.ac	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-dnl configure.in
-dnl
-dnl Process this file with autoconf to produce a configure script.
-dnl
-dnl Copyright (C) 1995, 1996, 1997, 1998, 2000, 2002, 2005, 2006, 2007,
-dnl               2008, 2009 John W. Eaton
-### 
-### This file is part of Octave.
-### 
-### Octave is free software; you can redistribute it and/or modify it
-### under the terms of the GNU General Public License as published by the
-### Free Software Foundation; either version 3 of the License, or (at
-### your option) any later version.
-### 
-### Octave is distributed in the hope that it will be useful, but WITHOUT
-### ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-### FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-### for more details.
-### 
-### You should have received a copy of the GNU General Public License
-### along with Octave; see the file COPYING.  If not, see
-### <http://www.gnu.org/licenses/>.
-
-AC_INIT
-AC_REVISION()
-AC_PREREQ(2.52)
-AC_CONFIG_SRCDIR([startup/inputrc])
-
-AC_PROG_INSTALL
-
-AC_SUBST(ac_config_files)
-AC_CONFIG_FILES([Makefile audio/Makefile deprecated/Makefile elfun/Makefile \
-	  general/Makefile geometry/Makefile help/Makefile image/Makefile \
-	  io/Makefile linear-algebra/Makefile miscellaneous/Makefile \
-	  optimization/Makefile path/Makefile pkg/Makefile plot/Makefile \
-	  polynomial/Makefile set/Makefile \
-	  signal/Makefile sparse/Makefile specfun/Makefile \
-	  special-matrix/Makefile startup/Makefile statistics/Makefile \
-	  statistics/base/Makefile statistics/distributions/Makefile \
-	  statistics/models/Makefile statistics/tests/Makefile \
-	  strings/Makefile time/Makefile testfun/Makefile])
-AC_OUTPUT
--- a/scripts/deprecated/Makefile.in	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,108 +0,0 @@
-# Makefile for octave's scripts/deprecated directory
-#
-# Copyright (C) 2002, 2005, 2006, 2007, 2008, 2009 John W. Eaton
-#
-# This file is part of Octave.
-# 
-# Octave is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 3 of the License, or (at
-# your option) any later version.
-# 
-# Octave is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with Octave; see the file COPYING.  If not, see
-# <http://www.gnu.org/licenses/>.
-
-TOPDIR = ../..
-
-script_sub_dir = deprecated
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-
-include $(TOPDIR)/Makeconf
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-
-SOURCES = beta_cdf.m beta_inv.m beta_pdf.m beta_rnd.m \
-  binomial_cdf.m binomial_inv.m binomial_pdf.m binomial_rnd.m \
-  chisquare_cdf.m chisquare_inv.m chisquare_pdf.m chisquare_rnd.m \
-  clearplot.m clg.m com2str.m create_set.m \
-  dmult.m exponential_cdf.m exponential_inv.m \
-  exponential_pdf.m exponential_rnd.m f_cdf.m f_inv.m f_pdf.m \
-  f_rnd.m gamma_cdf.m gamma_inv.m gamma_pdf.m gamma_rnd.m \
-  geometric_cdf.m geometric_inv.m geometric_pdf.m geometric_rnd.m \
-  hypergeometric_cdf.m hypergeometric_inv.m hypergeometric_pdf.m \
-  hypergeometric_rnd.m intersection.m is_bool.m is_complex.m \
-  is_list.m is_matrix.m is_scalar.m is_square.m is_stream.m \
-  is_struct.m is_symmetric.m is_vector.m iscommand.m israwcommand.m \
-  isstr.m lchol.m loadimage.m lognormal_cdf.m lognormal_inv.m \
-  lognormal_pdf.m lognormal_rnd.m mark_as_command.m \
-  mark_as_rawcommand.m meshdom.m normal_cdf.m normal_inv.m \
-  normal_pdf.m normal_rnd.m pascal_cdf.m pascal_inv.m pascal_pdf.m \
-  pascal_rnd.m poisson_cdf.m poisson_inv.m poisson_pdf.m \
-  poisson_rnd.m polyinteg.m setstr.m spatan2.m spchol2inv.m \
-  spcholinv.m spcumprod.m spcumsum.m spchol.m spdet.m spdiag.m \
-  spfind.m spinv.m spkron.m splchol.m split.m splu.m spmax.m spmin.m \
-  spprod.m spqr.m spsum.m spsumsq.m struct_contains.m \
-  struct_elements.m t_cdf.m t_inv.m t_pdf.m t_rnd.m uniform_cdf.m \
-  uniform_inv.m uniform_pdf.m uniform_rnd.m unmark_command.m \
-  unmark_rawcommand.m weibcdf.m weibinv.m weibpdf.m weibrnd.m \
-  weibull_cdf.m weibull_inv.m weibull_pdf.m weibull_rnd.m \
-  wiener_rnd.m str2mat.m
-
-DISTFILES = $(addprefix $(srcdir)/, Makefile.in $(SOURCES))
-
-FCN_FILES = $(addprefix $(srcdir)/, $(SOURCES))
-FCN_FILES_NO_DIR = $(notdir $(FCN_FILES))
-
-all: PKG_ADD
-.PHONY: all
-
-install install-strip:
-	$(do-script-install)
-.PHONY: install install-strip
-
-uninstall:
-	$(do-script-uninstall)
-.PHONY: uninstall
-
-clean:
-.PHONY: clean
-
-PKG_ADD: $(FCN_FILES)
-	@echo "making PKG_ADD"
-	@$(do-mkpkgadd)
-
-tags: $(SOURCES)
-	ctags $(SOURCES)
-
-TAGS: $(SOURCES)
-	etags $(SOURCES)
-
-mostlyclean: clean
-.PHONY: mostlyclean
-
-distclean: clean
-	rm -f Makefile PKG_ADD
-.PHONY: distclean
-
-maintainer-clean: distclean
-	rm -f tags TAGS
-.PHONY: maintainer-clean
-
-dist:
-	ln $(DISTFILES) ../../`cat ../../.fname`/scripts/deprecated
-.PHONY: dist
-
-check-m-sources:
-	@$(do-check-m-sources)
-.PHONY: check-m-sources
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/deprecated/module.mk	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,123 @@
+FCN_FILE_DIRS += deprecated
+
+deprecated_FCN_FILES = \
+  deprecated/beta_cdf.m \
+  deprecated/beta_inv.m \
+  deprecated/beta_pdf.m \
+  deprecated/beta_rnd.m \
+  deprecated/binomial_cdf.m \
+  deprecated/binomial_inv.m \
+  deprecated/binomial_pdf.m \
+  deprecated/binomial_rnd.m \
+  deprecated/chisquare_cdf.m \
+  deprecated/chisquare_inv.m \
+  deprecated/chisquare_pdf.m \
+  deprecated/chisquare_rnd.m \
+  deprecated/clearplot.m \
+  deprecated/clg.m \
+  deprecated/com2str.m \
+  deprecated/create_set.m \
+  deprecated/dmult.m \
+  deprecated/exponential_cdf.m \
+  deprecated/exponential_inv.m \
+  deprecated/exponential_pdf.m \
+  deprecated/exponential_rnd.m \
+  deprecated/f_cdf.m \
+  deprecated/f_inv.m \
+  deprecated/f_pdf.m \
+  deprecated/f_rnd.m \
+  deprecated/gamma_cdf.m \
+  deprecated/gamma_inv.m \
+  deprecated/gamma_pdf.m \
+  deprecated/gamma_rnd.m \
+  deprecated/geometric_cdf.m \
+  deprecated/geometric_inv.m \
+  deprecated/geometric_pdf.m \
+  deprecated/geometric_rnd.m \
+  deprecated/hypergeometric_cdf.m \
+  deprecated/hypergeometric_inv.m \
+  deprecated/hypergeometric_pdf.m \
+  deprecated/hypergeometric_rnd.m \
+  deprecated/intersection.m \
+  deprecated/is_bool.m \
+  deprecated/is_complex.m \
+  deprecated/is_list.m \
+  deprecated/is_matrix.m \
+  deprecated/is_scalar.m \
+  deprecated/is_square.m \
+  deprecated/is_stream.m \
+  deprecated/is_struct.m \
+  deprecated/is_symmetric.m \
+  deprecated/is_vector.m \
+  deprecated/iscommand.m \
+  deprecated/israwcommand.m \
+  deprecated/isstr.m \
+  deprecated/lchol.m \
+  deprecated/loadimage.m \
+  deprecated/lognormal_cdf.m \
+  deprecated/lognormal_inv.m \
+  deprecated/lognormal_pdf.m \
+  deprecated/lognormal_rnd.m \
+  deprecated/mark_as_command.m \
+  deprecated/mark_as_rawcommand.m \
+  deprecated/meshdom.m \
+  deprecated/normal_cdf.m \
+  deprecated/normal_inv.m \
+  deprecated/normal_pdf.m \
+  deprecated/normal_rnd.m \
+  deprecated/pascal_cdf.m \
+  deprecated/pascal_inv.m \
+  deprecated/pascal_pdf.m \
+  deprecated/pascal_rnd.m \
+  deprecated/poisson_cdf.m \
+  deprecated/poisson_inv.m \
+  deprecated/poisson_pdf.m \
+  deprecated/poisson_rnd.m \
+  deprecated/polyinteg.m \
+  deprecated/setstr.m \
+  deprecated/spatan2.m \
+  deprecated/spchol2inv.m \
+  deprecated/spcholinv.m \
+  deprecated/spcumprod.m \
+  deprecated/spcumsum.m \
+  deprecated/spchol.m \
+  deprecated/spdet.m \
+  deprecated/spdiag.m \
+  deprecated/spfind.m \
+  deprecated/spinv.m \
+  deprecated/spkron.m \
+  deprecated/splchol.m \
+  deprecated/split.m \
+  deprecated/splu.m \
+  deprecated/spmax.m \
+  deprecated/spmin.m \
+  deprecated/spprod.m \
+  deprecated/spqr.m \
+  deprecated/spsum.m \
+  deprecated/spsumsq.m \
+  deprecated/struct_contains.m \
+  deprecated/struct_elements.m \
+  deprecated/t_cdf.m \
+  deprecated/t_inv.m \
+  deprecated/t_pdf.m \
+  deprecated/t_rnd.m \
+  deprecated/uniform_cdf.m \
+  deprecated/uniform_inv.m \
+  deprecated/uniform_pdf.m \
+  deprecated/uniform_rnd.m \
+  deprecated/unmark_command.m \
+  deprecated/unmark_rawcommand.m \
+  deprecated/weibcdf.m \
+  deprecated/weibinv.m \
+  deprecated/weibpdf.m \
+  deprecated/weibrnd.m \
+  deprecated/weibull_cdf.m \
+  deprecated/weibull_inv.m \
+  deprecated/weibull_pdf.m \
+  deprecated/weibull_rnd.m \
+  deprecated/wiener_rnd.m \
+  deprecated/str2mat.m
+
+FCN_FILES += $(deprecated_FCN_FILES)
+
+PKG_ADD_FILES += deprecated/PKG_ADD
--- a/scripts/elfun/Makefile.in	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,87 +0,0 @@
-# Makefile for octave's scripts/elfun directory
-#
-# Copyright (C) 1994, 1995, 1996, 1997, 2002, 2005, 2006, 2007, 2008
-#               John W. Eaton
-#
-# This file is part of Octave.
-# 
-# Octave is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 3 of the License, or (at
-# your option) any later version.
-# 
-# Octave is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with Octave; see the file COPYING.  If not, see
-# <http://www.gnu.org/licenses/>.
-
-TOPDIR = ../..
-
-script_sub_dir = elfun
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-
-include $(TOPDIR)/Makeconf
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-
-SOURCES = acosd.m acot.m acotd.m acoth.m acsc.m acscd.m \
-  acsch.m asec.m asecd.m asech.m asind.m atand.m cosd.m \
-  cot.m cotd.m coth.m csc.m cscd.m csch.m lcm.m sec.m secd.m \
-  sech.m sind.m tand.m
-
-DISTFILES = $(addprefix $(srcdir)/, Makefile.in $(SOURCES))
-
-FCN_FILES = $(addprefix $(srcdir)/, $(SOURCES))
-FCN_FILES_NO_DIR = $(notdir $(FCN_FILES))
-
-all: PKG_ADD
-.PHONY: all
-
-install install-strip:
-	$(do-script-install)
-.PHONY: install install-strip
-
-uninstall:
-	$(do-script-uninstall)
-.PHONY: uninstall
-
-clean:
-.PHONY: clean
-
-PKG_ADD: $(FCN_FILES)
-	@echo "making PKG_ADD"
-	@$(do-mkpkgadd)
-
-tags: $(SOURCES)
-	ctags $(SOURCES)
-
-TAGS: $(SOURCES)
-	etags $(SOURCES)
-
-mostlyclean: clean
-.PHONY: mostlyclean
-
-distclean: clean
-	rm -f Makefile PKG_ADD
-.PHONY: distclean
-
-maintainer-clean: distclean
-	rm -f tags TAGS
-.PHONY: maintainer-clean
-
-dist:
-	ln $(DISTFILES) ../../`cat ../../.fname`/scripts/elfun
-.PHONY: dist
-
-check-m-sources:
-	@$(do-check-m-sources)
-.PHONY: check-m-sources
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/elfun/module.mk	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,32 @@
+FCN_FILE_DIRS += elfun
+
+elfun_FCN_FILES = \
+  elfun/acosd.m \
+  elfun/acot.m \
+  elfun/acotd.m \
+  elfun/acoth.m \
+  elfun/acsc.m \
+  elfun/acscd.m \
+  elfun/acsch.m \
+  elfun/asec.m \
+  elfun/asecd.m \
+  elfun/asech.m \
+  elfun/asind.m \
+  elfun/atand.m \
+  elfun/cosd.m \
+  elfun/cot.m \
+  elfun/cotd.m \
+  elfun/coth.m \
+  elfun/csc.m \
+  elfun/cscd.m \
+  elfun/csch.m \
+  elfun/lcm.m \
+  elfun/sec.m \
+  elfun/secd.m \
+  elfun/sech.m \
+  elfun/sind.m \
+  elfun/tand.m
+
+FCN_FILES += $(elfun_FCN_FILES)
+
+PKG_ADD_FILES += elfun/PKG_ADD
--- a/scripts/general/Makefile.in	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,97 +0,0 @@
-# Makefile for octave's scripts/general directory
-#
-# Copyright (C) 1994, 1995, 1996, 1997, 2002, 2005, 2006, 2007, 2008
-#               John W. Eaton
-#
-# This file is part of Octave.
-# 
-# Octave is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 3 of the License, or (at
-# your option) any later version.
-# 
-# Octave is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with Octave; see the file COPYING.  If not, see
-# <http://www.gnu.org/licenses/>.
-
-TOPDIR = ../..
-
-script_sub_dir = general
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-
-include $(TOPDIR)/Makeconf
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-
-SOURCES = __isequal__.m __splinen__.m accumarray.m arrayfun.m \
-  bicubic.m bitcmp.m bitget.m bitset.m blkdiag.m cart2pol.m \
-  cart2sph.m cellidx.m cell2mat.m celldisp.m circshift.m colon.m common_size.m \
-  cplxpair.m cumtrapz.m dblquad.m deal.m del2.m display.m flipdim.m \
-  fliplr.m flipud.m genvarname.m gradient.m idivide.m int2str.m \
-  interp1.m interp1q.m interp2.m interp3.m interpn.m interpft.m \
-  is_duplicate_entry.m isa.m isdefinite.m isdir.m isequal.m \
-  isequalwithequalnans.m isscalar.m issquare.m issymmetric.m \
-  isvector.m loadobj.m logical.m logspace.m mod.m nargchk.m \
-  nargoutchk.m nextpow2.m nthroot.m num2str.m perror.m pol2cart.m \
-  polyarea.m postpad.m prepad.m quadgk.m quadl.m quadv.m rat.m \
-  rem.m repmat.m rot90.m rotdim.m runlength.m saveobj.m shift.m shiftdim.m \
-  sortrows.m sph2cart.m strerror.m structfun.m subsindex.m \
-  triplequad.m trapz.m
-
-DISTFILES = $(addprefix $(srcdir)/, Makefile.in $(SOURCES))
-
-FCN_FILES = $(addprefix $(srcdir)/, $(SOURCES))
-FCN_FILES_NO_DIR = $(notdir $(FCN_FILES))
-
-all: PKG_ADD
-.PHONY: all
-
-install install-strip:
-	$(do-script-install)
-.PHONY: install install-strip
-
-uninstall:
-	$(do-script-uninstall)
-.PHONY: uninstall
-
-clean:
-.PHONY: clean
-
-PKG_ADD: $(FCN_FILES)
-	@echo "making PKG_ADD"
-	@$(do-mkpkgadd)
-
-tags: $(SOURCES)
-	ctags $(SOURCES)
-
-TAGS: $(SOURCES)
-	etags $(SOURCES)
-
-mostlyclean: clean
-.PHONY: mostlyclean
-
-distclean: clean
-	rm -f Makefile PKG_ADD
-.PHONY: distclean
-
-maintainer-clean: distclean
-	rm -f tags TAGS
-.PHONY: maintainer-clean
-
-dist:
-	ln $(DISTFILES) ../../`cat ../../.fname`/scripts/general
-.PHONY: dist
-
-check-m-sources:
-	@$(do-check-m-sources)
-.PHONY: check-m-sources
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/general/module.mk	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,86 @@
+FCN_FILE_DIRS += general
+
+general_FCN_FILES = \
+  general/__isequal__.m \
+  general/__splinen__.m \
+  general/accumarray.m \
+  general/arrayfun.m \
+  general/bicubic.m \
+  general/bitcmp.m \
+  general/bitget.m \
+  general/bitset.m \
+  general/blkdiag.m \
+  general/cart2pol.m \
+  general/cart2sph.m \
+  general/cellidx.m \
+  general/cell2mat.m \
+  general/celldisp.m \
+  general/circshift.m \
+  general/colon.m \
+  general/common_size.m \
+  general/cplxpair.m \
+  general/cumtrapz.m \
+  general/dblquad.m \
+  general/deal.m \
+  general/del2.m \
+  general/display.m \
+  general/flipdim.m \
+  general/fliplr.m \
+  general/flipud.m \
+  general/genvarname.m \
+  general/gradient.m \
+  general/idivide.m \
+  general/int2str.m \
+  general/interp1.m \
+  general/interp1q.m \
+  general/interp2.m \
+  general/interp3.m \
+  general/interpn.m \
+  general/interpft.m \
+  general/is_duplicate_entry.m \
+  general/isa.m \
+  general/isdefinite.m \
+  general/isdir.m \
+  general/isequal.m \
+  general/isequalwithequalnans.m \
+  general/isscalar.m \
+  general/issquare.m \
+  general/issymmetric.m \
+  general/isvector.m \
+  general/loadobj.m \
+  general/logical.m \
+  general/logspace.m \
+  general/mod.m \
+  general/nargchk.m \
+  general/nargoutchk.m \
+  general/nextpow2.m \
+  general/nthroot.m \
+  general/num2str.m \
+  general/perror.m \
+  general/pol2cart.m \
+  general/polyarea.m \
+  general/postpad.m \
+  general/prepad.m \
+  general/quadgk.m \
+  general/quadl.m \
+  general/quadv.m \
+  general/rat.m \
+  general/rem.m \
+  general/repmat.m \
+  general/rot90.m \
+  general/rotdim.m \
+  general/runlength.m \
+  general/saveobj.m \
+  general/shift.m \
+  general/shiftdim.m \
+  general/sortrows.m \
+  general/sph2cart.m \
+  general/strerror.m \
+  general/structfun.m \
+  general/subsindex.m \
+  general/triplequad.m \
+  general/trapz.m
+
+FCN_FILES += $(general_FCN_FILES)
+
+PKG_ADD_FILES += general/PKG_ADD
--- a/scripts/geometry/Makefile.in	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,100 +0,0 @@
-# Makefile for octave's scripts/geometry directory
-#
-# Copyright (C) 2007, 2008, 2009 John W. Eaton
-#
-# This file is part of Octave.
-# 
-# Octave is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 3 of the License, or (at
-# your option) any later version.
-# 
-# Octave is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with Octave; see the file COPYING.  If not, see
-# <http://www.gnu.org/licenses/>.
-
-TOPDIR = ../..
-
-script_sub_dir = geometry
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-
-include $(TOPDIR)/Makeconf
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-
-SOURCES = \
-  convhull.m \
-  delaunay3.m \
-  delaunayn.m \
-  delaunay.m \
-  dsearch.m \
-  dsearchn.m \
-  griddata.m \
-  griddata3.m \
-  griddatan.m \
-  inpolygon.m \
-  rectint.m \
-  trimesh.m \
-  triplot.m \
-  trisurf.m \
-  tsearchn.m \
-  voronoi.m \
-  voronoin.m
-
-DISTFILES = $(addprefix $(srcdir)/,Makefile.in $(SOURCES))
-
-FCN_FILES = $(addprefix $(srcdir)/, $(SOURCES))
-FCN_FILES_NO_DIR = $(notdir $(FCN_FILES))
-
-all: PKG_ADD
-.PHONY: all
-
-install install-strip:
-	$(do-script-install)
-.PHONY: install install-strip
-
-uninstall:
-	$(do-script-uninstall)
-.PHONY: uninstall
-
-clean:
-.PHONY: clean
-
-PKG_ADD: $(FCN_FILES)
-	@echo "making PKG_ADD"
-	@$(do-mkpkgadd)
-
-tags: $(SOURCES)
-	ctags $(SOURCES)
-
-TAGS: $(SOURCES)
-	etags $(SOURCES)
-
-mostlyclean: clean
-.PHONY: mostlyclean
-
-distclean: clean
-	rm -f Makefile PKG_ADD
-.PHONY: distclean
-
-maintainer-clean: distclean
-	rm -f tags TAGS
-.PHONY: maintainer-clean
-
-dist:
-	ln $(DISTFILES) ../../`cat ../../.fname`/scripts/geometry
-.PHONY: dist
-
-check-m-sources:
-	@$(do-check-m-sources)
-.PHONY: check-m-sources
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/geometry/module.mk	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,24 @@
+FCN_FILE_DIRS += geometry
+
+geometry_FCN_FILES = \
+  geometry/convhull.m \
+  geometry/delaunay3.m \
+  geometry/delaunayn.m \
+  geometry/delaunay.m \
+  geometry/dsearch.m \
+  geometry/dsearchn.m \
+  geometry/griddata.m \
+  geometry/griddata3.m \
+  geometry/griddatan.m \
+  geometry/inpolygon.m \
+  geometry/rectint.m \
+  geometry/trimesh.m \
+  geometry/triplot.m \
+  geometry/trisurf.m \
+  geometry/tsearchn.m \
+  geometry/voronoi.m \
+  geometry/voronoin.m
+
+FCN_FILES += $(geometry_FCN_FILES)
+
+PKG_ADD_FILES += geometry/PKG_ADD
--- a/scripts/help/Makefile.in	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,94 +0,0 @@
-# Makefile for octave's scripts/help directory
-#
-# Copyright (C) 1995, 1996, 1997, 2002, 2005, 2006, 2007, 2009 John W. Eaton
-#
-# This file is part of Octave.
-# 
-# Octave is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 3 of the License, or (at
-# your option) any later version.
-# 
-# Octave is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with Octave; see the file COPYING.  If not, see
-# <http://www.gnu.org/licenses/>.
-
-TOPDIR = ../..
-
-script_sub_dir = help
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-
-include $(TOPDIR)/Makeconf
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-
-SOURCES = \
-  __additional_help_message__.m \
-  __makeinfo__.m \
-  __strip_html_tags__.m \
-  doc.m \
-  gen_doc_cache.m \
-  get_first_help_sentence.m \
-  help.m \
-  lookfor.m \
-  print_usage.m \
-  type.m \
-  which.m
-
-DISTFILES = $(addprefix $(srcdir)/, Makefile.in $(SOURCES))
-
-FCN_FILES = $(addprefix $(srcdir)/, $(SOURCES))
-FCN_FILES_NO_DIR = $(notdir $(FCN_FILES))
-
-all: PKG_ADD
-.PHONY: all
-
-install install-strip:
-	$(do-script-install)
-.PHONY: install install-strip
-
-uninstall:
-	$(do-script-uninstall)
-.PHONY: uninstall
-
-clean:
-.PHONY: clean
-
-PKG_ADD: $(FCN_FILES)
-	@echo "making PKG_ADD"
-	@$(do-mkpkgadd)
-
-tags: $(SOURCES)
-	ctags $(SOURCES)
-
-TAGS: $(SOURCES)
-	etags $(SOURCES)
-
-mostlyclean: clean
-.PHONY: mostlyclean
-
-distclean: clean
-	rm -f Makefile PKG_ADD
-.PHONY: distclean
-
-maintainer-clean: distclean
-	rm -f tags TAGS
-.PHONY: maintainer-clean
-
-dist:
-	ln $(DISTFILES) ../../`cat ../../.fname`/scripts/help
-.PHONY: dist
-
-check-m-sources:
-	@$(do-check-m-sources)
-.PHONY: check-m-sources
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/help/module.mk	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,18 @@
+FCN_FILE_DIRS += help
+
+help_FCN_FILES = \
+  help/__additional_help_message__.m \
+  help/__makeinfo__.m \
+  help/__strip_html_tags__.m \
+  help/doc.m \
+  help/gen_doc_cache.m \
+  help/get_first_help_sentence.m \
+  help/help.m \
+  help/lookfor.m \
+  help/print_usage.m \
+  help/type.m \
+  help/which.m
+
+FCN_FILES += $(help_FCN_FILES)
+
+PKG_ADD_FILES += help/PKG_ADD
--- a/scripts/image/Makefile.in	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,100 +0,0 @@
-# Makefile for octave's scripts/image directory
-#
-# Copyright (C) 1994, 1995, 1996, 1997, 2002, 2003, 2005, 2006, 2007, 2008
-#               John W. Eaton
-#
-# This file is part of Octave.
-# 
-# Octave is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 3 of the License, or (at
-# your option) any later version.
-# 
-# Octave is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with Octave; see the file COPYING.  If not, see
-# <http://www.gnu.org/licenses/>.
-
-TOPDIR = ../..
-
-script_sub_dir = image
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-
-include $(TOPDIR)/Makeconf
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-
-SOURCES = __img__.m __img_via_file__.m autumn.m bone.m brighten.m colormap.m \
-  contrast.m cool.m copper.m flag.m gmap40.m gray.m gray2ind.m hot.m hsv.m \
-  hsv2rgb.m image.m image_viewer.m imagesc.m imfinfo.m imread.m imshow.m \
-  imwrite.m ind2gray.m ind2rgb.m jet.m ntsc2rgb.m ocean.m pink.m prism.m \
-  rainbow.m rgb2hsv.m rgb2ind.m rgb2ntsc.m saveimage.m spring.m summer.m \
-  white.m winter.m
-
-IMAGES = default.img
-
-DISTFILES = $(addprefix $(srcdir)/, Makefile.in $(SOURCES) $(IMAGES))
-
-FCN_FILES = $(addprefix $(srcdir)/, $(SOURCES))
-FCN_FILES_NO_DIR = $(notdir $(FCN_FILES))
-
-all: PKG_ADD
-.PHONY: all
-
-install install-strip:
-	$(do-script-install)
-	$(top_srcdir)/mkinstalldirs $(DESTDIR)$(imagedir)
-	for f in $(IMAGES); do \
-	  rm -f $(DESTDIR)$(imagedir)/$$f; \
-	  $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(imagedir)/$$f; \
-	done
-	$(top_srcdir)/mkinstalldirs $(DESTDIR)$(archlibdir)
-.PHONY: install install-strip
-
-uninstall:
-	$(do-script-uninstall)
-	for f in $(IMAGES); \
-	  do rm -f $(DESTDIR)$(imagedir)/$$f; \
-	done
-.PHONY: uninstall
-
-clean:
-.PHONY: clean
-
-PKG_ADD: $(FCN_FILES)
-	@echo "making PKG_ADD"
-	@$(do-mkpkgadd)
-
-tags: $(SOURCES)
-	ctags $(SOURCES)
-
-TAGS: $(SOURCES)
-	etags $(SOURCES)
-
-mostlyclean: clean
-.PHONY: mostlyclean
-
-distclean: clean
-	rm -f Makefile PKG_ADD
-.PHONY: distclean
-
-maintainer-clean: distclean
-	rm -f tags TAGS
-.PHONY: maintainer-clean
-
-dist:
-	ln $(DISTFILES) ../../`cat ../../.fname`/scripts/image
-.PHONY: dist
-
-check-m-sources:
-	@$(do-check-m-sources)
-.PHONY: check-m-sources
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/image/module.mk	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,49 @@
+FCN_FILE_DIRS += image
+
+image_FCN_FILES = \
+  image/__img__.m \
+  image/__img_via_file__.m \
+  image/autumn.m \
+  image/bone.m \
+  image/brighten.m \
+  image/colormap.m \
+  image/contrast.m \
+  image/cool.m \
+  image/copper.m \
+  image/flag.m \
+  image/gmap40.m \
+  image/gray.m \
+  image/gray2ind.m \
+  image/hot.m \
+  image/hsv.m \
+  image/hsv2rgb.m \
+  image/image.m \
+  image/image_viewer.m \
+  image/imagesc.m \
+  image/imfinfo.m \
+  image/imread.m \
+  image/imshow.m \
+  image/imwrite.m \
+  image/ind2gray.m \
+  image/ind2rgb.m \
+  image/jet.m \
+  image/ntsc2rgb.m \
+  image/ocean.m \
+  image/pink.m \
+  image/prism.m \
+  image/rainbow.m \
+  image/rgb2hsv.m \
+  image/rgb2ind.m \
+  image/rgb2ntsc.m \
+  image/saveimage.m \
+  image/spring.m \
+  image/summer.m \
+  image/white.m \
+  image/winter.m
+
+IMAGES += \
+  image/default.img
+
+FCN_FILES += $(image_FCN_FILES)
+
+PKG_ADD_FILES += image/PKG_ADD
--- a/scripts/io/Makefile.in	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,83 +0,0 @@
-# Makefile for octave's scripts/io directory
-#
-# Copyright (C) 1996, 1997, 2002, 2005, 2006, 2007, 2008 John W. Eaton
-#
-# This file is part of Octave.
-# 
-# Octave is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 3 of the License, or (at
-# your option) any later version.
-# 
-# Octave is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with Octave; see the file COPYING.  If not, see
-# <http://www.gnu.org/licenses/>.
-
-TOPDIR = ../..
-
-script_sub_dir = io
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-
-include $(TOPDIR)/Makeconf
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-
-SOURCES = beep.m csvread.m csvwrite.m dlmwrite.m strread.m textread.m
-
-DISTFILES = $(addprefix $(srcdir)/, Makefile.in $(SOURCES))
-
-FCN_FILES = $(addprefix $(srcdir)/, $(SOURCES))
-FCN_FILES_NO_DIR = $(notdir $(FCN_FILES))
-
-all: PKG_ADD
-.PHONY: all
-
-install install-strip:
-	$(do-script-install)
-.PHONY: install install-strip
-
-uninstall:
-	$(do-script-uninstall)
-.PHONY: uninstall
-
-clean:
-.PHONY: clean
-
-PKG_ADD: $(FCN_FILES)
-	@echo "making PKG_ADD"
-	@$(do-mkpkgadd)
-
-tags: $(SOURCES)
-	ctags $(SOURCES)
-
-TAGS: $(SOURCES)
-	etags $(SOURCES)
-
-mostlyclean: clean
-.PHONY: mostlyclean
-
-distclean: clean
-	rm -f Makefile PKG_ADD
-.PHONY: distclean
-
-maintainer-clean: distclean
-	rm -f tags TAGS
-.PHONY: maintainer-clean
-
-dist:
-	ln $(DISTFILES) ../../`cat ../../.fname`/scripts/io
-.PHONY: dist
-
-check-m-sources:
-	@$(do-check-m-sources)
-.PHONY: check-m-sources
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/io/module.mk	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,13 @@
+FCN_FILE_DIRS += io
+
+io_FCN_FILES = \
+  io/beep.m \
+  io/csvread.m \
+  io/csvwrite.m \
+  io/dlmwrite.m \
+  io/strread.m \
+  io/textread.m
+
+FCN_FILES += $(io_FCN_FILES)
+
+PKG_ADD_FILES += io/PKG_ADD
--- a/scripts/linear-algebra/Makefile.in	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,87 +0,0 @@
-# Makefile for octave's scripts/linear-algebra directory
-#
-# Copyright (C) 1994, 1995, 1996, 1997, 2002, 2005, 2006, 2007, 2008, 2009
-#               John W. Eaton
-#
-# This file is part of Octave.
-# 
-# Octave is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 3 of the License, or (at
-# your option) any later version.
-# 
-# Octave is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with Octave; see the file COPYING.  If not, see
-# <http://www.gnu.org/licenses/>.
-
-TOPDIR = ../..
-
-script_sub_dir = linear-algebra
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-
-include $(TOPDIR)/Makeconf
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-
-SOURCES = commutation_matrix.m cond.m condest.m cross.m \
-  dot.m duplication_matrix.m expm.m housh.m krylov.m krylovb.m logm.m \
-  null.m onenormest.m orth.m planerot.m qzhess.m rank.m rref.m subspace.m \
-  trace.m vec.m vech.m
-
-DISTFILES = $(addprefix $(srcdir)/, Makefile.in $(SOURCES))
-
-FCN_FILES = $(addprefix $(srcdir)/, $(SOURCES))
-FCN_FILES_NO_DIR = $(notdir $(FCN_FILES))
-
-all: PKG_ADD
-.PHONY: all
-
-install install-strip:
-	$(do-script-install)
-.PHONY: install install-strip
-
-uninstall:
-	$(do-script-uninstall)
-.PHONY: uninstall
-
-clean:
-.PHONY: clean
-
-PKG_ADD: $(FCN_FILES)
-	@echo "making PKG_ADD"
-	@$(do-mkpkgadd)
-
-tags: $(SOURCES)
-	ctags $(SOURCES)
-
-TAGS: $(SOURCES)
-	etags $(SOURCES)
-
-mostlyclean: clean
-.PHONY: mostlyclean
-
-distclean: clean
-	rm -f Makefile PKG_ADD
-.PHONY: distclean
-
-maintainer-clean: distclean
-	rm -f tags TAGS
-.PHONY: maintainer-clean
-
-dist:
-	ln $(DISTFILES) ../../`cat ../../.fname`/scripts/linear-algebra
-.PHONY: dist
-
-check-m-sources:
-	@$(do-check-m-sources)
-.PHONY: check-m-sources
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/linear-algebra/module.mk	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,29 @@
+FCN_FILE_DIRS += linear-algebra
+
+linear_algebra_FCN_FILES = \
+  linear-algebra/commutation_matrix.m \
+  linear-algebra/cond.m \
+  linear-algebra/condest.m \
+  linear-algebra/cross.m \
+  linear-algebra/dot.m \
+  linear-algebra/duplication_matrix.m \
+  linear-algebra/expm.m \
+  linear-algebra/housh.m \
+  linear-algebra/krylov.m \
+  linear-algebra/krylovb.m \
+  linear-algebra/logm.m \
+  linear-algebra/null.m \
+  linear-algebra/onenormest.m \
+  linear-algebra/orth.m \
+  linear-algebra/planerot.m \
+  linear-algebra/qzhess.m \
+  linear-algebra/rank.m \
+  linear-algebra/rref.m \
+  linear-algebra/subspace.m \
+  linear-algebra/trace.m \
+  linear-algebra/vec.m \
+  linear-algebra/vech.m
+
+FCN_FILES += $(linear_algebra_FCN_FILES)
+
+PKG_ADD_FILES += linear-algebra/PKG_ADD
--- a/scripts/miscellaneous/Makefile.in	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,93 +0,0 @@
-# Makefile for octave's scripts/miscellaneous directory
-#
-# Copyright (C) 1994, 1995, 1996, 1997, 2002, 2005, 2006, 2007, 2008, 2009
-#               John W. Eaton
-#
-# This file is part of Octave.
-# 
-# Octave is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 3 of the License, or (at
-# your option) any later version.
-# 
-# Octave is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with Octave; see the file COPYING.  If not, see
-# <http://www.gnu.org/licenses/>.
-
-TOPDIR = ../..
-
-script_sub_dir = miscellaneous
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-
-include $(TOPDIR)/Makeconf
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-
-SOURCES = __xzip__.m ans.m bincoeff.m bug_report.m bunzip2.m bzip2.m \
-  cast.m comma.m compare_versions.m computer.m copyfile.m debug.m \
-  delete.m dir.m dos.m dump_prefs.m edit.m \
-  fileattrib.m fileparts.m flops.m fullfile.m getfield.m gunzip.m gzip.m \
-  info.m inputname.m intwarning.m ismac.m ispc.m isunix.m license.m \
-  list_primes.m ls.m ls_command.m menu.m mex.m mexext.m mkoctfile.m \
-  movefile.m namelengthmax.m news.m orderfields.m pack.m paren.m \
-  parseparams.m perl.m run.m semicolon.m setfield.m substruct.m swapbytes.m \
-  symvar.m tar.m tempdir.m tempname.m texas_lotto.m unix.m unpack.m untar.m \
-  unzip.m ver.m version.m warning_ids.m what.m xor.m zip.m
-
-DISTFILES = $(addprefix $(srcdir)/, Makefile.in $(SOURCES))
-
-FCN_FILES = $(addprefix $(srcdir)/, $(SOURCES))
-FCN_FILES_NO_DIR = $(notdir $(FCN_FILES))
-
-all: PKG_ADD
-.PHONY: all
-
-install install-strip:
-	$(do-script-install)
-.PHONY: install install-strip
-
-uninstall:
-	$(do-script-uninstall)
-.PHONY: uninstall
-
-clean:
-.PHONY: clean
-
-PKG_ADD: $(FCN_FILES)
-	@echo "making PKG_ADD"
-	@$(do-mkpkgadd)
-
-tags: $(SOURCES)
-	ctags $(SOURCES)
-
-TAGS: $(SOURCES)
-	etags $(SOURCES)
-
-mostlyclean: clean
-.PHONY: mostlyclean
-
-distclean: clean
-	rm -f Makefile PKG_ADD
-.PHONY: distclean
-
-maintainer-clean: distclean
-	rm -f tags TAGS
-.PHONY: maintainer-clean
-
-dist:
-	ln $(DISTFILES) ../../`cat ../../.fname`/scripts/miscellaneous
-.PHONY: dist
-
-check-m-sources:
-	@$(do-check-m-sources)
-.PHONY: check-m-sources
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/miscellaneous/module.mk	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,73 @@
+FCN_FILE_DIRS += miscellaneous
+
+miscellaneous_FCN_FILES = \
+  miscellaneous/__xzip__.m \
+  miscellaneous/ans.m \
+  miscellaneous/bincoeff.m \
+  miscellaneous/bug_report.m \
+  miscellaneous/bunzip2.m \
+  miscellaneous/bzip2.m \
+  miscellaneous/cast.m \
+  miscellaneous/comma.m \
+  miscellaneous/compare_versions.m \
+  miscellaneous/computer.m \
+  miscellaneous/copyfile.m \
+  miscellaneous/debug.m \
+  miscellaneous/delete.m \
+  miscellaneous/dir.m \
+  miscellaneous/dos.m \
+  miscellaneous/dump_prefs.m \
+  miscellaneous/edit.m \
+  miscellaneous/fileattrib.m \
+  miscellaneous/fileparts.m \
+  miscellaneous/flops.m \
+  miscellaneous/fullfile.m \
+  miscellaneous/getfield.m \
+  miscellaneous/gunzip.m \
+  miscellaneous/gzip.m \
+  miscellaneous/info.m \
+  miscellaneous/inputname.m \
+  miscellaneous/intwarning.m \
+  miscellaneous/ismac.m \
+  miscellaneous/ispc.m \
+  miscellaneous/isunix.m \
+  miscellaneous/license.m \
+  miscellaneous/list_primes.m \
+  miscellaneous/ls.m \
+  miscellaneous/ls_command.m \
+  miscellaneous/menu.m \
+  miscellaneous/mex.m \
+  miscellaneous/mexext.m \
+  miscellaneous/mkoctfile.m \
+  miscellaneous/movefile.m \
+  miscellaneous/namelengthmax.m \
+  miscellaneous/news.m \
+  miscellaneous/orderfields.m \
+  miscellaneous/pack.m \
+  miscellaneous/paren.m \
+  miscellaneous/parseparams.m \
+  miscellaneous/perl.m \
+  miscellaneous/run.m \
+  miscellaneous/semicolon.m \
+  miscellaneous/setfield.m \
+  miscellaneous/substruct.m \
+  miscellaneous/swapbytes.m \
+  miscellaneous/symvar.m \
+  miscellaneous/tar.m \
+  miscellaneous/tempdir.m \
+  miscellaneous/tempname.m \
+  miscellaneous/texas_lotto.m \
+  miscellaneous/unix.m \
+  miscellaneous/unpack.m \
+  miscellaneous/untar.m \
+  miscellaneous/unzip.m \
+  miscellaneous/ver.m \
+  miscellaneous/version.m \
+  miscellaneous/warning_ids.m \
+  miscellaneous/what.m \
+  miscellaneous/xor.m \
+  miscellaneous/zip.m
+
+FCN_FILES += $(miscellaneous_FCN_FILES)
+
+PKG_ADD_FILES += miscellaneous/PKG_ADD
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/mk-pkg-add	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,37 @@
+#! /bin/sh
+#
+# Copyright (C) 2002, 2003, 2007, 2009 John W. Eaton
+#
+# This file is part of Octave.
+# 
+# Octave is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation; either version 3 of the License, or (at
+# your option) any later version.
+# 
+# Octave is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with Octave; see the file COPYING.  If not, see
+# <http://www.gnu.org/licenses/>.
+
+## Expecting arguments in this order:
+##
+##  SRCDIR SRCDIR-FILES ... -- LOCAL-FILES ...
+
+set -e
+
+prefix="$1/"
+shift
+
+for arg
+do
+  if [ "$arg" = "--" ]; then
+    prefix=""
+  else
+    sed -n 's/^[#%][#%]* *PKG_ADD: *//p' "$prefix$arg"
+  fi
+done
--- a/scripts/mkdoc	Tue Nov 10 13:25:57 2009 -0500
+++ b/scripts/mkdoc	Tue Nov 10 15:02:25 2009 -0500
@@ -18,14 +18,16 @@
 # along with Octave; see the file COPYING.  If not, see
 # <http://www.gnu.org/licenses/>.
 
+## Expecting arguments in this order:
+##
+##  SRCDIR SRCDIR-FILES ... -- LOCAL-FILES ...
+
 set -e
 
 PERL=${PERL:-'perl'}
 
-if test $# -eq 0; then
-  echo "usage: mkdoc file ..." 1>&2
-  exit 1
-fi
+prefix="$1/"
+shift
 
 if test -f gethelp; then
   cat << EOF
@@ -37,17 +39,21 @@
 EOF
   for arg
   do
-    echo "$arg" | $PERL -n -e 'chop;
-               $f = "$_";
-               m{(.*)/(.*)\.m};
-               for (qx{./gethelp $2 "$f" < "$f"}) {
-                 s/^\s+\@/\@/ unless $i_am_in_example;
-                 s/^\s+\@group/\@group/;
-                 s/^\s+\@end\s+group/\@end\s+group/;
-                 $i_am_in_example = 1 if /\s*\@example/;
-                 $i_am_in_example = 0 if /\s*\@end\s+example/;
-                 print;
-               }'
+    if [ "$arg" = "--" ]; then
+      prefix=""
+    else
+      echo "$prefix$arg" | $PERL -n -e 'chop;
+	$f = "$_";
+        next unless m{(.*)/(.*)\.m};
+	for (qx{./gethelp $2 "$f" < "$f"}) {
+	  s/^\s+\@/\@/ unless $i_am_in_example;
+	  s/^\s+\@group/\@group/;
+	  s/^\s+\@end\s+group/\@end\s+group/;
+	  $i_am_in_example = 1 if /\s*\@example/;
+	  $i_am_in_example = 0 if /\s*\@end\s+example/;
+	  print;
+	}'
+    fi
   done
 else
   echo "gethelp program seems to be missing!" 1>&2
--- a/scripts/mkpkgadd	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-#! /bin/sh
-#
-# Copyright (C) 2002, 2003, 2007 John W. Eaton
-#
-# This file is part of Octave.
-# 
-# Octave is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 3 of the License, or (at
-# your option) any later version.
-# 
-# Octave is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with Octave; see the file COPYING.  If not, see
-# <http://www.gnu.org/licenses/>.
-
-if [ $# -eq 1 ]; then
-  dir="$1"
-else
-  echo "usage: mkpkgadd directory" 1>&2
-  exit 1
-fi
-
-cd $dir
-
-m_files=`ls *.m`
-cxx_files=`ls *.cc`
-
-if [ -n "$m_files" ]; then
-  sed -n 's/^[#%][#%]* *PKG_ADD: *//p' $m_files
-fi
-
-if [ -n "$cxx_files" ]; then
-  sed -n -e 's,^//* *PKG_ADD: *,,p' \
-         -e 's,^/\** *PKG_ADD: *\(.*\) \*/$,\1,p' $cxx_files
-fi
--- a/scripts/move-if-change	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-#!/bin/sh
-#
-# Like mv $1 $2, but if the files are the same, just delete $1.
-# Status is 0 if $2 is changed, 1 otherwise.
-
-if test -r $2; then
-  if cmp $1 $2 > /dev/null; then
-    echo $2 is unchanged
-    rm -f $1
-  else
-    mv -f $1 $2
-  fi
-else
-  mv -f $1 $2
-fi
--- a/scripts/optimization/Makefile.in	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,100 +0,0 @@
-# Makefile for octave's scripts/optimization directory
-#
-# Copyright (C) 2005, 2006, 2007, 2008, 2009 John W. Eaton
-#
-# This file is part of Octave.
-# 
-# Octave is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 3 of the License, or (at
-# your option) any later version.
-# 
-# Octave is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with Octave; see the file COPYING.  If not, see
-# <http://www.gnu.org/licenses/>.
-
-TOPDIR = ../..
-
-script_sub_dir = optimization
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-
-include $(TOPDIR)/Makeconf
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-
-SOURCES = \
-  fzero.m \
-  __fdjac__.m \
-  __dogleg__.m \
-  __doglegm__.m \
-  fsolve.m \
-  fminunc.m \
-  glpk.m \
-  glpkmex.m \
-  lsqnonneg.m \
-  pqpnonneg.m \
-  optimset.m \
-  optimget.m \
-  __all_opts__.m \
-  qp.m \
-  sqp.m
-
-EXTRAS = glpktest1 glpktest2
-
-DISTFILES = $(addprefix $(srcdir)/, Makefile.in $(SOURCES))
-
-FCN_FILES = $(addprefix $(srcdir)/, $(SOURCES))
-FCN_FILES_NO_DIR = $(notdir $(FCN_FILES))
-
-all: PKG_ADD
-.PHONY: all
-
-install install-strip:
-	$(do-script-install)
-.PHONY: install install-strip
-
-uninstall:
-	$(do-script-uninstall)
-.PHONY: uninstall
-
-clean:
-.PHONY: clean
-
-PKG_ADD: $(FCN_FILES)
-	@echo "making PKG_ADD"
-	@$(do-mkpkgadd)
-
-tags: $(SOURCES)
-	ctags $(SOURCES)
-
-TAGS: $(SOURCES)
-	etags $(SOURCES)
-
-mostlyclean: clean
-.PHONY: mostlyclean
-
-distclean: clean
-	rm -f Makefile PKG_ADD
-.PHONY: distclean
-
-maintainer-clean: distclean
-	rm -f tags TAGS
-.PHONY: maintainer-clean
-
-dist:
-	ln $(DISTFILES) ../../`cat ../../.fname`/scripts/optimization
-.PHONY: dist
-
-check-m-sources:
-	@$(do-check-m-sources)
-.PHONY: check-m-sources
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/optimization/module.mk	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,22 @@
+FCN_FILE_DIRS += optimization
+
+optimization_FCN_FILES = \
+  optimization/fzero.m \
+  optimization/__fdjac__.m \
+  optimization/__dogleg__.m \
+  optimization/__doglegm__.m \
+  optimization/fsolve.m \
+  optimization/fminunc.m \
+  optimization/glpk.m \
+  optimization/glpkmex.m \
+  optimization/lsqnonneg.m \
+  optimization/pqpnonneg.m \
+  optimization/optimset.m \
+  optimization/optimget.m \
+  optimization/__all_opts__.m \
+  optimization/qp.m \
+  optimization/sqp.m
+
+FCN_FILES += $(optimization_FCN_FILES)
+
+PKG_ADD_FILES += optimization/PKG_ADD
--- a/scripts/path/Makefile.in	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,83 +0,0 @@
-# Makefile for octave's scripts/path directory
-#
-# Copyright (C) 2006, 2007, 2008 John W. Eaton
-#
-# This file is part of Octave.
-# 
-# Octave is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 3 of the License, or (at
-# your option) any later version.
-# 
-# Octave is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with Octave; see the file COPYING.  If not, see
-# <http://www.gnu.org/licenses/>.
-
-TOPDIR = ../..
-
-script_sub_dir = path
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-
-include $(TOPDIR)/Makeconf
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-
-SOURCES = __extractpath__.m matlabroot.m pathdef.m savepath.m
-
-DISTFILES = $(addprefix $(srcdir)/, Makefile.in $(SOURCES))
-
-FCN_FILES = $(addprefix $(srcdir)/, $(SOURCES))
-FCN_FILES_NO_DIR = $(notdir $(FCN_FILES))
-
-all: PKG_ADD
-.PHONY: all
-
-install install-strip:
-	$(do-script-install)
-.PHONY: install install-strip
-
-uninstall:
-	$(do-script-uninstall)
-.PHONY: uninstall
-
-clean:
-.PHONY: clean
-
-PKG_ADD: $(FCN_FILES)
-	@echo "making PKG_ADD"
-	@$(do-mkpkgadd)
-
-tags: $(SOURCES)
-	ctags $(SOURCES)
-
-TAGS: $(SOURCES)
-	etags $(SOURCES)
-
-mostlyclean: clean
-.PHONY: mostlyclean
-
-distclean: clean
-	rm -f Makefile PKG_ADD
-.PHONY: distclean
-
-maintainer-clean: distclean
-	rm -f tags TAGS
-.PHONY: maintainer-clean
-
-dist:
-	ln $(DISTFILES) ../../`cat ../../.fname`/scripts/path
-.PHONY: dist
-
-check-m-sources:
-	@$(do-check-m-sources)
-.PHONY: check-m-sources
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/path/module.mk	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,11 @@
+FCN_FILE_DIRS += path
+
+path_FCN_FILES = \
+  path/__extractpath__.m \
+  path/matlabroot.m \
+  path/pathdef.m \
+  path/savepath.m
+
+FCN_FILES += $(path_FCN_FILES)
+
+PKG_ADD_FILES += path/PKG_ADD
--- a/scripts/pkg/Makefile.in	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,83 +0,0 @@
-# Makefile for octave's scripts/pkg directory
-#
-# Copyright (C) 2006, 2007, 2008 John W. Eaton
-#
-# This file is part of Octave.
-# 
-# Octave is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 3 of the License, or (at
-# your option) any later version.
-# 
-# Octave is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with Octave; see the file COPYING.  If not, see
-# <http://www.gnu.org/licenses/>.
-
-TOPDIR = ../..
-
-script_sub_dir = pkg
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-
-include $(TOPDIR)/Makeconf
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-
-SOURCES = pkg.m
-
-DISTFILES = $(addprefix $(srcdir)/, Makefile.in $(SOURCES))
-
-FCN_FILES = $(addprefix $(srcdir)/, $(SOURCES))
-FCN_FILES_NO_DIR = $(notdir $(FCN_FILES))
-
-all: PKG_ADD
-.PHONY: all
-
-install install-strip:
-	$(do-script-install)
-.PHONY: install install-strip
-
-uninstall:
-	$(do-script-uninstall)
-.PHONY: uninstall
-
-clean:
-.PHONY: clean
-
-PKG_ADD: $(FCN_FILES)
-	@echo "making PKG_ADD"
-	@$(do-mkpkgadd)
-
-tags: $(SOURCES)
-	ctags $(SOURCES)
-
-TAGS: $(SOURCES)
-	etags $(SOURCES)
-
-mostlyclean: clean
-.PHONY: mostlyclean
-
-distclean: clean
-	rm -f Makefile PKG_ADD
-.PHONY: distclean
-
-maintainer-clean: distclean
-	rm -f tags TAGS
-.PHONY: maintainer-clean
-
-dist:
-	ln $(DISTFILES) ../../`cat ../../.fname`/scripts/pkg
-.PHONY: dist
-
-check-m-sources:
-	@$(do-check-m-sources)
-.PHONY: check-m-sources
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/pkg/module.mk	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,8 @@
+FCN_FILE_DIRS += pkg
+
+pkg_FCN_FILES = \
+  pkg/pkg.m
+
+FCN_FILES += $(pkg_FCN_FILES)
+
+PKG_ADD_FILES += pkg/PKG_ADD
--- a/scripts/plot/Makefile.in	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,257 +0,0 @@
-# Makefile for octave's scripts/plot directory
-#
-# Copyright (C) 1994, 1995, 1996, 1997, 2002, 2005, 2006, 2007, 2008, 2009
-#               John W. Eaton
-#
-# This file is part of Octave.
-# 
-# Octave is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 3 of the License, or (at
-# your option) any later version.
-# 
-# Octave is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with Octave; see the file COPYING.  If not, see
-# <http://www.gnu.org/licenses/>.
-
-TOPDIR = ../..
-
-script_sub_dir = plot
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-
-include $(TOPDIR)/Makeconf
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-
-SOURCES = \
-  __actual_axis_position__.m \
-  __add_datasource__.m \
-  __area__.m \
-  __axes_limits__.m \
-  __axis_label__.m \
-  __bar__.m \
-  __bars__.m \
-  __clabel__.m \
-  __contour__.m \
-  __default_plot_options__.m \
-  __errcomm__.m \
-  __errplot__.m \
-  __ezplot__.m \
-  __gnuplot_get_var__.m \
-  __gnuplot_has_feature__.m \
-  __gnuplot_open_stream__.m \
-  __go_close_all__.m \
-  __go_draw_axes__.m \
-  __go_draw_figure__.m \
-  __gnuplot_ginput__.m \
-  __gnuplot_version__.m \
-  __interp_cube__.m \
-  __line__.m \
-  __marching_cube__.m \
-  __next_line_color__.m \
-  __patch__.m \
-  __plr1__.m \
-  __plr2__.m \
-  __plt1__.m \
-  __plt2__.m \
-  __plt2mm__.m \
-  __plt2mv__.m \
-  __plt2ss__.m \
-  __plt2sv__.m \
-  __plt2vm__.m \
-  __plt2vs__.m \
-  __plt2vv__.m \
-  __plt__.m \
-  __plt_get_axis_arg__.m \
-  __pltopt1__.m \
-  __pltopt__.m \
-  __quiver__.m \
-  __scatter__.m \
-  __stem__.m \
-  allchild.m \
-  ancestor.m \
-  area.m \
-  axes.m \
-  axis.m \
-  backend.m \
-  bar.m \
-  barh.m \
-  box.m \
-  caxis.m \
-  cla.m \
-  clabel.m \
-  clf.m \
-  close.m \
-  closereq.m \
-  colorbar.m \
-  comet.m \
-  compass.m \
-  contour3.m \
-  contour.m \
-  contourc.m \
-  contourf.m \
-  cylinder.m \
-  diffuse.m \
-  gnuplot_drawnow.m \
-  ellipsoid.m \
-  errorbar.m \
-  ezcontourf.m \
-  ezcontour.m \
-  ezmeshc.m \
-  ezmesh.m \
-  ezplot.m \
-  ezplot3.m \
-  ezpolar.m \
-  ezsurfc.m \
-  ezsurf.m \
-  feather.m \
-  figure.m \
-  fill.m \
-  findall.m \
-  findobj.m \
-  fplot.m \
-  gca.m \
-  gcbf.m \
-  gcbo.m \
-  gcf.m \
-  ginput.m \
-  grid.m \
-  gtext.m \
-  hggroup.m \
-  hidden.m \
-  hist.m \
-  hold.m \
-  isfigure.m \
-  ishghandle.m \
-  ishold.m \
-  isocolors.m \
-  isonormals.m \
-  isosurface.m \
-  legend.m \
-  line.m \
-  linkprop.m \
-  loglog.m \
-  loglogerr.m \
-  mesh.m \
-  meshc.m \
-  meshgrid.m \
-  meshz.m \
-  ndgrid.m \
-  newplot.m \
-  orient.m \
-  pareto.m \
-  patch.m \
-  pcolor.m \
-  peaks.m \
-  pie.m \
-  plot.m \
-  plotmatrix.m \
-  plotyy.m \
-  plot3.m \
-  plotyy.m \
-  polar.m \
-  print.m \
-  quiver.m \
-  quiver3.m \
-  refresh.m \
-  refreshdata.m \
-  replot.m \
-  ribbon.m \
-  rose.m \
-  scatter.m \
-  scatter3.m \
-  semilogx.m \
-  semilogxerr.m \
-  semilogy.m \
-  semilogyerr.m \
-  shading.m \
-  shg.m \
-  slice.m \
-  sombrero.m \
-  specular.m \
-  sphere.m \
-  spinmap.m \
-  stairs.m \
-  stem.m \
-  stem3.m \
-  subplot.m \
-  surf.m \
-  surface.m \
-  surfc.m \
-  surfl.m \
-  surfnorm.m \
-  text.m \
-  title.m \
-  view.m \
-  waitforbuttonpress.m \
-  xlabel.m \
-  xlim.m \
-  ylabel.m \
-  ylim.m \
-  zlabel.m \
-  zlim.m
-
-SOURCES_IN = gnuplot_binary.in
-
-GEN_M = $(SOURCES_IN:.in=.m)
-
-DISTFILES = $(addprefix $(srcdir)/, Makefile.in $(SOURCES) $(SOURCES_IN))
-
-FCN_FILES = $(addprefix $(srcdir)/, $(SOURCES)) $(GEN_M)
-FCN_FILES_NO_DIR = $(notdir $(FCN_FILES))
-
-all: $(GEN_M) PKG_ADD
-.PHONY: all
-
-install install-strip:
-	$(do-script-install)
-.PHONY: install install-strip
-
-uninstall:
-	$(do-script-uninstall)
-.PHONY: uninstall
-
-clean:
-.PHONY: clean
-
-PKG_ADD: $(FCN_FILES)
-	@echo "making PKG_ADD"
-	@$(do-mkpkgadd)
-
-tags: $(SOURCES)
-	ctags $(SOURCES)
-
-TAGS: $(SOURCES)
-	etags $(SOURCES)
-
-mostlyclean: clean
-.PHONY: mostlyclean
-
-distclean: clean
-	rm -f Makefile PKG_ADD $(GEN_M)
-.PHONY: distclean
-
-maintainer-clean: distclean
-	rm -f tags TAGS
-.PHONY: maintainer-clean
-
-dist:
-	ln $(DISTFILES) ../../`cat ../../.fname`/scripts/plot
-.PHONY: dist
-
-$(GEN_M): %.m : %.in $(TOPDIR)/Makeconf
-	@$(do-subst-config-vals)
-
-check-m-sources:
-	@$(do-check-m-sources)
-.PHONY: check-m-sources
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/plot/module.mk	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,177 @@
+FCN_FILE_DIRS += plot
+
+plot_GEN_FCN_FILES = \
+  plot/gnuplot_binary.m
+
+GEN_FCN_FILES += $(plot_GEN_FCN_FILES)
+
+plot_FCN_FILES = \
+  plot/__actual_axis_position__.m \
+  plot/__add_datasource__.m \
+  plot/__area__.m \
+  plot/__axes_limits__.m \
+  plot/__axis_label__.m \
+  plot/__bar__.m \
+  plot/__bars__.m \
+  plot/__clabel__.m \
+  plot/__contour__.m \
+  plot/__default_plot_options__.m \
+  plot/__errcomm__.m \
+  plot/__errplot__.m \
+  plot/__ezplot__.m \
+  plot/__gnuplot_get_var__.m \
+  plot/__gnuplot_ginput__.m \
+  plot/__gnuplot_has_feature__.m \
+  plot/__gnuplot_open_stream__.m \
+  plot/__gnuplot_version__.m \
+  plot/__go_close_all__.m \
+  plot/__go_draw_axes__.m \
+  plot/__go_draw_figure__.m \
+  plot/__interp_cube__.m \
+  plot/__line__.m \
+  plot/__marching_cube__.m \
+  plot/__next_line_color__.m \
+  plot/__patch__.m \
+  plot/__plr1__.m \
+  plot/__plr2__.m \
+  plot/__plt1__.m \
+  plot/__plt2__.m \
+  plot/__plt2mm__.m \
+  plot/__plt2mv__.m \
+  plot/__plt2ss__.m \
+  plot/__plt2sv__.m \
+  plot/__plt2vm__.m \
+  plot/__plt2vs__.m \
+  plot/__plt2vv__.m \
+  plot/__plt__.m \
+  plot/__plt_get_axis_arg__.m \
+  plot/__pltopt1__.m \
+  plot/__pltopt__.m \
+  plot/__quiver__.m \
+  plot/__scatter__.m \
+  plot/__stem__.m \
+  plot/allchild.m \
+  plot/ancestor.m \
+  plot/area.m \
+  plot/axes.m \
+  plot/axis.m \
+  plot/backend.m \
+  plot/bar.m \
+  plot/barh.m \
+  plot/box.m \
+  plot/caxis.m \
+  plot/cla.m \
+  plot/clabel.m \
+  plot/clf.m \
+  plot/close.m \
+  plot/closereq.m \
+  plot/colorbar.m \
+  plot/comet.m \
+  plot/compass.m \
+  plot/contour.m \
+  plot/contour3.m \
+  plot/contourc.m \
+  plot/contourf.m \
+  plot/cylinder.m \
+  plot/diffuse.m \
+  plot/ellipsoid.m \
+  plot/errorbar.m \
+  plot/ezcontour.m \
+  plot/ezcontourf.m \
+  plot/ezmesh.m \
+  plot/ezmeshc.m \
+  plot/ezplot.m \
+  plot/ezplot3.m \
+  plot/ezpolar.m \
+  plot/ezsurf.m \
+  plot/ezsurfc.m \
+  plot/feather.m \
+  plot/figure.m \
+  plot/fill.m \
+  plot/findall.m \
+  plot/findobj.m \
+  plot/fplot.m \
+  plot/gca.m \
+  plot/gcbf.m \
+  plot/gcbo.m \
+  plot/gcf.m \
+  plot/ginput.m \
+  plot/gnuplot_drawnow.m \
+  plot/grid.m \
+  plot/gtext.m \
+  plot/hggroup.m \
+  plot/hidden.m \
+  plot/hist.m \
+  plot/hold.m \
+  plot/isfigure.m \
+  plot/ishghandle.m \
+  plot/ishold.m \
+  plot/isocolors.m \
+  plot/isonormals.m \
+  plot/isosurface.m \
+  plot/legend.m \
+  plot/line.m \
+  plot/linkprop.m \
+  plot/loglog.m \
+  plot/loglogerr.m \
+  plot/mesh.m \
+  plot/meshc.m \
+  plot/meshgrid.m \
+  plot/meshz.m \
+  plot/ndgrid.m \
+  plot/newplot.m \
+  plot/orient.m \
+  plot/pareto.m \
+  plot/patch.m \
+  plot/pcolor.m \
+  plot/peaks.m \
+  plot/pie.m \
+  plot/plot.m \
+  plot/plot3.m \
+  plot/plotmatrix.m \
+  plot/plotyy.m \
+  plot/polar.m \
+  plot/print.m \
+  plot/quiver.m \
+  plot/quiver3.m \
+  plot/refresh.m \
+  plot/refreshdata.m \
+  plot/replot.m \
+  plot/ribbon.m \
+  plot/rose.m \
+  plot/scatter.m \
+  plot/scatter3.m \
+  plot/semilogx.m \
+  plot/semilogxerr.m \
+  plot/semilogy.m \
+  plot/semilogyerr.m \
+  plot/shading.m \
+  plot/shg.m \
+  plot/slice.m \
+  plot/sombrero.m \
+  plot/specular.m \
+  plot/sphere.m \
+  plot/spinmap.m \
+  plot/stairs.m \
+  plot/stem.m \
+  plot/stem3.m \
+  plot/subplot.m \
+  plot/surf.m \
+  plot/surface.m \
+  plot/surfc.m \
+  plot/surfl.m \
+  plot/surfnorm.m \
+  plot/text.m \
+  plot/title.m \
+  plot/view.m \
+  plot/waitforbuttonpress.m \
+  plot/xlabel.m \
+  plot/xlim.m \
+  plot/ylabel.m \
+  plot/ylim.m \
+  plot/zlabel.m \
+  plot/zlim.m
+
+FCN_FILES += $(plot_FCN_FILES)
+
+PKG_ADD_FILES += plot/PKG_ADD
--- a/scripts/polynomial/Makefile.in	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,87 +0,0 @@
-# Makefile for octave's scripts/polynomial directory
-#
-# Copyright (C) 1994, 1995, 1996, 1997, 2002, 2005, 2006, 2007, 2008, 2009
-#               John W. Eaton
-#
-# This file is part of Octave.
-# 
-# Octave is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 3 of the License, or (at
-# your option) any later version.
-# 
-# Octave is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with Octave; see the file COPYING.  If not, see
-# <http://www.gnu.org/licenses/>.
-
-TOPDIR = ../..
-
-script_sub_dir = polynomial
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-
-include $(TOPDIR)/Makeconf
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-
-SOURCES = compan.m conv.m convn.m deconv.m mkpp.m mpoles.m \
-  pchip.m poly.m polyaffine.m polyder.m polyderiv.m polyfit.m \
-  polygcd.m polyint.m polyout.m polyreduce.m polyval.m \
-  polyvalm.m ppval.m residue.m roots.m spline.m unmkpp.m
-
-DISTFILES = $(addprefix $(srcdir)/, Makefile.in $(SOURCES))
-
-FCN_FILES = $(addprefix $(srcdir)/, $(SOURCES))
-FCN_FILES_NO_DIR = $(notdir $(FCN_FILES))
-
-all: PKG_ADD
-.PHONY: all
-
-install install-strip:
-	$(do-script-install)
-.PHONY: install install-strip
-
-uninstall:
-	$(do-script-uninstall)
-.PHONY: uninstall
-
-clean:
-.PHONY: clean
-
-PKG_ADD: $(FCN_FILES)
-	@echo "making PKG_ADD"
-	@$(do-mkpkgadd)
-
-tags: $(SOURCES)
-	ctags $(SOURCES)
-
-TAGS: $(SOURCES)
-	etags $(SOURCES)
-
-mostlyclean: clean
-.PHONY: mostlyclean
-
-distclean: clean
-	rm -f Makefile PKG_ADD
-.PHONY: distclean
-
-maintainer-clean: distclean
-	rm -f tags TAGS
-.PHONY: maintainer-clean
-
-dist:
-	ln $(DISTFILES) ../../`cat ../../.fname`/scripts/polynomial
-.PHONY: dist
-
-check-m-sources:
-	@$(do-check-m-sources)
-.PHONY: check-m-sources
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/polynomial/module.mk	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,30 @@
+FCN_FILE_DIRS += polynomial
+
+polynomial_FCN_FILES = \
+  polynomial/compan.m \
+  polynomial/conv.m \
+  polynomial/convn.m \
+  polynomial/deconv.m \
+  polynomial/mkpp.m \
+  polynomial/mpoles.m \
+  polynomial/pchip.m \
+  polynomial/poly.m \
+  polynomial/polyaffine.m \
+  polynomial/polyder.m \
+  polynomial/polyderiv.m \
+  polynomial/polyfit.m \
+  polynomial/polygcd.m \
+  polynomial/polyint.m \
+  polynomial/polyout.m \
+  polynomial/polyreduce.m \
+  polynomial/polyval.m \
+  polynomial/polyvalm.m \
+  polynomial/ppval.m \
+  polynomial/residue.m \
+  polynomial/roots.m \
+  polynomial/spline.m \
+  polynomial/unmkpp.m
+
+FCN_FILES += $(polynomial_FCN_FILES)
+
+PKG_ADD_FILES += polynomial/PKG_ADD
--- a/scripts/set/Makefile.in	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,85 +0,0 @@
-# Makefile for octave's scripts/set directory
-#
-# Copyright (C) 1994, 1995, 1996, 1997, 2002, 2005, 2006, 2007, 2008, 2009
-#               John W. Eaton
-#
-# This file is part of Octave.
-# 
-# Octave is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 3 of the License, or (at
-# your option) any later version.
-# 
-# Octave is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with Octave; see the file COPYING.  If not, see
-# <http://www.gnu.org/licenses/>.
-
-TOPDIR = ../..
-
-script_sub_dir = set
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-
-include $(TOPDIR)/Makeconf
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-
-SOURCES = complement.m intersect.m ismember.m \
-  setdiff.m setxor.m union.m unique.m
-
-DISTFILES = $(addprefix $(srcdir)/, Makefile.in $(SOURCES))
-
-FCN_FILES = $(addprefix $(srcdir)/, $(SOURCES))
-FCN_FILES_NO_DIR = $(notdir $(FCN_FILES))
-
-all: PKG_ADD
-.PHONY: all
-
-install install-strip:
-	$(do-script-install)
-.PHONY: install install-strip
-
-uninstall:
-	$(do-script-uninstall)
-.PHONY: uninstall
-
-clean:
-.PHONY: clean
-
-PKG_ADD: $(FCN_FILES)
-	@echo "making PKG_ADD"
-	@$(do-mkpkgadd)
-
-tags: $(SOURCES)
-	ctags $(SOURCES)
-
-TAGS: $(SOURCES)
-	etags $(SOURCES)
-
-mostlyclean: clean
-.PHONY: mostlyclean
-
-distclean: clean
-	rm -f Makefile PKG_ADD
-.PHONY: distclean
-
-maintainer-clean: distclean
-	rm -f tags TAGS
-.PHONY: maintainer-clean
-
-dist:
-	ln $(DISTFILES) ../../`cat ../../.fname`/scripts/set
-.PHONY: dist
-
-check-m-sources:
-	@$(do-check-m-sources)
-.PHONY: check-m-sources
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/set/module.mk	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,14 @@
+FCN_FILE_DIRS += set
+
+set_FCN_FILES = \
+  set/complement.m \
+  set/intersect.m \
+  set/ismember.m \
+  set/setdiff.m \
+  set/setxor.m \
+  set/union.m \
+  set/unique.m
+
+FCN_FILES += $(set_FCN_FILES)
+
+PKG_ADD_FILES += set/PKG_ADD
--- a/scripts/signal/Makefile.in	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-# Makefile for octave's scripts/signal directory
-#
-# Copyright (C) 1994, 1995, 1996, 1997, 2002, 2005, 2006, 2007, 2008
-#               John W. Eaton
-#
-# This file is part of Octave.
-# 
-# Octave is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 3 of the License, or (at
-# your option) any later version.
-# 
-# Octave is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with Octave; see the file COPYING.  If not, see
-# <http://www.gnu.org/licenses/>.
-
-TOPDIR = ../..
-
-script_sub_dir = signal
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-
-include $(TOPDIR)/Makeconf
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-
-SOURCES = arch_fit.m arch_rnd.m arch_test.m arma_rnd.m autocor.m \
-  autocov.m autoreg_matrix.m bartlett.m blackman.m detrend.m \
-  diffpara.m durbinlevinson.m fftconv.m fftfilt.m fftshift.m \
-  filter2.m fractdiff.m freqz.m freqz_plot.m hamming.m hanning.m \
-  hurst.m ifftshift.m periodogram.m rectangle_lw.m rectangle_sw.m \
-  sinc.m sinetone.m sinewave.m spectral_adf.m spectral_xdf.m \
-  spencer.m stft.m synthesis.m triangle_lw.m triangle_sw.m \
-  unwrap.m yulewalker.m
-
-DISTFILES = $(addprefix $(srcdir)/, Makefile.in $(SOURCES))
-
-FCN_FILES = $(addprefix $(srcdir)/, $(SOURCES))
-FCN_FILES_NO_DIR = $(notdir $(FCN_FILES))
-
-all: PKG_ADD
-.PHONY: all
-
-install install-strip:
-	$(do-script-install)
-.PHONY: install install-strip
-
-uninstall:
-	$(do-script-uninstall)
-.PHONY: uninstall
-
-clean:
-.PHONY: clean
-
-PKG_ADD: $(FCN_FILES)
-	@echo "making PKG_ADD"
-	@$(do-mkpkgadd)
-
-tags: $(SOURCES)
-	ctags $(SOURCES)
-
-TAGS: $(SOURCES)
-	etags $(SOURCES)
-
-mostlyclean: clean
-.PHONY: mostlyclean
-
-distclean: clean
-	rm -f Makefile PKG_ADD
-.PHONY: distclean
-
-maintainer-clean: distclean
-	rm -f tags TAGS
-.PHONY: maintainer-clean
-
-dist:
-	ln $(DISTFILES) ../../`cat ../../.fname`/scripts/signal
-.PHONY: dist
-
-check-m-sources:
-	@$(do-check-m-sources)
-.PHONY: check-m-sources
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/signal/module.mk	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,45 @@
+FCN_FILE_DIRS += signal
+
+signal_FCN_FILES = \
+  signal/arch_fit.m \
+  signal/arch_rnd.m \
+  signal/arch_test.m \
+  signal/arma_rnd.m \
+  signal/autocor.m \
+  signal/autocov.m \
+  signal/autoreg_matrix.m \
+  signal/bartlett.m \
+  signal/blackman.m \
+  signal/detrend.m \
+  signal/diffpara.m \
+  signal/durbinlevinson.m \
+  signal/fftconv.m \
+  signal/fftfilt.m \
+  signal/fftshift.m \
+  signal/filter2.m \
+  signal/fractdiff.m \
+  signal/freqz.m \
+  signal/freqz_plot.m \
+  signal/hamming.m \
+  signal/hanning.m \
+  signal/hurst.m \
+  signal/ifftshift.m \
+  signal/periodogram.m \
+  signal/rectangle_lw.m \
+  signal/rectangle_sw.m \
+  signal/sinc.m \
+  signal/sinetone.m \
+  signal/sinewave.m \
+  signal/spectral_adf.m \
+  signal/spectral_xdf.m \
+  signal/spencer.m \
+  signal/stft.m \
+  signal/synthesis.m \
+  signal/triangle_lw.m \
+  signal/triangle_sw.m \
+  signal/unwrap.m \
+  signal/yulewalker.m
+
+FCN_FILES += $(signal_FCN_FILES)
+
+PKG_ADD_FILES += signal/PKG_ADD
--- a/scripts/sparse/Makefile.in	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,86 +0,0 @@
-# Makefile for octave's scripts/sparse directory
-#
-# Copyright (C) 2005, 2006, 2007, 2008 John W. Eaton
-#
-# This file is part of Octave.
-# 
-# Octave is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 3 of the License, or (at
-# your option) any later version.
-# 
-# Octave is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with Octave; see the file COPYING.  If not, see
-# <http://www.gnu.org/licenses/>.
-
-TOPDIR = ../..
-
-script_sub_dir = sparse
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-
-include $(TOPDIR)/Makeconf
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-
-SOURCES = bicgstab.m cgs.m colperm.m etreeplot.m gplot.m nonzeros.m normest.m \
-  pcg.m pcr.m spalloc.m spaugment.m spconvert.m spdiags.m speye.m \
-  spfun.m sphcat.m spones.m sprand.m sprandn.m sprandsym.m spstats.m \
-  spvcat.m spy.m svds.m treelayout.m treeplot.m
-
-DISTFILES = $(addprefix $(srcdir)/, Makefile.in $(SOURCES))
-
-FCN_FILES = $(addprefix $(srcdir)/, $(SOURCES))
-FCN_FILES_NO_DIR = $(notdir $(FCN_FILES))
-
-all: PKG_ADD
-.PHONY: all
-
-install install-strip:
-	$(do-script-install)
-.PHONY: install install-strip
-
-uninstall:
-	$(do-script-uninstall)
-.PHONY: uninstall
-
-clean:
-.PHONY: clean
-
-PKG_ADD: $(FCN_FILES)
-	@echo "making PKG_ADD"
-	@$(do-mkpkgadd)
-
-tags: $(SOURCES)
-	ctags $(SOURCES)
-
-TAGS: $(SOURCES)
-	etags $(SOURCES)
-
-mostlyclean: clean
-.PHONY: mostlyclean
-
-distclean: clean
-	rm -f Makefile PKG_ADD
-.PHONY: distclean
-
-maintainer-clean: distclean
-	rm -f tags TAGS
-.PHONY: maintainer-clean
-
-dist:
-	ln $(DISTFILES) ../../`cat ../../.fname`/scripts/sparse
-.PHONY: dist
-
-check-m-sources:
-	@$(do-check-m-sources)
-.PHONY: check-m-sources
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/sparse/module.mk	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,33 @@
+FCN_FILE_DIRS += sparse
+
+sparse_FCN_FILES = \
+  sparse/bicgstab.m \
+  sparse/cgs.m \
+  sparse/colperm.m \
+  sparse/etreeplot.m \
+  sparse/gplot.m \
+  sparse/nonzeros.m \
+  sparse/normest.m \
+  sparse/pcg.m \
+  sparse/pcr.m \
+  sparse/spalloc.m \
+  sparse/spaugment.m \
+  sparse/spconvert.m \
+  sparse/spdiags.m \
+  sparse/speye.m \
+  sparse/spfun.m \
+  sparse/sphcat.m \
+  sparse/spones.m \
+  sparse/sprand.m \
+  sparse/sprandn.m \
+  sparse/sprandsym.m \
+  sparse/spstats.m \
+  sparse/spvcat.m \
+  sparse/spy.m \
+  sparse/svds.m \
+  sparse/treelayout.m \
+  sparse/treeplot.m
+
+FCN_FILES += $(sparse_FCN_FILES)
+
+PKG_ADD_FILES += sparse/PKG_ADD
--- a/scripts/specfun/Makefile.in	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,86 +0,0 @@
-# Makefile for octave's scripts/specfun directory
-#
-# Copyright (C) 1994, 1995, 1996, 1997, 2002, 2005, 2006, 2007, 2008
-#               John W. Eaton
-#
-# This file is part of Octave.
-# 
-# Octave is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 3 of the License, or (at
-# your option) any later version.
-# 
-# Octave is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with Octave; see the file COPYING.  If not, see
-# <http://www.gnu.org/licenses/>.
-
-TOPDIR = ../..
-
-script_sub_dir = specfun
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-
-include $(TOPDIR)/Makeconf
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-
-SOURCES = bessel.m beta.m betai.m betaln.m erfinv.m factor.m \
-  factorial.m gammai.m isprime.m legendre.m nchoosek.m \
-  perms.m pow2.m primes.m reallog.m realpow.m realsqrt.m
-
-DISTFILES = $(addprefix $(srcdir)/, Makefile.in $(SOURCES))
-
-FCN_FILES = $(addprefix $(srcdir)/, $(SOURCES))
-FCN_FILES_NO_DIR = $(notdir $(FCN_FILES))
-
-all: PKG_ADD
-.PHONY: all
-
-install install-strip:
-	$(do-script-install)
-.PHONY: install install-strip
-
-uninstall:
-	$(do-script-uninstall)
-.PHONY: uninstall
-
-clean:
-.PHONY: clean
-
-PKG_ADD: $(FCN_FILES)
-	@echo "making PKG_ADD"
-	@$(do-mkpkgadd)
-
-tags: $(SOURCES)
-	ctags $(SOURCES)
-
-TAGS: $(SOURCES)
-	etags $(SOURCES)
-
-mostlyclean: clean
-.PHONY: mostlyclean
-
-distclean: clean
-	rm -f Makefile PKG_ADD
-.PHONY: distclean
-
-maintainer-clean: distclean
-	rm -f tags TAGS
-.PHONY: maintainer-clean
-
-dist:
-	ln $(DISTFILES) ../../`cat ../../.fname`/scripts/specfun
-.PHONY: dist
-
-check-m-sources:
-	@$(do-check-m-sources)
-.PHONY: check-m-sources
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/specfun/module.mk	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,24 @@
+FCN_FILE_DIRS += specfun
+
+specfun_FCN_FILES = \
+  specfun/bessel.m \
+  specfun/beta.m \
+  specfun/betai.m \
+  specfun/betaln.m \
+  specfun/erfinv.m \
+  specfun/factor.m \
+  specfun/factorial.m \
+  specfun/gammai.m \
+  specfun/isprime.m \
+  specfun/legendre.m \
+  specfun/nchoosek.m \
+  specfun/perms.m \
+  specfun/pow2.m \
+  specfun/primes.m \
+  specfun/reallog.m \
+  specfun/realpow.m \
+  specfun/realsqrt.m
+
+FCN_FILES += $(specfun_FCN_FILES)
+
+PKG_ADD_FILES += specfun/PKG_ADD
--- a/scripts/special-matrix/Makefile.in	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,85 +0,0 @@
-# Makefile for octave's scripts/special-matrix directory
-#
-# Copyright (C) 1994, 1995, 1996, 1997, 2002, 2005, 2006, 2007, 2008
-#               John W. Eaton
-#
-# This file is part of Octave.
-# 
-# Octave is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 3 of the License, or (at
-# your option) any later version.
-# 
-# Octave is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with Octave; see the file COPYING.  If not, see
-# <http://www.gnu.org/licenses/>.
-
-TOPDIR = ../..
-
-script_sub_dir = special-matrix
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-
-include $(TOPDIR)/Makeconf
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-
-SOURCES = hadamard.m hankel.m hilb.m invhilb.m magic.m pascal.m \
-  rosser.m sylvester_matrix.m toeplitz.m vander.m wilkinson.m
-
-DISTFILES = $(addprefix $(srcdir)/, Makefile.in $(SOURCES))
-
-FCN_FILES = $(addprefix $(srcdir)/, $(SOURCES))
-FCN_FILES_NO_DIR = $(notdir $(FCN_FILES))
-
-all: PKG_ADD
-.PHONY: all
-
-install install-strip:
-	$(do-script-install)
-.PHONY: install install-strip
-
-uninstall:
-	$(do-script-uninstall)
-.PHONY: uninstall
-
-clean:
-.PHONY: clean
-
-PKG_ADD: $(FCN_FILES)
-	@echo "making PKG_ADD"
-	@$(do-mkpkgadd)
-
-tags: $(SOURCES)
-	ctags $(SOURCES)
-
-TAGS: $(SOURCES)
-	etags $(SOURCES)
-
-mostlyclean: clean
-.PHONY: mostlyclean
-
-distclean: clean
-	rm -f Makefile PKG_ADD
-.PHONY: distclean
-
-maintainer-clean: distclean
-	rm -f tags TAGS
-.PHONY: maintainer-clean
-
-dist:
-	ln $(DISTFILES) ../../`cat ../../.fname`/scripts/special-matrix
-.PHONY: dist
-
-check-m-sources:
-	@$(do-check-m-sources)
-.PHONY: check-m-sources
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/special-matrix/module.mk	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,18 @@
+FCN_FILE_DIRS += special-matrix
+
+special_matrix_FCN_FILES = \
+  special-matrix/hadamard.m \
+  special-matrix/hankel.m \
+  special-matrix/hilb.m \
+  special-matrix/invhilb.m \
+  special-matrix/magic.m \
+  special-matrix/pascal.m \
+  special-matrix/rosser.m \
+  special-matrix/sylvester_matrix.m \
+  special-matrix/toeplitz.m \
+  special-matrix/vander.m \
+  special-matrix/wilkinson.m
+
+FCN_FILES += $(special_matrix_FCN_FILES)
+
+PKG_ADD_FILES += special-matrix/PKG_ADD
--- a/scripts/startup/Makefile.in	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,107 +0,0 @@
-# Makefile for octave's scripts/startup directory
-#
-# Copyright (C) 1994, 1995, 1996, 1997, 2003, 2005, 2006, 2007, 2008
-#               John W. Eaton
-#
-# This file is part of Octave.
-# 
-# Octave is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 3 of the License, or (at
-# your option) any later version.
-# 
-# Octave is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with Octave; see the file COPYING.  If not, see
-# <http://www.gnu.org/licenses/>.
-
-TOPDIR = ../..
-
-script_sub_dir = startup
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-
-include $(TOPDIR)/Makeconf
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-
-SOURCES = __finish__.m main-rcfile local-rcfile inputrc
-
-DISTFILES = $(addprefix $(srcdir)/, Makefile.in $(SOURCES))
-
-FCN_FILES = $(addprefix $(srcdir)/, $(SOURCES))
-FCN_FILES_NO_DIR = $(notdir $(FCN_FILES))
-
-all: PKG_ADD
-.PHONY: all
-
-install install-strip:
-	$(top_srcdir)/mkinstalldirs $(DESTDIR)$(fcnfiledir)/$(script_sub_dir)
-	if test -f $(DESTDIR)$(fcnfiledir)/$(script_sub_dir)/octaverc; then true; \
-	else \
-	  $(INSTALL_DATA) $(srcdir)/main-rcfile \
-	    $(DESTDIR)$(fcnfiledir)/$(script_sub_dir)/octaverc; \
-	fi
-	if test -f $(DESTDIR)$(fcnfiledir)/$(script_sub_dir)/inputrc; then true; \
-	else \
-	  $(INSTALL_DATA) $(srcdir)/inputrc \
-	    $(DESTDIR)$(fcnfiledir)/$(script_sub_dir)/inputrc; \
-	fi
-	$(top_srcdir)/mkinstalldirs $(DESTDIR)$(localfcnfiledir)/$(script_sub_dir)
-	if test -f $(DESTDIR)$(localfcnfiledir)/$(script_sub_dir)/octaverc; \
-	then true; \
-	else \
-	  $(INSTALL_DATA) $(srcdir)/local-rcfile \
-	    $(DESTDIR)$(localfcnfiledir)/$(script_sub_dir)/octaverc; \
-	fi
-	for f in $(FCN_FILES_NO_DIR); do \
-	  rm -f $(DESTDIR)$(fcnfiledir)/$(script_sub_dir)/$$f; \
-	  $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(fcnfiledir)/$(script_sub_dir)/$$f; \
-	done
-.PHONY: install install-strip
-
-uninstall:
-	for f in $(FCN_FILES_NO_DIR); \
-	  do rm -f $(DESTDIR)$(fcnfiledir)/$(script_sub_dir)/$$f; \
-	done
-.PHONY: uninstall
-
-clean:
-.PHONY: clean
-
-PKG_ADD: $(FCN_FILES)
-	@echo "making PKG_ADD"
-	@$(do-mkpkgadd)
-
-tags: $(SOURCES)
-	ctags $(SOURCES)
-
-TAGS: $(SOURCES)
-	etags $(SOURCES)
-
-mostlyclean: clean
-.PHONY: mostlyclean
-
-distclean: clean
-	rm -f Makefile PKG_ADD
-.PHONY: distclean
-
-maintainer-clean: distclean
-	rm -f tags TAGS
-.PHONY: maintainer-clean
-
-dist:
-	ln $(DISTFILES) ../../`cat ../../.fname`/scripts/startup
-.PHONY: dist
-
-check-m-sources:
-	@$(do-check-m-sources)
-.PHONY: check-m-sources
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/startup/module.mk	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,25 @@
+FCN_FILE_DIRS += startup
+
+startup_FCN_FILES = \
+  startup/__finish__.m
+
+SYSTEM_STARTUP_FILE_SRC = startup/main-rcfile
+
+SYSTEM_INPUTRC_FILE_SRC = startup/inputrc
+
+LOCAL_STARTUP_FILE_SRC = startup/local-rcfile
+
+STARTUP_FILE_SRC = \
+  $(SYSTEM_STARTUP_FILE_SRC) \
+  $(SYSTEM_INPUTRC_FILE_SRC) \
+  $(LOCAL_STARTUP_FILE_SRC)
+
+FCN_FILES += \
+  $(startup_FCN_FILES) \
+  $(SYSTEM_STARTUP_FILE_SRC) \
+  $(LOCAL_STARTUP_FILE_SRC)
+
+EXTRA_DIST += \
+  $(SYSTEM_INPUTRC_FILE_SRC)
+
+PKG_ADD_FILES += startup/PKG_ADD
--- a/scripts/statistics/Makefile.in	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,71 +0,0 @@
-# Makefile for octave's scripts/statistics directory
-#
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2005, 2007, 2008
-#               John W. Eaton
-#
-# This file is part of Octave.
-# 
-# Octave is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 3 of the License, or (at
-# your option) any later version.
-# 
-# Octave is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with Octave; see the file COPYING.  If not, see
-# <http://www.gnu.org/licenses/>.
-
-TOPDIR = ../..
-
-script_sub_dir = statistics
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-
-include $(TOPDIR)/Makeconf
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-
-DISTFILES = $(srcdir)/Makefile.in
-
-SUBDIRS = base distributions models tests
-
-DISTSUBDIRS = $(SUBDIRS)
-
-all: $(SUBDIRS)
-.PHONY: all
-
-$(SUBDIRS):
-	$(MAKE) -C $@ all
-.PHONY: $(SUBDIRS)
-
-install install-strip uninstall clean mostlyclean distclean maintainer-clean::
-	@$(subdir-for-command)
-.PHONY: install install-strip uninstall
-.PHONY: clean mostlyclean distclean maintainer-clean
-
-tags TAGS:
-	$(subdir-for-command)
-
-distclean::
-	rm -f Makefile
-
-maintainer-clean::
-	rm -f tags TAGS Makefile
-
-dist:
-	ln $(DISTFILES) ../../`cat ../../.fname`/scripts/statistics
-	for dir in $(DISTSUBDIRS); do mkdir ../../`cat ../../.fname`/scripts/statistics/$$dir; $(MAKE) -C $$dir $@; done
-.PHONY: dist
-
-check-m-sources:
-	@$(do-check-m-sources)
-	@$(subdir-for-command)
-.PHONY: check-m-sources
--- a/scripts/statistics/base/Makefile.in	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,87 +0,0 @@
-# Makefile for octave's scripts/statistics/base directory
-#
-# Copyright (C) 1998, 2002, 2005, 2006, 2007, 2008, 2009 John W. Eaton
-#
-# This file is part of Octave.
-# 
-# Octave is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 3 of the License, or (at
-# your option) any later version.
-# 
-# Octave is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with Octave; see the file COPYING.  If not, see
-# <http://www.gnu.org/licenses/>.
-
-TOPDIR = ../../..
-
-script_sub_dir = statistics/base
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-
-include $(TOPDIR)/Makeconf
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-
-SOURCES = __quantile__.m center.m cloglog.m cor.m corrcoef.m cov.m \
-  cut.m gls.m histc.m iqr.m kendall.m kurtosis.m logit.m mahalanobis.m \
-  mean.m meansq.m median.m mode.m moment.m ols.m ppplot.m prctile.m probit.m \
-  qqplot.m quantile.m range.m ranks.m run_count.m skewness.m spearman.m \
-  statistics.m std.m studentize.m table.m values.m var.m
-
-DISTFILES = $(addprefix $(srcdir)/, Makefile.in $(SOURCES))
-
-FCN_FILES = $(addprefix $(srcdir)/, $(SOURCES))
-FCN_FILES_NO_DIR = $(notdir $(FCN_FILES))
-
-all: PKG_ADD
-.PHONY: all
-
-install install-strip:
-	$(do-script-install)
-.PHONY: install install-strip
-
-uninstall:
-	$(do-script-uninstall)
-.PHONY: uninstall
-
-clean:
-.PHONY: clean
-
-PKG_ADD: $(FCN_FILES)
-	@echo "making PKG_ADD"
-	@$(do-mkpkgadd)
-
-tags: $(SOURCES)
-	ctags $(SOURCES)
-
-TAGS: $(SOURCES)
-	etags $(SOURCES)
-
-mostlyclean: clean
-.PHONY: mostlyclean
-
-distclean: clean
-	rm -f Makefile PKG_ADD
-.PHONY: distclean
-
-maintainer-clean: distclean
-	rm -f tags TAGS
-.PHONY: maintainer-clean
-
-dist:
-	ln $(DISTFILES) ../../../`cat ../../../.fname`/scripts/$(script_sub_dir)
-.PHONY: dist
-
-check-m-sources:
-	@$(do-check-m-sources)
-.PHONY: check-m-sources
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/statistics/base/module.mk	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,43 @@
+FCN_FILE_DIRS += statistics/base
+
+statistics_base_FCN_FILES = \
+  statistics/base/__quantile__.m \
+  statistics/base/center.m \
+  statistics/base/cloglog.m \
+  statistics/base/cor.m \
+  statistics/base/corrcoef.m \
+  statistics/base/cov.m \
+  statistics/base/cut.m \
+  statistics/base/gls.m \
+  statistics/base/histc.m \
+  statistics/base/iqr.m \
+  statistics/base/kendall.m \
+  statistics/base/kurtosis.m \
+  statistics/base/logit.m \
+  statistics/base/mahalanobis.m \
+  statistics/base/mean.m \
+  statistics/base/meansq.m \
+  statistics/base/median.m \
+  statistics/base/mode.m \
+  statistics/base/moment.m \
+  statistics/base/ols.m \
+  statistics/base/ppplot.m \
+  statistics/base/prctile.m \
+  statistics/base/probit.m \
+  statistics/base/qqplot.m \
+  statistics/base/quantile.m \
+  statistics/base/range.m \
+  statistics/base/ranks.m \
+  statistics/base/run_count.m \
+  statistics/base/skewness.m \
+  statistics/base/spearman.m \
+  statistics/base/statistics.m \
+  statistics/base/std.m \
+  statistics/base/studentize.m \
+  statistics/base/table.m \
+  statistics/base/values.m \
+  statistics/base/var.m
+
+FCN_FILES += $(statistics_base_FCN_FILES)
+
+PKG_ADD_FILES += statistics/base/PKG_ADD
--- a/scripts/statistics/distributions/Makefile.in	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,100 +0,0 @@
-# Makefile for octave's scripts/statistics/distributions directory
-#
-# Copyright (C) 1998, 2002, 2005, 2006, 2007, 2008 John W. Eaton
-#
-# This file is part of Octave.
-# 
-# Octave is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 3 of the License, or (at
-# your option) any later version.
-# 
-# Octave is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with Octave; see the file COPYING.  If not, see
-# <http://www.gnu.org/licenses/>.
-
-TOPDIR = ../../..
-
-script_sub_dir = statistics/distributions
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-
-include $(TOPDIR)/Makeconf
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-
-SOURCES = betacdf.m betainv.m betapdf.m betarnd.m binocdf.m \
-  binoinv.m binopdf.m binornd.m cauchy_cdf.m cauchy_inv.m \
-  cauchy_pdf.m cauchy_rnd.m chi2cdf.m chi2inv.m chi2pdf.m \
-  chi2rnd.m discrete_cdf.m discrete_inv.m discrete_pdf.m \
-  discrete_rnd.m empirical_cdf.m empirical_inv.m empirical_pdf.m \
-  empirical_rnd.m expcdf.m expinv.m exppdf.m exprnd.m fcdf.m \
-  finv.m fpdf.m frnd.m gamcdf.m gaminv.m gampdf.m gamrnd.m \
-  geocdf.m geoinv.m geopdf.m geornd.m hygecdf.m hygeinv.m \
-  hygepdf.m hygernd.m kolmogorov_smirnov_cdf.m laplace_cdf.m \
-  laplace_inv.m laplace_pdf.m laplace_rnd.m logistic_cdf.m \
-  logistic_inv.m logistic_pdf.m logistic_rnd.m logncdf.m \
-  logninv.m lognpdf.m lognrnd.m nbincdf.m nbininv.m nbinpdf.m \
-  nbinrnd.m normcdf.m norminv.m normpdf.m normrnd.m \
-  poisscdf.m poissinv.m poisspdf.m poissrnd.m stdnormal_cdf.m \
-  stdnormal_inv.m stdnormal_pdf.m stdnormal_rnd.m tcdf.m tinv.m \
-  tpdf.m trnd.m unidrnd.m unidcdf.m unidinv.m unidpdf.m unifrnd.m \
-  unifcdf.m unifinv.m unifpdf.m wblcdf.m wblinv.m wblpdf.m wblrnd.m \
-  wienrnd.m
-
-DISTFILES = $(addprefix $(srcdir)/, Makefile.in $(SOURCES))
-
-FCN_FILES = $(addprefix $(srcdir)/, $(SOURCES))
-FCN_FILES_NO_DIR = $(notdir $(FCN_FILES))
-
-all: PKG_ADD
-.PHONY: all
-
-install install-strip:
-	$(do-script-install)
-.PHONY: install install-strip
-
-uninstall:
-	$(do-script-uninstall)
-.PHONY: uninstall
-
-clean:
-.PHONY: clean
-
-PKG_ADD: $(FCN_FILES)
-	@echo "making PKG_ADD"
-	@$(do-mkpkgadd)
-
-tags: $(SOURCES)
-	ctags $(SOURCES)
-
-TAGS: $(SOURCES)
-	etags $(SOURCES)
-
-mostlyclean: clean
-.PHONY: mostlyclean
-
-distclean: clean
-	rm -f Makefile PKG_ADD
-.PHONY: distclean
-
-maintainer-clean: distclean
-	rm -f tags TAGS
-.PHONY: maintainer-clean
-
-dist:
-	ln $(DISTFILES) ../../../`cat ../../../.fname`/scripts/$(script_sub_dir)
-.PHONY: dist
-
-check-m-sources:
-	@$(do-check-m-sources)
-.PHONY: check-m-sources
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/statistics/distributions/module.mk	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,97 @@
+FCN_FILE_DIRS += statistics/distributions
+
+statistics_distributions_FCN_FILES = \
+  statistics/distributions/betacdf.m \
+  statistics/distributions/betainv.m \
+  statistics/distributions/betapdf.m \
+  statistics/distributions/betarnd.m \
+  statistics/distributions/binocdf.m \
+  statistics/distributions/binoinv.m \
+  statistics/distributions/binopdf.m \
+  statistics/distributions/binornd.m \
+  statistics/distributions/cauchy_cdf.m \
+  statistics/distributions/cauchy_inv.m \
+  statistics/distributions/cauchy_pdf.m \
+  statistics/distributions/cauchy_rnd.m \
+  statistics/distributions/chi2cdf.m \
+  statistics/distributions/chi2inv.m \
+  statistics/distributions/chi2pdf.m \
+  statistics/distributions/chi2rnd.m \
+  statistics/distributions/discrete_cdf.m \
+  statistics/distributions/discrete_inv.m \
+  statistics/distributions/discrete_pdf.m \
+  statistics/distributions/discrete_rnd.m \
+  statistics/distributions/empirical_cdf.m \
+  statistics/distributions/empirical_inv.m \
+  statistics/distributions/empirical_pdf.m \
+  statistics/distributions/empirical_rnd.m \
+  statistics/distributions/expcdf.m \
+  statistics/distributions/expinv.m \
+  statistics/distributions/exppdf.m \
+  statistics/distributions/exprnd.m \
+  statistics/distributions/fcdf.m \
+  statistics/distributions/finv.m \
+  statistics/distributions/fpdf.m \
+  statistics/distributions/frnd.m \
+  statistics/distributions/gamcdf.m \
+  statistics/distributions/gaminv.m \
+  statistics/distributions/gampdf.m \
+  statistics/distributions/gamrnd.m \
+  statistics/distributions/geocdf.m \
+  statistics/distributions/geoinv.m \
+  statistics/distributions/geopdf.m \
+  statistics/distributions/geornd.m \
+  statistics/distributions/hygecdf.m \
+  statistics/distributions/hygeinv.m \
+  statistics/distributions/hygepdf.m \
+  statistics/distributions/hygernd.m \
+  statistics/distributions/kolmogorov_smirnov_cdf.m \
+  statistics/distributions/laplace_cdf.m \
+  statistics/distributions/laplace_inv.m \
+  statistics/distributions/laplace_pdf.m \
+  statistics/distributions/laplace_rnd.m \
+  statistics/distributions/logistic_cdf.m \
+  statistics/distributions/logistic_inv.m \
+  statistics/distributions/logistic_pdf.m \
+  statistics/distributions/logistic_rnd.m \
+  statistics/distributions/logncdf.m \
+  statistics/distributions/logninv.m \
+  statistics/distributions/lognpdf.m \
+  statistics/distributions/lognrnd.m \
+  statistics/distributions/nbincdf.m \
+  statistics/distributions/nbininv.m \
+  statistics/distributions/nbinpdf.m \
+  statistics/distributions/nbinrnd.m \
+  statistics/distributions/normcdf.m \
+  statistics/distributions/norminv.m \
+  statistics/distributions/normpdf.m \
+  statistics/distributions/normrnd.m \
+  statistics/distributions/poisscdf.m \
+  statistics/distributions/poissinv.m \
+  statistics/distributions/poisspdf.m \
+  statistics/distributions/poissrnd.m \
+  statistics/distributions/stdnormal_cdf.m \
+  statistics/distributions/stdnormal_inv.m \
+  statistics/distributions/stdnormal_pdf.m \
+  statistics/distributions/stdnormal_rnd.m \
+  statistics/distributions/tcdf.m \
+  statistics/distributions/tinv.m \
+  statistics/distributions/tpdf.m \
+  statistics/distributions/trnd.m \
+  statistics/distributions/unidrnd.m \
+  statistics/distributions/unidcdf.m \
+  statistics/distributions/unidinv.m \
+  statistics/distributions/unidpdf.m \
+  statistics/distributions/unifrnd.m \
+  statistics/distributions/unifcdf.m \
+  statistics/distributions/unifinv.m \
+  statistics/distributions/unifpdf.m \
+  statistics/distributions/wblcdf.m \
+  statistics/distributions/wblinv.m \
+  statistics/distributions/wblpdf.m \
+  statistics/distributions/wblrnd.m \
+  statistics/distributions/wienrnd.m
+
+FCN_FILES += $(statistics_distributions_FCN_FILES)
+
+PKG_ADD_FILES += statistics/distributions/PKG_ADD
--- a/scripts/statistics/models/Makefile.in	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,84 +0,0 @@
-# Makefile for octave's scripts/statistics/models directory
-#
-# Copyright (C) 1998, 2002, 2005, 2006, 2007, 2008 John W. Eaton
-#
-# This file is part of Octave.
-# 
-# Octave is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 3 of the License, or (at
-# your option) any later version.
-# 
-# Octave is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with Octave; see the file COPYING.  If not, see
-# <http://www.gnu.org/licenses/>.
-
-TOPDIR = ../../..
-
-script_sub_dir = statistics/models
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-
-include $(TOPDIR)/Makeconf
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-
-SOURCES = logistic_regression.m logistic_regression_derivatives.m \
-  logistic_regression_likelihood.m
-
-DISTFILES = $(addprefix $(srcdir)/, Makefile.in $(SOURCES))
-
-FCN_FILES = $(addprefix $(srcdir)/, $(SOURCES))
-FCN_FILES_NO_DIR = $(notdir $(FCN_FILES))
-
-all: PKG_ADD
-.PHONY: all
-
-install install-strip:
-	$(do-script-install)
-.PHONY: install install-strip
-
-uninstall:
-	$(do-script-uninstall)
-.PHONY: uninstall
-
-clean:
-.PHONY: clean
-
-PKG_ADD: $(FCN_FILES)
-	@echo "making PKG_ADD"
-	@$(do-mkpkgadd)
-
-tags: $(SOURCES)
-	ctags $(SOURCES)
-
-TAGS: $(SOURCES)
-	etags $(SOURCES)
-
-mostlyclean: clean
-.PHONY: mostlyclean
-
-distclean: clean
-	rm -f Makefile PKG_ADD
-.PHONY: distclean
-
-maintainer-clean: distclean
-	rm -f tags TAGS
-.PHONY: maintainer-clean
-
-dist:
-	ln $(DISTFILES) ../../../`cat ../../../.fname`/scripts/$(script_sub_dir)
-.PHONY: dist
-
-check-m-sources:
-	@$(do-check-m-sources)
-.PHONY: check-m-sources
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/statistics/models/module.mk	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,10 @@
+FCN_FILE_DIRS += statistics/models
+
+statistics_models_FCN_FILES = \
+  statistics/models/logistic_regression.m \
+  statistics/models/logistic_regression_derivatives.m \
+  statistics/models/logistic_regression_likelihood.m
+
+FCN_FILES += $(statistics_models_FCN_FILES)
+
+PKG_ADD_FILES += statistics/models/PKG_ADD
--- a/scripts/statistics/tests/Makefile.in	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,89 +0,0 @@
-# Makefile for octave's scripts/statistics/tests directory
-#
-# Copyright (C) 1998, 2002, 2005, 2006, 2007, 2008 John W. Eaton
-#
-# This file is part of Octave.
-# 
-# Octave is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 3 of the License, or (at
-# your option) any later version.
-# 
-# Octave is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with Octave; see the file COPYING.  If not, see
-# <http://www.gnu.org/licenses/>.
-
-TOPDIR = ../../..
-
-script_sub_dir = statistics/tests
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-
-include $(TOPDIR)/Makeconf
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-
-SOURCES = anova.m bartlett_test.m chisquare_test_homogeneity.m \
-  chisquare_test_independence.m cor_test.m f_test_regression.m \
-  hotelling_test.m hotelling_test_2.m kolmogorov_smirnov_test.m \
-  kolmogorov_smirnov_test_2.m kruskal_wallis_test.m manova.m \
-  mcnemar_test.m prop_test_2.m run_test.m sign_test.m t_test.m \
-  t_test_2.m t_test_regression.m u_test.m var_test.m welch_test.m \
-  wilcoxon_test.m z_test.m z_test_2.m
-
-DISTFILES = $(addprefix $(srcdir)/, Makefile.in $(SOURCES))
-
-FCN_FILES = $(addprefix $(srcdir)/, $(SOURCES))
-FCN_FILES_NO_DIR = $(notdir $(FCN_FILES))
-
-all: PKG_ADD
-.PHONY: all
-
-install install-strip:
-	$(do-script-install)
-.PHONY: install install-strip
-
-uninstall:
-	$(do-script-uninstall)
-.PHONY: uninstall
-
-clean:
-.PHONY: clean
-
-PKG_ADD: $(FCN_FILES)
-	@echo "making PKG_ADD"
-	@$(do-mkpkgadd)
-
-tags: $(SOURCES)
-	ctags $(SOURCES)
-
-TAGS: $(SOURCES)
-	etags $(SOURCES)
-
-mostlyclean: clean
-.PHONY: mostlyclean
-
-distclean: clean
-	rm -f Makefile PKG_ADD
-.PHONY: distclean
-
-maintainer-clean: distclean
-	rm -f tags TAGS
-.PHONY: maintainer-clean
-
-dist:
-	ln $(DISTFILES) ../../../`cat ../../../.fname`/scripts/$(script_sub_dir)
-.PHONY: dist
-
-check-m-sources:
-	@$(do-check-m-sources)
-.PHONY: check-m-sources
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/statistics/tests/module.mk	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,32 @@
+FCN_FILE_DIRS += statistics/tests
+
+statistics_tests_FCN_FILES = \
+  statistics/tests/anova.m \
+  statistics/tests/bartlett_test.m \
+  statistics/tests/chisquare_test_homogeneity.m \
+  statistics/tests/chisquare_test_independence.m \
+  statistics/tests/cor_test.m \
+  statistics/tests/f_test_regression.m \
+  statistics/tests/hotelling_test.m \
+  statistics/tests/hotelling_test_2.m \
+  statistics/tests/kolmogorov_smirnov_test.m \
+  statistics/tests/kolmogorov_smirnov_test_2.m \
+  statistics/tests/kruskal_wallis_test.m \
+  statistics/tests/manova.m \
+  statistics/tests/mcnemar_test.m \
+  statistics/tests/prop_test_2.m \
+  statistics/tests/run_test.m \
+  statistics/tests/sign_test.m \
+  statistics/tests/t_test.m \
+  statistics/tests/t_test_2.m \
+  statistics/tests/t_test_regression.m \
+  statistics/tests/u_test.m \
+  statistics/tests/var_test.m \
+  statistics/tests/welch_test.m \
+  statistics/tests/wilcoxon_test.m \
+  statistics/tests/z_test.m \
+  statistics/tests/z_test_2.m
+
+FCN_FILES += $(statistics_tests_FCN_FILES)
+
+PKG_ADD_FILES += statistics/tests/PKG_ADD
--- a/scripts/strings/Makefile.in	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,89 +0,0 @@
-# Makefile for octave's scripts/strings directory
-#
-# Copyright (C) 1994, 1995, 1996, 1997, 2002, 2005, 2006, 2007, 2008, 2009
-#               John W. Eaton
-#
-# This file is part of Octave.
-# 
-# Octave is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 3 of the License, or (at
-# your option) any later version.
-# 
-# Octave is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with Octave; see the file COPYING.  If not, see
-# <http://www.gnu.org/licenses/>.
-
-TOPDIR = ../..
-
-script_sub_dir = strings
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-
-include $(TOPDIR)/Makeconf
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-
-SOURCES = base2dec.m bin2dec.m blanks.m deblank.m dec2base.m \
-  dec2bin.m dec2hex.m findstr.m hex2dec.m index.m isletter.m isstrprop.m \
-  mat2str.m regexptranslate.m rindex.m strsplit.m str2double.m \
-  str2num.m strcat.m cstrcat.m strcmpi.m strchr.m strfind.m strjust.m strmatch.m \
-  strncmpi.m strrep.m strtok.m strtrim.m strtrunc.m \
-  substr.m validatestring.m
-
-DISTFILES = $(addprefix $(srcdir)/, Makefile.in $(SOURCES))
-
-FCN_FILES = $(addprefix $(srcdir)/, $(SOURCES))
-FCN_FILES_NO_DIR = $(notdir $(FCN_FILES))
-
-all: PKG_ADD
-.PHONY: all
-
-install install-strip:
-	$(do-script-install)
-.PHONY: install install-strip
-
-uninstall:
-	$(do-script-uninstall)
-.PHONY: uninstall
-
-clean:
-.PHONY: clean
-
-PKG_ADD: $(FCN_FILES)
-	@echo "making PKG_ADD"
-	@$(do-mkpkgadd)
-
-tags: $(SOURCES)
-	ctags $(SOURCES)
-
-TAGS: $(SOURCES)
-	etags $(SOURCES)
-
-mostlyclean: clean
-.PHONY: mostlyclean
-
-distclean: clean
-	rm -f Makefile PKG_ADD
-.PHONY: distclean
-
-maintainer-clean: distclean
-	rm -f tags TAGS
-.PHONY: maintainer-clean
-
-dist:
-	ln $(DISTFILES) ../../`cat ../../.fname`/scripts/strings
-.PHONY: dist
-
-check-m-sources:
-	@$(do-check-m-sources)
-.PHONY: check-m-sources
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/strings/module.mk	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,39 @@
+FCN_FILE_DIRS += strings
+
+strings_FCN_FILES = \
+  strings/base2dec.m \
+  strings/bin2dec.m \
+  strings/blanks.m \
+  strings/deblank.m \
+  strings/dec2base.m \
+  strings/dec2bin.m \
+  strings/dec2hex.m \
+  strings/findstr.m \
+  strings/hex2dec.m \
+  strings/index.m \
+  strings/isletter.m \
+  strings/isstrprop.m \
+  strings/mat2str.m \
+  strings/regexptranslate.m \
+  strings/rindex.m \
+  strings/strsplit.m \
+  strings/str2double.m \
+  strings/str2num.m \
+  strings/strcat.m \
+  strings/cstrcat.m \
+  strings/strcmpi.m \
+  strings/strchr.m \
+  strings/strfind.m \
+  strings/strjust.m \
+  strings/strmatch.m \
+  strings/strncmpi.m \
+  strings/strrep.m \
+  strings/strtok.m \
+  strings/strtrim.m \
+  strings/strtrunc.m \
+  strings/substr.m \
+  strings/validatestring.m
+
+FCN_FILES += $(strings_FCN_FILES)
+
+PKG_ADD_FILES += strings/PKG_ADD
--- a/scripts/testfun/Makefile.in	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,83 +0,0 @@
-# Makefile for octave's scripts/testfun directory
-#
-# Copyright (C) 2006, 2007, 2008, 2009 John W. Eaton
-#
-# This file is part of Octave.
-# 
-# Octave is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 3 of the License, or (at
-# your option) any later version.
-# 
-# Octave is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with Octave; see the file COPYING.  If not, see
-# <http://www.gnu.org/licenses/>.
-
-TOPDIR = ../..
-
-script_sub_dir = testfun
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-
-include $(TOPDIR)/Makeconf
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-
-SOURCES = assert.m demo.m example.m fail.m rundemos.m speed.m test.m
-
-DISTFILES = $(addprefix $(srcdir)/, Makefile.in $(SOURCES))
-
-FCN_FILES = $(addprefix $(srcdir)/, $(SOURCES))
-FCN_FILES_NO_DIR = $(notdir $(FCN_FILES))
-
-all: PKG_ADD
-.PHONY: all
-
-install install-strip:
-	$(do-script-install)
-.PHONY: install install-strip
-
-uninstall:
-	$(do-script-uninstall)
-.PHONY: uninstall
-
-clean:
-.PHONY: clean
-
-PKG_ADD: $(FCN_FILES)
-	@echo "making PKG_ADD"
-	@$(do-mkpkgadd)
-
-tags: $(SOURCES)
-	ctags $(SOURCES)
-
-TAGS: $(SOURCES)
-	etags $(SOURCES)
-
-mostlyclean: clean
-.PHONY: mostlyclean
-
-distclean: clean
-	rm -f Makefile PKG_ADD
-.PHONY: distclean
-
-maintainer-clean: distclean
-	rm -f tags TAGS
-.PHONY: maintainer-clean
-
-dist:
-	ln $(DISTFILES) ../../`cat ../../.fname`/scripts/testfun
-.PHONY: dist
-
-check-m-sources:
-	@$(do-check-m-sources)
-.PHONY: check-m-sources
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/testfun/module.mk	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,14 @@
+FCN_FILE_DIRS += testfun
+
+testfun_FCN_FILES = \
+  testfun/assert.m \
+  testfun/demo.m \
+  testfun/example.m \
+  testfun/fail.m \
+  testfun/rundemos.m \
+  testfun/speed.m \
+  testfun/test.m
+
+FCN_FILES += $(testfun_FCN_FILES)
+
+PKG_ADD_FILES += testfun/PKG_ADD
--- a/scripts/time/Makefile.in	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,85 +0,0 @@
-# Makefile for octave's scripts/time directory
-#
-# Copyright (C) 1995, 1996, 1997, 2002, 2005, 2006, 2007, 2008 John W. Eaton
-#
-# This file is part of Octave.
-# 
-# Octave is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 3 of the License, or (at
-# your option) any later version.
-# 
-# Octave is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with Octave; see the file COPYING.  If not, see
-# <http://www.gnu.org/licenses/>.
-
-TOPDIR = ../..
-
-script_sub_dir = time
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-
-include $(TOPDIR)/Makeconf
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-
-SOURCES = addtodate.m asctime.m calendar.m clock.m ctime.m date.m \
-  datenum.m datestr.m datetick.m datevec.m eomday.m etime.m is_leap_year.m \
-  now.m weekday.m
-
-DISTFILES = $(addprefix $(srcdir)/, Makefile.in $(SOURCES))
-
-FCN_FILES = $(addprefix $(srcdir)/, $(SOURCES))
-FCN_FILES_NO_DIR = $(notdir $(FCN_FILES))
-
-all: PKG_ADD
-.PHONY: all
-
-install install-strip:
-	$(do-script-install)
-.PHONY: install install-strip
-
-uninstall:
-	$(do-script-uninstall)
-.PHONY: uninstall
-
-clean:
-.PHONY: clean
-
-PKG_ADD: $(FCN_FILES)
-	@echo "making PKG_ADD"
-	@$(do-mkpkgadd)
-
-tags: $(SOURCES)
-	ctags $(SOURCES)
-
-TAGS: $(SOURCES)
-	etags $(SOURCES)
-
-mostlyclean: clean
-.PHONY: mostlyclean
-
-distclean: clean
-	rm -f Makefile PKG_ADD
-.PHONY: distclean
-
-maintainer-clean: distclean
-	rm -f tags TAGS
-.PHONY: maintainer-clean
-
-dist:
-	ln $(DISTFILES) ../../`cat ../../.fname`/scripts/time
-.PHONY: dist
-
-check-m-sources:
-	@$(do-check-m-sources)
-.PHONY: check-m-sources
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/time/module.mk	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,22 @@
+FCN_FILE_DIRS += time
+
+time_FCN_FILES = \
+  time/addtodate.m \
+  time/asctime.m \
+  time/calendar.m \
+  time/clock.m \
+  time/ctime.m \
+  time/date.m \
+  time/datenum.m \
+  time/datestr.m \
+  time/datetick.m \
+  time/datevec.m \
+  time/eomday.m \
+  time/etime.m \
+  time/is_leap_year.m \
+  time/now.m \
+  time/weekday.m
+
+FCN_FILES += $(time_FCN_FILES)
+
+PKG_ADD_FILES += time/PKG_ADD
--- a/src/ChangeLog	Tue Nov 10 13:25:57 2009 -0500
+++ b/src/ChangeLog	Tue Nov 10 15:02:25 2009 -0500
@@ -1,3 +1,20 @@
+2009-11-10  John W. Eaton  <jwe@octave.org>
+
+	* Makefile.am, OPERATORS/module.mk, TEMPLATE-INST/module.mk,
+	find-defun-files.sh, version.h.in,
+	DLD-FUNCTIONS/config-module.awk, DLD-FUNCTIONS/config-module.sh,
+	DLD-FUNCTIONS/module-files: New files.
+	* Makefile.in, version.h: Delete.
+	* lex.ll: Rename from lex.l.  Include oct-parse.h instead of
+	y.tab.h.
+	* parse.yy: Rename from parse.y
+	* mkbuiltins, mkgendoc: Don't require filenames to start with a
+	"." at beginning of line.
+
+	* oct-conf.h.in (OCTAVE_CONF_LAPACK_LIBS): Delete macro.
+	* toplev.cc (octave_config_info): Don't include LAPACK_LIBS in the
+	struct.
+
 2009-11-10  Jaroslav Hajek  <highegg@gmail.com>
 
 	* ov-class.cc (octave_class::numel): Use base version if called from
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/DLD-FUNCTIONS/config-module.awk	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,47 @@
+BEGIN {
+  print "## DO NOT EDIT -- generated from module-files by config-module.awk";
+  nfiles = 0;
+} {
+  files[++nfiles] = $1;
+} END {
+  sep = " \\\n";
+  print "DLD_FUNCTIONS_LIBS = \\";
+  for (i = 1; i <= nfiles; i++) {
+    basename = files[i];
+    sub (/\.cc$/, "", basename);
+    if (i == nfiles)
+      sep = "\n";
+    printf ("  DLD-FUNCTIONS/%s.la%s", basename, sep);
+  }
+  print "octlib_LTLIBRARIES += $(DLD_FUNCTIONS_LIBS)";
+  print "if AMCOND_ENABLE_DYNAMIC_LINKING";
+  for (i = 1; i <= nfiles; i++) {
+    basename = files[i];
+    sub (/\.cc$/, "", basename);
+    printf ("DLD-FUNCTIONS/%s.oct: DLD-FUNCTIONS/%s.la\n", basename, basename);
+    print "\trm -f $@";
+    print "\tla=`echo $< | $(SED) 's,DLD-FUNCTIONS/,,'` && \\";
+    print "\t  of=`echo $@ | $(SED) 's,DLD-FUNCTIONS/,,'` && \\";
+    print "\t  cd DLD-FUNCTIONS && \\";
+    print "\t  $(LN_S) .libs/`$(SED) -n -e \"s/dlname='\\([^']*\\)'/\\1/p\" < $$la` $$of";
+  }
+  print "endif";
+
+  for (i = 1; i <= nfiles; i++) {
+    basename = files[i];
+    sub (/\.cc$/, "", basename);
+    printf ("DLD_FUNCTIONS_%s_la_SOURCES = DLD-FUNCTIONS/%s\n",
+	    basename, files[i]);
+    printf ("DLD_FUNCTIONS_%s_la_LDFLAGS = @NO_UNDEFINED_LDFLAG@ -module\n",
+	    basename);
+    printf ("DLD_FUNCTIONS_%s_la_LIBADD = $(OCT_LINK_DEPS)\n", basename);
+  }
+
+  sep = " \\\n";
+  print "DLD_FUNCTIONS_SRC = \\";
+  for (i = 1; i <= nfiles; i++) {
+    if (i == nfiles)
+      sep = "\n";
+    printf ("  DLD-FUNCTIONS/%s%s", files[i], sep);
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/DLD-FUNCTIONS/config-module.sh	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,9 @@
+#! /bin/sh
+
+set -e
+
+: ${AWK=awk}
+
+$AWK -f config-module.awk < module-files > module.mk-t
+
+../../move-if-change module.mk-t module.mk
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/DLD-FUNCTIONS/module-files	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,76 @@
+__contourc__.cc
+__convn__.cc
+__delaunayn__.cc
+__dsearchn__.cc
+__glpk__.cc
+__lin_interpn__.cc
+__magick_read__.cc
+__pchip_deriv__.cc
+__qp__.cc
+__voronoi__.cc
+amd.cc
+balance.cc
+besselj.cc
+betainc.cc
+bsxfun.cc
+ccolamd.cc
+cellfun.cc
+chol.cc
+colamd.cc
+colloc.cc
+conv2.cc
+convhulln.cc
+daspk.cc
+dasrt.cc
+dassl.cc
+det.cc
+dispatch.cc
+dlmread.cc
+dmperm.cc
+eig.cc
+eigs.cc
+fft.cc
+fft2.cc
+fftn.cc
+fftw.cc
+filter.cc
+find.cc
+fltk_backend.cc
+gammainc.cc
+gcd.cc
+getgrent.cc
+getpwent.cc
+getrusage.cc
+givens.cc
+hess.cc
+hex2num.cc
+inv.cc
+kron.cc
+lookup.cc
+lsode.cc
+lu.cc
+luinc.cc
+matrix_type.cc
+max.cc
+md5sum.cc
+pinv.cc
+qr.cc
+quad.cc
+qz.cc
+rand.cc
+rcond.cc
+regexp.cc
+schur.cc
+sparse.cc
+spparms.cc
+sqrtm.cc
+sub2ind.cc
+svd.cc
+syl.cc
+symbfact.cc
+symrcm.cc
+time.cc
+tril.cc
+tsearch.cc
+typecast.cc
+urlwrite.cc
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/Makefile.am	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,798 @@
+# Makefile for octave's src directory
+#
+# Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+#               2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 John W. Eaton
+#
+# This file is part of Octave.
+# 
+# Octave is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation; either version 3 of the License, or (at
+# your option) any later version.
+# 
+# Octave is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with Octave; see the file COPYING.  If not, see
+# <http://www.gnu.org/licenses/>.
+
+TOPDIR = ..
+
+include ../common.mk
+
+octlib_LTLIBRARIES = \
+  liboctinterp.la
+
+AM_CPPFLAGS = \
+  @CPPFLAGS@ -I$(top_srcdir)/libcruft/misc -I../liboctave -I$(top_srcdir)/liboctave -I. -I$(srcdir) 
+
+AUTOMAKE_OPTIONS = subdir-objects
+
+BUILT_DISTFILES = \
+  DOCSTRINGS \
+  oct-gperf.h \
+  oct-parse.cc \
+  oct-parse.h \
+  lex.cc \
+  $(OPT_HANDLERS) \
+  $(OPT_INC)
+
+EXTRA_DIST = \
+  ChangeLog \
+  Makefile.in \
+  defaults.h.in \
+  find-defun-files.sh \
+  genprops.awk \
+  graphics.h.in \
+  mk-errno-list \
+  mk-pkg-add \
+  mkbuiltins \
+  mkdefs \
+  mkgendoc \
+  mkops \
+  mxarray.h.in \
+  oct-conf.h.in \
+  oct-errno.cc.in \
+  octave.gperf \
+  $(BUILT_DISTFILES)
+
+DLL_CDEFS = @OCTINTERP_DLL_DEFS@
+DLL_CXXDEFS = @OCTINTERP_DLL_DEFS@
+
+.cc.df:	
+	@echo making $@ from $<
+	@(echo "// DO NOT EDIT!  Generated automatically by mkdefs." ; \
+	  echo " XDEFUN_FILE_NAME (\"$<\")" ; \
+	  egrep '^(///*|/\*) *PKG_ADD:' $< ; \
+	  $(CXXCPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	    $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) \
+	    -DMAKE_BUILTINS $< | $(srcdir)/mkdefs) > $@-t
+	@mv $@-t $@
+
+OPT_HANDLERS = \
+  DASPK-opts.cc \
+  DASRT-opts.cc \
+  DASSL-opts.cc \
+  LSODE-opts.cc \
+  Quad-opts.cc
+
+OPT_IN = \
+  ../liboctave/DASPK-opts.in \
+  ../liboctave/DASRT-opts.in \
+  ../liboctave/DASSL-opts.in \
+  ../liboctave/LSODE-opts.in \
+  ../liboctave/Quad-opts.in
+
+OPT_INC = \
+  ../liboctave/DASPK-opts.h \
+  ../liboctave/DASRT-opts.h \
+  ../liboctave/DASSL-opts.h \
+  ../liboctave/LSODE-opts.h \
+  ../liboctave/Quad-opts.h
+
+OV_INTTYPE_INC = \
+  ov-base-int.h \
+  ov-base-int.cc \
+  ov-int-traits.h \
+  ov-int16.h \
+  ov-int32.h \
+  ov-int64.h \
+  ov-int8.h \
+  ov-intx.h \
+  ov-uint16.h \
+  ov-uint32.h \
+  ov-uint64.h \
+  ov-uint8.h
+
+OV_INCLUDES = \
+  ov-base-diag.h \
+  ov-base-diag.cc \
+  ov-base-mat.h \
+  ov-base-mat.cc \
+  ov-base-scalar.h \
+  ov-base-scalar.cc \
+  ov-base.h \
+  ov-bool-mat.h \
+  ov-bool-mat.cc \
+  ov-bool.h \
+  ov-builtin.h \
+  ov-cell.h \
+  ov-ch-mat.h \
+  ov-class.h \
+  ov-colon.h \
+  ov-complex.h \
+  ov-cs-list.h \
+  ov-cx-diag.h \
+  ov-cx-mat.h \
+  ov-dld-fcn.h \
+  ov-fcn-handle.h \
+  ov-fcn-inline.h \
+  ov-fcn.h \
+  ov-float.h \
+  ov-flt-complex.h \
+  ov-flt-cx-diag.h \
+  ov-flt-cx-mat.h \
+  ov-flt-re-diag.h \
+  ov-flt-re-mat.h \
+  ov-list.h \
+  ov-mex-fcn.h \
+  ov-null-mat.h \
+  ov-perm.h \
+  ov-range.h \
+  ov-re-diag.h \
+  ov-re-mat.h \
+  ov-scalar.h \
+  ov-str-mat.h \
+  ov-struct.h \
+  ov-type-conv.h \
+  ov-typeinfo.h \
+  ov-usr-fcn.h \
+  ov.h \
+  $(OV_INTTYPE_INC)
+
+OV_SPARSE_INCLUDES = \
+  ov-base-sparse.h \
+  ov-bool-sparse.h \
+  ov-cx-sparse.h \
+  ov-re-sparse.h
+
+PT_INCLUDES = \
+  pt-all.h \
+  pt-arg-list.h \
+  pt-assign.h \
+  pt-binop.h \
+  pt-bp.h \
+  pt-cbinop.h \
+  pt-cell.h \
+  pt-check.h \
+  pt-cmd.h \
+  pt-colon.h \
+  pt-const.h \
+  pt-decl.h \
+  pt-eval.h \
+  pt-except.h \
+  pt-exp.h \
+  pt-fcn-handle.h \
+  pt-id.h \
+  pt-idx.h \
+  pt-jump.h \
+  pt-loop.h \
+  pt-mat.h \
+  pt-misc.h \
+  pt-pr-code.h \
+  pt-select.h \
+  pt-stmt.h \
+  pt-unop.h \
+  pt-walk.h \
+  pt.h
+
+octinclude_HEADERS = \
+  Cell.h \
+  base-list.h \
+  builtins.h \
+  c-file-ptr-stream.h \
+  comment-list.h \
+  debug.h \
+  defaults.h \
+  defun-dld.h \
+  defun-int.h \
+  defun.h \
+  dirfns.h \
+  display.h \
+  dynamic-ld.h \
+  error.h \
+  file-io.h \
+  gl-render.h \
+  graphics.h \
+  graphics-props.cc \
+  gripes.h \
+  help.h \
+  input.h \
+  lex.h \
+  load-path.h \
+  load-save.h \
+  ls-ascii-helper.h \
+  ls-hdf5.h \
+  ls-mat-ascii.h \
+  ls-mat4.h \
+  ls-mat5.h \
+  ls-oct-ascii.h \
+  ls-oct-binary.h \
+  ls-utils.h \
+  mex.h \
+  mexproto.h \
+  mxarray.h \
+  oct-conf.h \
+  oct-errno.h \
+  oct-fstrm.h \
+  oct-gperf.h \
+  oct-hdf5.h \
+  oct-hist.h \
+  oct-iostrm.h \
+  oct-lvalue.h \
+  oct-map.h \
+  oct-obj.h \
+  oct-prcstrm.h \
+  oct-procbuf.h \
+  oct-stdstrm.h \
+  oct-stream.h \
+  oct-strstrm.h \
+  oct.h \
+  octave.h \
+  ops.h \
+  pager.h \
+  parse.h \
+  pr-output.h \
+  procstream.h \
+  sighandlers.h \
+  siglist.h \
+  sparse-xdiv.h \
+  sparse-xpow.h \
+  symtab.h \
+  sysdep.h \
+  token.h \
+  toplev.h \
+  txt-eng-ft.h \
+  txt-eng.h \
+  unwind-prot.h \
+  utils.h \
+  variables.h \
+  version.h \
+  xdiv.h \
+  xnorm.h \
+  xpow.h \
+  zfstream.h \
+  $(OV_INCLUDES) \
+  $(OV_SPARSE_INCLUDES) \
+  $(PT_INCLUDES)
+
+OV_INTTYPE_SRC = \
+  ov-int16.cc \
+  ov-int32.cc \
+  ov-int64.cc \
+  ov-int8.cc \
+  ov-uint16.cc \
+  ov-uint32.cc \
+  ov-uint64.cc \
+  ov-uint8.cc
+
+OV_SPARSE_SRC = \
+  ov-base-sparse.cc \
+  ov-bool-sparse.cc \
+  ov-cx-sparse.cc \
+  ov-re-sparse.cc
+
+OV_SRC = \
+  ov-base.cc \
+  ov-bool-mat.cc \
+  ov-bool.cc \
+  ov-builtin.cc \
+  ov-cell.cc \
+  ov-ch-mat.cc \
+  ov-class.cc \
+  ov-colon.cc \
+  ov-complex.cc \
+  ov-cs-list.cc \
+  ov-cx-diag.cc \
+  ov-cx-mat.cc \
+  ov-dld-fcn.cc \
+  ov-fcn-handle.cc \
+  ov-fcn-inline.cc \
+  ov-fcn.cc \
+  ov-float.cc \
+  ov-flt-complex.cc \
+  ov-flt-cx-diag.cc \
+  ov-flt-cx-mat.cc \
+  ov-flt-re-diag.cc \
+  ov-flt-re-mat.cc \
+  ov-list.cc \
+  ov-mex-fcn.cc \
+  ov-null-mat.cc \
+  ov-perm.cc \
+  ov-range.cc \
+  ov-re-diag.cc \
+  ov-re-mat.cc \
+  ov-scalar.cc \
+  ov-str-mat.cc \
+  ov-struct.cc \
+  ov-typeinfo.cc \
+  ov-usr-fcn.cc \
+  ov.cc \
+  $(OV_INTTYPE_SRC) \
+  $(OV_SPARSE_SRC)
+
+PT_SRC = \
+  pt-arg-list.cc \
+  pt-assign.cc \
+  pt-binop.cc \
+  pt-bp.cc \
+  pt-cbinop.cc \
+  pt-cell.cc \
+  pt-check.cc \
+  pt-cmd.cc \
+  pt-colon.cc \
+  pt-const.cc \
+  pt-decl.cc \
+  pt-eval.cc \
+  pt-except.cc \
+  pt-exp.cc \
+  pt-fcn-handle.cc \
+  pt-id.cc \
+  pt-idx.cc \
+  pt-jump.cc \
+  pt-loop.cc \
+  pt-mat.cc \
+  pt-misc.cc \
+  pt-pr-code.cc \
+  pt-select.cc \
+  pt-stmt.cc \
+  pt-unop.cc \
+  pt.cc
+
+DIST_SRC = \
+  Cell.cc \
+  bitfcns.cc \
+  c-file-ptr-stream.cc \
+  comment-list.cc \
+  cutils.c \
+  data.cc \
+  debug.cc \
+  defaults.cc \
+  defun.cc \
+  dirfns.cc \
+  display.cc \
+  dynamic-ld.cc \
+  error.cc \
+  file-io.cc \
+  gl-render.cc \
+  graphics.cc \
+  gripes.cc \
+  help.cc \
+  input.cc \
+  lex.ll \
+  load-path.cc \
+  load-save.cc \
+  ls-ascii-helper.cc \
+  ls-hdf5.cc \
+  ls-mat-ascii.cc \
+  ls-mat4.cc \
+  ls-mat5.cc \
+  ls-oct-ascii.cc \
+  ls-oct-binary.cc \
+  ls-utils.cc \
+  mappers.cc \
+  matherr.c \
+  mex.cc \
+  oct-fstrm.cc \
+  oct-hist.cc \
+  oct-iostrm.cc \
+  oct-lvalue.cc \
+  oct-map.cc \
+  oct-obj.cc \
+  oct-parse.yy \
+  oct-prcstrm.cc \
+  oct-procbuf.cc \
+  oct-stream.cc \
+  oct-strstrm.cc \
+  octave.cc \
+  pager.cc \
+  pr-output.cc \
+  procstream.cc \
+  sighandlers.cc \
+  siglist.c \
+  sparse-xdiv.cc \
+  sparse-xpow.cc \
+  strfns.cc \
+  symtab.cc \
+  syscalls.cc \
+  sysdep.cc \
+  token.cc \
+  toplev.cc \
+  txt-eng-ft.cc \
+  unwind-prot.cc \
+  utils.cc \
+  variables.cc \
+  xdiv.cc \
+  xnorm.cc \
+  xpow.cc \
+  zfstream.cc \
+  $(OV_SRC) \
+  $(PT_SRC)
+
+include DLD-FUNCTIONS/module.mk
+include OPERATORS/module.mk
+include TEMPLATE-INST/module.mk
+
+if AMCOND_ENABLE_DYNAMIC_LINKING
+  DLD_DYNAMIC_SRC = $(DLD_FUNCTIONS_SRC)
+  DLD_STATIC_SRC =
+  OCT_FILES = $(DLD_FUNCTIONS_SRC:.cc=.oct)
+else
+  DLD_DYNAMIC_SRC =
+  DLD_STATIC_SRC = $(DLD_FUNCTIONS_SRC)
+  OCT_FILES =
+endif
+
+liboctinterp_la_SOURCES = \
+  $(DIST_SRC) \
+  $(DLD_STATIC_SRC) \
+  $(OPERATORS_SRC) \
+  $(TEMPLATE_INST_SRC)
+
+DLD_DYNAMIC_DEF_FILES = $(DLD_DYNAMIC_SRC:.cc=.df)
+DLD_STATIC_DEF_FILES = $(DLD_STATIC_SRC:.cc=.df)
+
+SRC_DEF_FILES := $(shell $(srcdir)/find-defun-files.sh "$(srcdir)" $(DIST_SRC))
+
+DEF_FILES = $(SRC_DEF_FILES) $(DLD_DYNAMIC_DEF_FILES) $(DLD_STATIC_DEF_FILES)
+
+if AMCOND_ENABLE_DYNAMIC_LINKING
+  OCTAVE_LIBS = \
+    ./liboctinterp.la \
+    ../liboctave/liboctave.la \
+    ../libcruft/libcruft.la \
+    $(FFTW_XLDFLAGS) $(FFTW_XLIBS) \
+    $(SPARSE_XLDFLAGS) $(SPARSE_XLIBS) \
+    $(GRAPHICS_LDFLAGS) $(GRAPHICS_LIBS) \
+    $(FT2_LDFLAGS) $(FT2_LIBS) \
+    $(HDF5_LDFLAGS) $(HDF5_LIBS) $(Z_LDFLAGS) $(Z_LIBS) \
+    $(OPENGL_LIBS) $(X11_LIBS) $(CARBON_LIBS) \
+    $(READLINE_LIBS) $(TERM_LIBS) \
+    $(LIBGLOB) \
+    $(LAPACK_LIBS) $(BLAS_LIBS) \
+    $(LIBS) \
+    $(FLIBS)
+else
+  ## FIXME -- this list is probably not complete now.  It may not even
+  ## be possible to build a statically linked copy of Octave that is
+  ## fully functional.
+  OCTAVE_LIBS = \
+    ./liboctinterp.la \
+    ../liboctave/liboctave.la \
+    ../libcruft/libcruft.la \
+    $(FFTW_XLDFLAGS) $(FFTW_XLIBS)
+    $(QHULL_LDFLAGS) $(QHULL_LIBS) \
+    $(ARPACK_LDFLAGS) $(ARPACK_LIBS) \
+    $(QRUPDATE_LDFLAGS) $(QRUPDATE_LIBS) \
+    $(SPARSE_XLDFLAGS) $(SPARSE_XLIBS) \
+    $(REGEX_LDFLAGS) $(REGEX_LIBS) \
+    $(CURL_LDFLAGS) $(CURL_LIBS) \
+    $(GLPK_LDFLAGS) $(GLPK_LIBS) \
+    $(MAGICK_LDFLAGS) $(MAGICK_LIBS) \
+    $(GRAPHICS_LDFLAGS) $(GRAPHICS_LIBS) \
+    $(FT2_LDFLAGS) $(FT2_LIBS) \
+    $(HDF5_LDFLAGS) $(HDF5_LIBS) $(Z_LDFLAGS) $(Z_LIBS) \
+    $(OPENGL_LIBS) $(X11_LIBS) $(CARBON_LIBS) \
+    $(READLINE_LIBS) $(TERM_LIBS) \
+    $(LIBGLOB) \
+    $(LAPACK_LIBS) $(BLAS_LIBS) \
+    $(LIBS) \
+    $(FLIBS)
+endif
+
+OCTINTERP_LINK_DEPS = \
+  $(RLD_FLAG) \
+  ../liboctave/liboctave.la \
+  ../libcruft/libcruft.la \
+  $(FFTW_XLDFLAGS) $(FFTW_XLIBS) \
+  $(HDF5_LDFLAGS) $(HDF5_LIBS) $(Z_LDFLAGS) $(Z_LIBS) \
+  $(OPENGL_LIBS) $(X11_LIBS) $(CARBON_LIBS) \
+  $(READLINE_LIBS) $(TERM_LIBS) \
+  $(LIBGLOB) \
+  $(LAPACK_LIBS) $(BLAS_LIBS) \
+  $(LIBS) \
+  $(FLIBS)
+
+liboctinterp_la_LIBADD = $(OCTINTERP_LINK_DEPS)
+
+OCT_LINK_DEPS = \
+  $(RLD_FLAG) $(LDFLAGS) \
+  ./liboctinterp.la \
+  ../liboctave/liboctave.la \
+  ../libcruft/libcruft.la
+
+bin_PROGRAMS = octave
+
+octave_SOURCES = main.c
+
+nodist_liboctinterp_la_SOURCES = \
+  builtins.cc \
+  defaults.h \
+  graphics.h \
+  mxarray.h \
+  oct-conf.h \
+  oct-errno.cc \
+  ops.cc \
+  version.h \
+  $(OPT_HANDLERS) \
+  $(OPT_INC)
+
+liboctinterp_la_LDFLAGS = -release $(version) $(NO_UNDEFINED_LDFLAG)
+
+## Order matters here.  Leave builtins.cc last, because it depends on 
+## $(DEF_FILES), and building those requires all the sources
+## (except builtins.cc) to be available.  List only one of graphics.h
+## and graphics-props.cc because if both are listed, building in
+## parallel will vail.
+BUILT_SOURCES = \
+  defaults.h \
+  graphics.h \
+  lex.cc \
+  oct-conf.h \
+  oct-errno.cc \
+  oct-gperf.h \
+  oct-parse.cc \
+  ops.cc \
+  $(OPT_HANDLERS) \
+  $(OPT_INC) \
+  builtins.cc
+
+CLEANFILES = $(BUILT_SOURCES)
+
+octave_LDADD = $(OCTAVE_LIBS)
+
+all-local: $(OCT_FILES) DLD-FUNCTIONS/PKG_ADD DOCSTRINGS
+
+lex.lo lex.o oct-parse.lo oct-parse.o: \
+  AM_CXXFLAGS := $(filter-out -Wold-style-cast, $(AM_CXXFLAGS))
+
+fltk_backend.lo fltk_backend.o: \
+  AM_CXXFLAGS := $(filter-out $(DLL_CXXDEFS), $(AM_CXXFLAGS) $(GRAPHICS_CFLAGS))
+
+# XERBLA = ../libcruft/blas-xtra/xerbla.o
+
+builtins.cc: $(DEF_FILES) mkbuiltins
+	@echo making $@
+	@echo DEF_FILES = $(DEF_FILES)
+	@echo $(DEF_FILES) > def-files
+	@$(srcdir)/mkbuiltins def-files > $@-t
+	@mv $@-t $@
+
+## FIXME -- maybe genprops.awk should write both output files?
+## Or maybe there should be separate commands to generate each file?
+graphics.h graphics-props.cc: graphics.h.in genprops.awk
+	@echo making graphics.h and graphics-props.cc
+	@$(AWK) -f $(srcdir)/genprops.awk $< > graphics.h-t
+	@mv graphics.h-t graphics.h
+
+DLD-FUNCTIONS/PKG_ADD: $(DLD_DYNAMIC_DEF_FILES)
+	$(srcdir)/mk-pkg-add $(DLD_DYNAMIC_DEF_FILES) > $@-t
+	@mv $@-t $@
+
+DOCSTRINGS: gendoc$(BUILD_EXEEXT)
+	@echo making $@
+	@./gendoc > $@-t
+	@mv $@-t $@
+
+doc-files: $(DEF_FILES)
+	@echo making $@
+	@echo DEF_FILES = $(DEF_FILES)
+	@echo $(DEF_FILES) > $@-t
+	mv $@-t $@
+
+gendoc.cc: doc-files mkgendoc
+	@echo making $@
+	@$(srcdir)/mkgendoc doc-files > $@-t
+	@mv $@-t $@
+
+gendoc$(BUILD_EXEEXT): gendoc.cc
+	$(BUILD_CXX) $(BUILD_CXXFLAGS) -o $@ $^ $(BUILD_LDFLAGS)
+
+ops.cc: $(OPERATORS_SRC) mkops
+	@echo making $@ from $(OPERATORS_SRC)
+	@$(srcdir)/mkops $(OPERATORS_SRC) > $@-t
+	@mv $@-t $@
+
+$(DEF_FILES): $(OPT_INC) mkdefs 
+
+install-exec-hook: make-version-links
+
+install-data-hook: install-oct
+
+uninstall-local: remove-version-links uninstall-oct
+.PHONY: uninstall-local
+
+make-version-links:
+	cd $(DESTDIR)$(bindir) && \
+	mv octave$(EXEEXT) octave-$(version)$(EXEEXT) && \
+	$(LN_S) octave-$(version)$(EXEEXT) octave$(EXEEXT)
+.PHONY: make-version-links
+
+remove-version-links:
+	rm -f $(DESTDIR)$(bindir)/octave-$(version)$(EXEEXT)
+.PHONY: remove-version-links
+
+if AMCOND_ENABLE_DYNAMIC_LINKING
+install-oct:
+	$(top_srcdir)/mkinstalldirs $(DESTDIR)$(octfiledir)
+	if [ -n "`cat DLD-FUNCTIONS/PKG_ADD`" ]; then \
+	  $(INSTALL_DATA) DLD-FUNCTIONS/PKG_ADD $(DESTDIR)$(octfiledir)/PKG_ADD; \
+	fi
+	cd $(DESTDIR)/$(octlibdir) && \
+	for ltlib in $(DLD_FUNCTIONS_LIBS); do \
+	  f=`echo $$ltlib | $(SED) 's,.*/,,'`; \
+	  dl=`$(SED) -n -e "s/dlname='\([^']*\)'/\1/p" < $$f`; \
+	  if [ -n "$$dl" ]; then \
+	    $(INSTALL_PROGRAM) $$dl $(DESTDIR)$(octfiledir)/`echo $$f | $(SED) 's,^lib,,; s,\.la$$,.oct,'`; \
+	  else \
+	    echo "error: dlname is empty in $$ltlib!"; \
+	    exit 1; \
+	  fi; \
+	  lnames=`$(SED) -n -e "s/library_names='\([^']*\)'/\1/p" < $$f`; \
+	  if [ -n "$$lnames" ]; then \
+	    rm -f $$f $$lnames; \
+	  fi \
+	done
+
+uninstall-oct:
+	for f in $(OCT_FILES); do \
+	  rm -f $(DESTDIR)$(octfiledir)/`echo $$f | $(SED) 's,.*/,,'`; \
+	done
+	rm -f $(DESTDIR)$(octfiledir)/PKG_ADD
+endif
+.PHONY: install-oct uninstall-oct
+
+# Special rules -- these files need special things to be defined.
+
+$(OPT_HANDLERS) : %.cc : $(top_srcdir)/liboctave/%.in $(top_srcdir)/mk-opts.pl
+	@echo making $@ from $<
+	@$(PERL) $(top_srcdir)/mk-opts.pl --opt-handler-fcns $< > $@-t
+	@mv $@-t $@
+
+## We require Bison.
+#parse.cc : parse.y
+#	@echo "expect 14 shift/reduce conflicts"
+#	$(YACC) $(YFLAGS) --output=$@ --defines=y.tab.h $<
+
+#lex.cc : lex.l
+#	$(LEX) $(LFLAGS) $< > $(@F)-t
+#	@mv $(@F)-t $@
+
+
+$(OPT_INC) : %.h : %.in
+	$(MAKE) -C $(@D) $@
+
+## We want to force an update of defaults.h and oct-conf.h every
+## time make is run because some values may come from the command
+## line or the environment.  The substitution rules use move-if-change,
+## so this should not cause trouble if the file already exists and the
+## newly generated file is not different.
+
+defaults.h: defaults.h.in Makefile
+	@$(do_subst_default_vals)
+
+oct-conf.h: oct-conf.h.in Makefile
+	@$(do_subst_config_vals)
+
+oct-errno.cc: oct-errno.cc.in Makefile
+	@echo "making $@ from $<"
+	@if test -n "$(PERL)"; then \
+	  $(srcdir)/mk-errno-list --perl "$(PERL)" < $< > $@-t; \
+	elif test -n "$(PYTHON)"; then \
+	  $(srcdir)/mk-errno-list --python "$(PYTHON)" < $< > $@-t; \
+	else \
+	  $(SED) '/@SYSDEP_ERRNO_LIST@/D' $< > $@-t; \
+	fi
+	@mv $@-t $@
+
+## Don't use a pipeline to process gperf output since if gperf
+## is missing but sed is not, the exit status of the pipeline
+## will still be success and we will end up creating an empty
+## oct-gperf.h file.
+oct-gperf.h: octave.gperf
+	$(GPERF) -t -C -D -G -L C++ -Z octave_kw_hash $< > $@-t1
+	$(SED) 's,lookup\[,gperf_lookup[,' < $@-t1 > $@-t2
+	mv $@-t2 $@
+	rm -f $@-t1
+
+display.df display.lo: CPPFLAGS += $(X11_FLAGS)
+
+DLD-FUNCTIONS/__magick_read__.df: CPPFLAGS += $(MAGICK_CPPFLAGS)
+DLD_FUNCTIONS___magick_read___la_CPPFLAGS = $(AM_CPPFLAGS) $(MAGICK_CPPFLAGS)
+DLD_FUNCTIONS___magick_read___la_LIBADD += $(MAGICK_LDFLAGS) $(MAGICK_LIBS)
+
+DLD-FUNCTIONS/convhulln.df: CPPFLAGS += $(QHULL_CPPFLAGS)
+DLD_FUNCTIONS_convhulln_la_CPPFLAGS = $(AM_CPPFLAGS) $(QHULL_CPPFLAGS)
+DLD_FUNCTIONS_convhulln_la_LIBADD += $(QHULL_LDFLAGS) $(QHULL_LIBS)
+
+DLD-FUNCTIONS/__delaunayn__.df: CPPFLAGS += $(QHULL_CPPFLAGS)
+DLD_FUNCTIONS___delaunayn___la_CPPFLAGS = $(AM_CPPFLAGS) $(QHULL_CPPFLAGS)
+DLD_FUNCTIONS___delaunayn___la_LIBADD += $(QHULL_LDFLAGS) $(QHULL_LIBS)
+
+DLD-FUNCTIONS/__voronoi__.df: CPPFLAGS += $(QHULL_CPPFLAGS)
+DLD_FUNCTIONS___voronoi___la_CPPFLAGS = $(AM_CPPFLAGS) $(QHULL_CPPFLAGS)
+DLD_FUNCTIONS___voronoi___la_LIBADD += $(QHULL_LDFLAGS) $(QHULL_LIBS)
+
+DLD-FUNCTIONS/eigs.df: CPPFLAGS += $(ARPACK_CPPFLAGS) $(SPARSE_XCPPFLAGS)
+DLD_FUNCTIONS_eigs_la_CPPFLAGS = $(AM_CPPFLAGS) $(ARPACK_CPPFLAGS) $(SPARSE_XCPPFLAGS)
+DLD_FUNCTIONS_eigs_la_LIBADD += $(ARPACK_LDFLAGS) $(ARPACK_LIBS) $(SPARSE_XLDFLAGS) $(SPARSE_XLIBS) $(LAPACK_LIBS) $(BLAS_LIBS)
+
+#DLD-FUNCTIONS/qz.df DLD-FUNCTIONS/qz.lo:
+DLD_FUNCTIONS_qz_la_LIBADD += $(LAPACK_LIBS) $(BLAS_LIBS)
+
+DLD-FUNCTIONS/qr.df: CPPFLAGS += $(QRUPDATE_CPPFLAGS) $(SPARSE_XCPPFLAGS)
+DLD_FUNCTIONS_qr_la_CPPFLAGS = $(AM_CPPFLAGS) $(QRUPDATE_CPPFLAGS) $(SPARSE_XCPPFLAGS)
+DLD_FUNCTIONS_qr_la_LIBADD += $(QRUPDATE_LDFLAGS) $(QRUPDATE_LIBS) $(SPARSE_XLDFLAGS) $(SPARSE_XLIBS)
+
+DLD-FUNCTIONS/chol.df: CPPFLAGS += $(QRUPDATE_CPPFLAGS) $(SPARSE_XCPPFLAGS)
+DLD_FUNCTIONS_chol_la_CPPFLAGS = $(AM_CPPFLAGS) $(QRUPDATE_CPPFLAGS) $(SPARSE_XCPPFLAGS)
+DLD_FUNCTIONS_chol_la_LIBADD += $(QRUPDATE_LDFLAGS) $(QRUPDATE_LIBS) $(SPARSE_XLDFLAGS) $(SPARSE_XLIBS)
+
+DLD-FUNCTIONS/regexp.df: CPPFLAGS += $(REGEX_CPPFLAGS)
+DLD_FUNCTIONS_regexp_la_CPPFLAGS = $(AM_CPPFLAGS) $(REGEX_CPPFLAGS)
+DLD_FUNCTIONS_regexp_la_LIBADD += $(REGEX_LDFLAGS) $(REGEX_LIBS)
+
+DLD-FUNCTIONS/urlwrite.df: CPPFLAGS += $(CURL_CPPFLAGS)
+DLD_FUNCTIONS_urlwrite_la_CPPFLAGS = $(AM_CPPFLAGS) $(CURL_CPPFLAGS)
+DLD_FUNCTIONS_urlwrite_la_LIBADD += $(CURL_LDFLAGS) $(CURL_LIBS)
+
+DLD-FUNCTIONS/__glpk__.df: CPPFLAGS += $(GLPK_CPPFLAGS)
+DLD_FUNCTIONS___glpk___la_CPPFLAGS = $(AM_CPPFLAGS) $(GLPK_CPPFLAGS)
+DLD_FUNCTIONS___glpk___la_LIBADD += $(GLPK_LDFLAGS) $(GLPK_LIBS)
+
+DLD-FUNCTIONS/fltk_backend.df: CPPFLAGS += $(GRAPHICS_CPPFLAGS) $(FT2_CPPFLAGS)
+DLD_FUNCTIONS_fltk_backend_la_CPPFLAGS = $(AM_CPPFLAGS) $(GRAPHICS_CPPFLAGS) $(FT2_CPPFLAGS)
+DLD_FUNCTIONS_fltk_backend_la_LIBADD += $(GRAPHICS_LDFLAGS) $(GRAPHICS_LIBS) $(FT2_LDFLAGS) $(FT2_LIBS)
+
+DLD-FUNCTIONS/amd.df: CPPFLAGS += $(SPARSE_XCPPFLAGS)
+DLD_FUNCTIONS_amd_la_CPPFLAGS = $(AM_CPPFLAGS) $(SPARSE_XCPPFLAGS)
+DLD_FUNCTIONS_amd_la_LIBADD += $(SPARSE_XLDFLAGS) $(SPARSE_XLIBS)
+
+DLD-FUNCTIONS/colamd.df: CPPFLAGS += $(SPARSE_XCPPFLAGS)
+DLD_FUNCTIONS_colamd_la_CPPFLAGS = $(AM_CPPFLAGS) $(SPARSE_XCPPFLAGS)
+DLD_FUNCTIONS_colamd_la_LIBADD += $(SPARSE_XLDFLAGS) $(SPARSE_XLIBS)
+
+DLD-FUNCTIONS/ccolamd.df: CPPFLAGS += $(SPARSE_XCPPFLAGS)
+DLD_FUNCTIONS_ccolamd_la_CPPFLAGS = $(AM_CPPFLAGS) $(SPARSE_XCPPFLAGS)
+DLD_FUNCTIONS_ccolamd_la_LIBADD += $(SPARSE_XLDFLAGS) $(SPARSE_XLIBS)
+
+DLD-FUNCTIONS/symbfact.df: CPPFLAGS += $(SPARSE_XCPPFLAGS)
+DLD_FUNCTIONS_symbfact_la_CPPFLAGS = $(AM_CPPFLAGS) $(SPARSE_XCPPFLAGS)
+DLD_FUNCTIONS_symbfact_la_LIBADD += $(SPARSE_XLDFLAGS) $(SPARSE_XLIBS)
+
+DLD-FUNCTIONS/dmperm.df: CPPFLAGS += $(SPARSE_XCPPFLAGS)
+DLD_FUNCTIONS_dmperm_la_CPPFLAGS = $(AM_CPPFLAGS) $(SPARSE_XCPPFLAGS)
+DLD_FUNCTIONS_dmperm_la_LIBADD += $(SPARSE_XLDFLAGS) $(SPARSE_XLIBS)
+
+DLD-FUNCTIONS/symrcm.df: CPPFLAGS += $(SPARSE_XCPPFLAGS)
+DLD_FUNCTIONS_symrcm_la_CPPFLAGS = $(AM_CPPFLAGS) $(SPARSE_XCPPFLAGS)
+DLD_FUNCTIONS_symrcm_la_LIBADD += $(SPARSE_XLDFLAGS) $(SPARSE_XLIBS)
+
+DLD-FUNCTIONS/fft.df: CPPFLAGS += $(FFTW_XCPPFLAGS)
+DLD_FUNCTIONS_fft_la_CPPFLAGS = $(AM_CPPFLAGS) $(FFTW_XCPPFLAGS)
+DLD_FUNCTIONS_fft_la_LIBADD += $(FFTW_XLDFLAGS) $(FFTW_XLIBS)
+
+DLD-FUNCTIONS/fft2.df: CPPFLAGS += $(FFTW_XCPPFLAGS)
+DLD_FUNCTIONS_fft2_la_CPPFLAGS = $(AM_CPPFLAGS) $(FFTW_XCPPFLAGS)
+DLD_FUNCTIONS_fft2_la_LIBADD += $(FFTW_XLDFLAGS) $(FFTW_XLIBS)
+
+DLD-FUNCTIONS/fftn.df: CPPFLAGS += $(FFTW_XCPPFLAGS)
+DLD_FUNCTIONS_fftn_la_CPPFLAGS = $(AM_CPPFLAGS) $(FFTW_XCPPFLAGS)
+DLD_FUNCTIONS_fftn_la_LIBADD += $(FFTW_XLDFLAGS) $(FFTW_XLIBS)
+
+DLD-FUNCTIONS/fftw.df: CPPFLAGS += $(FFTW_XCPPFLAGS)
+DLD_FUNCTIONS_fftw_la_CPPFLAGS = $(AM_CPPFLAGS) $(FFTW_XCPPFLAGS)
+DLD_FUNCTIONS_fftw_la_LIBADD += $(FFTW_XLDFLAGS) $(FFTW_XLIBS)
--- a/src/Makefile.in	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,778 +0,0 @@
-# Makefile for octave's src directory
-#
-# Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-#               2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 John W. Eaton
-#
-# This file is part of Octave.
-# 
-# Octave is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 3 of the License, or (at
-# your option) any later version.
-# 
-# Octave is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with Octave; see the file COPYING.  If not, see
-# <http://www.gnu.org/licenses/>.
-
-TOPDIR = ..
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@:@srcdir@/DLD-FUNCTIONS:@srcdir@/OPERATORS:@srcdir@/TEMPLATE-INST
-
-include $(TOPDIR)/Makeconf
-
-DLL_CDEFS = @OCTINTERP_DLL_DEFS@
-DLL_CXXDEFS = @OCTINTERP_DLL_DEFS@
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-
-PT_FLAGS = -fexternal-templates -fno-implicit-templates
-CXXFLAGS_NO_PT_FLAGS = $(filter-out $(PT_FLAGS), $(ALL_CXXFLAGS))
-
-%.df : %.cc
-	@echo making $@ from $<
-	@(echo "// DO NOT EDIT!  Generated automatically by mkdefs." ; \
-	  echo " XDEFUN_FILE_NAME (\"$<\")" ; \
-	  egrep '^(///*|/\*) *PKG_ADD:' $< ; \
-	  $(CXXCPP) $(CPPFLAGS) $(CXXFLAGS_NO_PT_FLAGS) -DMAKE_BUILTINS $< \
-	    | $(srcdir)/mkdefs) > $@-t
-	@mv $@-t $@
-
-# How to make a .oct file from a .o file:
-
-ifeq ($(ENABLE_DYNAMIC_LINKING), true)
-  ifdef CXXPICFLAG
-    %.oct : pic/%.o octave$(EXEEXT)
-	  $(DL_LD) $(DL_LDFLAGS) -o $@ $< $(OCT_LINK_DEPS)
-  else
-    %.oct : %.o octave$(EXEEXT)
-	  $(DL_LD) $(DL_LDFLAGS) -o $@ $< $(OCT_LINK_DEPS)
-  endif
-endif
-
-OPT_BASE := $(addsuffix -opts, DASPK DASRT DASSL LSODE Quad)
-OPT_HANDLERS := $(addsuffix .cc, $(OPT_BASE))
-OPT_IN := $(addprefix ../liboctave/, $(addsuffix .in, $(OPT_BASE)))
-OPT_INC := $(addprefix ../liboctave/, $(addsuffix .h, $(OPT_BASE)))
-
-DLD_XSRC := amd.cc balance.cc besselj.cc betainc.cc bsxfun.cc \
-	cellfun.cc chol.cc ccolamd.cc colamd.cc colloc.cc \
-	conv2.cc convhulln.cc daspk.cc dasrt.cc dassl.cc det.cc \
-	dispatch.cc dlmread.cc dmperm.cc eig.cc eigs.cc fft.cc \
-	fft2.cc fftn.cc fftw.cc filter.cc find.cc fltk_backend.cc \
-	gammainc.cc gcd.cc getgrent.cc getpwent.cc getrusage.cc \
-	givens.cc hess.cc hex2num.cc inv.cc kron.cc lookup.cc \
-	lsode.cc lu.cc luinc.cc matrix_type.cc max.cc md5sum.cc \
-	pinv.cc qr.cc quad.cc qz.cc rand.cc rcond.cc regexp.cc \
-	schur.cc sparse.cc spparms.cc sqrtm.cc sub2ind.cc svd.cc syl.cc \
-	symrcm.cc symbfact.cc time.cc tril.cc tsearch.cc typecast.cc \
-	urlwrite.cc __contourc__.cc __delaunayn__.cc \
-	__dsearchn__.cc __glpk__.cc __lin_interpn__.cc \
-	__magick_read__.cc __pchip_deriv__.cc __qp__.cc \
-	__voronoi__.cc __convn__.cc
-
-DLD_SRC := $(addprefix DLD-FUNCTIONS/, $(DLD_XSRC))
-
-DLD_OBJ_1 := $(patsubst %.l, %.o, $(DLD_XSRC))
-DLD_OBJ := $(patsubst %.cc, %.o, $(DLD_OBJ_1))
-
-ifeq ($(ENABLE_DYNAMIC_LINKING), true)
-  OCT_FILES := $(patsubst %.o, %.oct, $(DLD_OBJ))
-  ifdef CXXPICFLAG
-    DLD_PICOBJ := $(addprefix pic/, $(DLD_OBJ))
-  else
-    DLD_PICOBJ := $(DLD_OBJ)
-  endif
-else
-  DLD_STATIC_OBJ := $(DLD_OBJ)
-endif
-
-OV_INTTYPE_INC := ov-base-int.h ov-int-traits.h ov-intx.h \
-	ov-int8.h ov-int16.h ov-int32.h ov-int64.h \
-	ov-uint8.h ov-uint16.h ov-uint32.h ov-uint64.h
-
-OV_INCLUDES := ov-re-mat.h ov-cx-mat.h ov-ch-mat.h ov-cs-list.h ov-list.h \
-	ov-struct.h ov-scalar.h ov-range.h ov-complex.h \
-	ov-colon.h ov-base.h ov-base-mat.h ov-base-scalar.h \
-	ov-str-mat.h ov-bool-mat.h ov-null-mat.h ov-bool.h \
-	ov-base-diag.h ov-re-diag.h ov-flt-re-diag.h ov-cx-diag.h \
-	ov-flt-cx-diag.h ov-perm.h \
-	ov-cell.h ov.h ov-fcn.h ov-builtin.h ov-dld-fcn.h \
-	ov-mex-fcn.h ov-usr-fcn.h ov-fcn-handle.h \
-	ov-fcn-inline.h ov-class.h ov-typeinfo.h ov-type-conv.h \
-	ov-flt-re-mat.h ov-flt-cx-mat.h ov-float.h ov-flt-complex.h \
-	$(OV_INTTYPE_INC)
-
-OV_SPARSE_INCLUDES := \
-	ov-base-sparse.h ov-bool-sparse.h ov-cx-sparse.h ov-re-sparse.h
-
-PT_INCLUDES := pt.h pt-all.h pt-arg-list.h pt-assign.h pt-binop.h \
-        pt-bp.h pt-cbinop.h pt-cell.h pt-check.h pt-cmd.h pt-colon.h \
-	pt-const.h pt-decl.h pt-eval.h pt-except.h pt-exp.h pt-fcn-handle.h \
-	pt-id.h pt-idx.h pt-jump.h pt-loop.h pt-mat.h pt-misc.h \
-	pt-pr-code.h pt-select.h pt-stmt.h pt-unop.h pt-walk.h
-
-INCLUDES := Cell.h base-list.h builtins.h c-file-ptr-stream.h \
-	comment-list.h debug.h defun-dld.h defun-int.h defun.h \
-	dirfns.h display.h dynamic-ld.h error.h file-io.h gl-render.h \
-	gripes.h help.h input.h lex.h load-path.h load-save.h ls-hdf5.h \
-	ls-mat-ascii.h ls-mat4.h ls-mat5.h ls-oct-ascii.h ls-ascii-helper.h \
-	ls-oct-binary.h ls-utils.h mex.h mexproto.h oct-errno.h \
-	oct-fstrm.h oct-hdf5.h oct-hist.h oct-iostrm.h oct-map.h oct-obj.h \
-	oct-prcstrm.h oct-procbuf.h oct-stdstrm.h oct-stream.h \
-	zfstream.h oct-strstrm.h oct-lvalue.h oct.h octave.h ops.h \
-	pager.h parse.h pr-output.h procstream.h sighandlers.h \
-	siglist.h sparse-xdiv.h sparse-xpow.h symtab.h sysdep.h \
-	token.h toplev.h txt-eng.h txt-eng-ft.h unwind-prot.h \
-	utils.h variables.h version.h xdiv.h xnorm.h xpow.h \
-	$(OV_INCLUDES) \
-	$(PT_INCLUDES) \
-	$(OV_SPARSE_INCLUDES)
-
-TI_XSRC := Array-os.cc Array-tc.cc
-
-TI_SRC := $(addprefix TEMPLATE-INST/, $(TI_XSRC))
-
-INTTYPE_OP_XSRC := op-int-concat.cc op-int-conv.cc \
-	op-i8-i8.cc op-i16-i16.cc op-i32-i32.cc op-i64-i64.cc \
-	op-ui8-ui8.cc op-ui16-ui16.cc op-ui32-ui32.cc op-ui64-ui64.cc
-
-SPARSE_OP_XSRC := op-bm-sbm.cc op-b-sbm.cc op-cm-scm.cc op-cm-sm.cc \
-	op-cs-scm.cc op-cs-sm.cc op-m-scm.cc op-m-sm.cc op-sbm-b.cc \
-	op-sbm-bm.cc op-sbm-sbm.cc op-scm-cm.cc op-scm-cs.cc op-scm-m.cc \
-	op-scm-s.cc op-scm-scm.cc op-scm-sm.cc op-sm-cm.cc \
-	op-sm-cs.cc op-sm-m.cc op-sm-s.cc op-sm-scm.cc op-sm-sm.cc \
-	op-s-scm.cc op-s-sm.cc
-
-DOUBLE_OP_XSRC := op-double-conv.cc op-cm-cm.cc op-cm-cs.cc op-cm-m.cc \
-	op-cm-s.cc op-cs-cm.cc op-cs-cs.cc op-cs-m.cc \
-	op-cs-s.cc op-m-cm.cc \
-	op-m-cs.cc op-m-m.cc op-m-s.cc op-s-cm.cc \
-	op-s-cs.cc op-s-m.cc op-s-s.cc 
-
-FLOAT_OP_XSRC := op-float-conv.cc op-fcm-fcm.cc op-fcm-fcs.cc op-fcm-fm.cc \
-	op-fcm-fs.cc op-fcs-fcm.cc op-fcs-fcs.cc op-fcs-fm.cc \
-	op-fcs-fs.cc op-fm-fcm.cc \
-	op-fm-fcs.cc op-fm-fm.cc op-fm-fs.cc op-fs-fcm.cc \
-	op-fs-fcs.cc op-fs-fm.cc op-fs-fs.cc 
-
-DIAG_OP_XSRC := op-cdm-cdm.cc op-cdm-cm.cc op-cdm-cs.cc op-cdm-dm.cc \
-	op-cdm-m.cc op-cdm-s.cc op-cm-cdm.cc op-cm-dm.cc op-dm-cdm.cc \
-	op-dm-cm.cc op-dm-cs.cc op-dm-dm.cc op-dm-m.cc op-dm-s.cc \
-	op-m-cdm.cc op-m-dm.cc op-dm-sm.cc op-dm-scm.cc
-
-FDIAG_OP_XSRC := op-fcdm-fcdm.cc op-fcdm-fcm.cc op-fcdm-fcs.cc op-fcdm-fdm.cc \
-	op-fcdm-fm.cc op-fcdm-fs.cc op-fcm-fcdm.cc op-fcm-fdm.cc \
-	op-fdm-fcdm.cc op-fdm-fcm.cc op-fdm-fcs.cc op-fdm-fdm.cc \
-	op-fdm-fm.cc op-fdm-fs.cc op-fm-fcdm.cc op-fm-fdm.cc
-
-PERM_OP_XSRC := op-cm-pm.cc op-fcm-pm.cc op-fm-pm.cc op-pm-fcm.cc \
-	op-pm-fm.cc op-m-pm.cc op-pm-cm.cc op-pm-m.cc op-pm-pm.cc \
-	op-pm-sm.cc op-pm-scm.cc
-
-OP_XSRC :=  op-b-b.cc op-b-bm.cc op-bm-b.cc op-bm-bm.cc op-cell.cc \
-	op-chm.cc op-class.cc op-list.cc op-range.cc op-str-m.cc \
-	op-str-s.cc op-str-str.cc op-struct.cc \
-	$(DOUBLE_OP_XSRC) $(FLOAT_OP_XSRC) $(INTTYPE_OP_XSRC) \
-	$(SPARSE_OP_XSRC) $(DIAG_OP_XSRC) $(FDIAG_OP_XSRC) $(PERM_OP_XSRC)
-
-OP_SRC := $(addprefix OPERATORS/, $(OP_XSRC))
-
-OP_INCLUDES := OPERATORS/op-int.h \
-	OPERATORS/op-dm-template.cc OPERATORS/op-dms-template.cc OPERATORS/op-pm-template.cc
-
-OV_INTTYPE_SRC := \
-	ov-int8.cc ov-int16.cc ov-int32.cc ov-int64.cc \
-	ov-uint8.cc ov-uint16.cc ov-uint32.cc ov-uint64.cc
-
-OV_SPARSE_SRC := \
-	ov-base-sparse.cc ov-bool-sparse.cc ov-cx-sparse.cc ov-re-sparse.cc
-
-OV_SRC := ov-base.cc ov-ch-mat.cc \
-	ov-cs-list.cc ov-list.cc ov-re-mat.cc ov-cx-mat.cc \
-	ov-range.cc ov-scalar.cc ov-complex.cc ov-str-mat.cc \
-	ov-struct.cc \
-	ov-colon.cc ov-bool-mat.cc ov-bool.cc ov-null-mat.cc ov-cell.cc \
-	ov.cc ov-fcn.cc ov-builtin.cc ov-dld-fcn.cc \
-	ov-mex-fcn.cc ov-usr-fcn.cc ov-fcn-handle.cc ov-fcn-inline.cc \
-	ov-class.cc ov-typeinfo.cc \
-	ov-flt-re-mat.cc ov-flt-cx-mat.cc ov-float.cc ov-flt-complex.cc \
-	ov-re-diag.cc ov-flt-re-diag.cc ov-cx-diag.cc ov-flt-cx-diag.cc \
-	ov-perm.cc \
-	$(OV_INTTYPE_SRC) \
-	$(OV_SPARSE_SRC)
-
-PT_SRC := pt.cc pt-arg-list.cc pt-assign.cc pt-bp.cc pt-binop.cc \
-	pt-cbinop.cc pt-cell.cc pt-check.cc pt-cmd.cc pt-colon.cc \
-	pt-const.cc pt-decl.cc pt-eval.cc pt-except.cc pt-exp.cc \
-	pt-fcn-handle.cc pt-id.cc pt-idx.cc pt-jump.cc pt-loop.cc \
-	pt-mat.cc pt-misc.cc pt-pr-code.cc pt-select.cc pt-stmt.cc \
-	pt-unop.cc
-
-DIST_SRC := Cell.cc bitfcns.cc c-file-ptr-stream.cc comment-list.cc \
-	cutils.c data.cc debug.cc defaults.cc defun.cc dirfns.cc \
-	display.cc dynamic-ld.cc error.cc file-io.cc gl-render.cc \
-	graphics.cc gripes.cc help.cc input.cc lex.l load-path.cc \
-	load-save.cc ls-hdf5.cc ls-mat-ascii.cc ls-mat4.cc \
-	ls-mat5.cc ls-oct-ascii.cc ls-ascii-helper.cc \
-	ls-oct-binary.cc ls-utils.cc main.c mappers.cc matherr.c \
-	mex.cc oct-fstrm.cc oct-hist.cc oct-iostrm.cc oct-map.cc \
-	oct-obj.cc oct-prcstrm.cc oct-procbuf.cc oct-stream.cc \
-	octave.cc zfstream.cc oct-strstrm.cc oct-lvalue.cc pager.cc \
-	parse.y pr-output.cc procstream.cc sighandlers.cc \
-	siglist.c sparse-xdiv.cc sparse-xpow.cc strfns.cc \
-	syscalls.cc symtab.cc sysdep.cc token.cc toplev.cc \
-	txt-eng-ft.cc \
-	unwind-prot.cc utils.cc variables.cc xdiv.cc xnorm.cc xpow.cc \
-	$(OV_SRC) \
-	$(PT_SRC)
-
-SOURCES := $(DIST_SRC) $(OP_SRC) $(TI_SRC)
-
-BUILT_EXTRAS := graphics.h mxarray.h
-
-EXTRAS := ov-base-int.cc ov-base-mat.cc ov-base-diag.cc ov-base-scalar.cc graphics-props.cc
-
-EXTRA_OBJECTS := oct-errno.o octave.o builtins.o ops.o
-
-INCLUDES_FOR_INSTALL := $(INCLUDES) $(EXTRAS) $(BUILT_EXTRAS)
-
-OBJECTS_4 := $(notdir $(SOURCES))
-OBJECTS_3 := $(patsubst %.l, %.o, $(OBJECTS_4))
-OBJECTS_2 := $(patsubst %.y, %.o, $(OBJECTS_3))
-OBJECTS_1 := $(patsubst %.c, %.o, $(OBJECTS_2))
-OBJECTS := $(patsubst %.cc, %.o, $(OBJECTS_1)) $(EXTRA_OBJECTS)
-
-ifeq ($(SHARED_LIBS), true)
-  ifdef CXXPICFLAG
-    PICOBJ := $(addprefix pic/, $(OBJECTS))
-  else
-    PICOBJ := $(OBJECTS)
-  endif
-endif
-
-# Ugh.
-
-DEP_5 := $(SOURCES) $(DLD_SRC) builtins.cc oct-errno.cc ops.cc main.c
-DEP_4 := $(notdir $(DEP_5))
-DEP_3 := $(patsubst %.l, %.cc, $(DEP_4))
-DEP_2 := $(patsubst %.y, %.cc, $(DEP_3))
-DEP_1 := $(patsubst %.c, %.d, $(DEP_2))
-MAKEDEPS := $(patsubst %.cc, %.d, $(DEP_1))
-
-# Some stupid egreps don't like empty elements in alternation patterns,
-# so we have to repeat ourselves because some stupid egreps don't like
-# empty elements in alternation patterns.
-
-DEFUN_PATTERN = "^[ \t]*DEF(CONSTFUN|CMD|UN|UN_DLD|UNX_DLD|UN_TEXT)[ \t]*\\("
-
-DLD_DEF_FILES_1 := $(patsubst %.l, %.df, $(DLD_XSRC))
-DLD_DEF_FILES := $(patsubst %.cc, %.df, $(DLD_DEF_FILES_1))
-
-DEF_4 := $(addprefix $(srcdir)/, $(SOURCES))
-DEF_3 := $(notdir $(shell egrep -l $(DEFUN_PATTERN) $(DEF_4)))
-DEF_2 := $(patsubst %.y, %.df, $(DEF_3))
-DEF_1 := $(patsubst %.l, %.df, $(DEF_2))
-DEF_FILES := $(patsubst %.cc, %.df, $(DEF_1)) $(DLD_DEF_FILES)
-
-DOC_FILES := $(sort $(DEF_FILES))
-
-ifeq ($(ENABLE_DYNAMIC_LINKING), true)
-  OCTAVE_LIBS = -L. $(LIBOCTINTERP) \
-    -L../liboctave $(LIBOCTAVE) \
-    -L../libcruft $(LIBCRUFT) \
-    $(FFTW_LDFLAGS) $(FFTW_LIBS) \
-    $(GRAPHICS_LDFLAGS) $(GRAPHICS_LIBS) \
-    $(FT2_LDFLAGS) $(FT2_LIBS) \
-    $(HDF5_LDFLAGS) $(HDF5_LIBS) $(Z_LDFLAGS) $(Z_LIBS) \
-    $(OPENGL_LIBS) $(X11_LIBS) $(CARBON_LIBS) \
-    $(READLINE_LIBS) $(TERM_LIBS) \
-    $(LIBGLOB) \
-    $(BLAS_LIBS) \
-    $(FLIBS) \
-    $(LIBS)
-else
-  ## FIXME -- this list is probably not complete now.  It may not even
-  ## be possible to build a statically linked copy of Octave that is
-  ## fully functional.
-  OCTAVE_LIBS = -L. $(LIBOCTINTERP) \
-    -L../liboctave $(LIBOCTAVE) \
-    -L../libcruft $(LIBCRUFT) \
-    $(FFTW_LDFLAGS) $(FFTW_LIBS)
-    $(QHULL_LDFLAGS) $(QHULL_LIBS) \
-    $(ARPACK_LDFLAGS) $(ARPACK_LIBS) \
-    $(QRUPDATE_LDFLAGS) $(QRUPDATE_LIBS) \
-    $(SPARSE_LDFLAGS) $(SPARSE_LIBS) \
-    $(REGEX_LDFLAGS) $(REGEX_LIBS) \
-    $(CURL_LDFLAGS) $(CURL_LIBS) \
-    $(GLPK_LDFLAGS) $(GLPK_LIBS) \
-    $(MAGICK_LDFLAGS) $(MAGICK_LIBS) \
-    $(GRAPHICS_LDFLAGS) $(GRAPHICS_LIBS) \
-    $(FT2_LDFLAGS) $(FT2_LIBS) \
-    $(HDF5_LDFLAGS) $(HDF5_LIBS) $(Z_LDFLAGS) $(Z_LIBS) \
-    $(OPENGL_LIBS) $(X11_LIBS) $(CARBON_LIBS) \
-    $(READLINE_LIBS) $(TERM_LIBS) \
-    $(LIBGLOB) \
-    $(BLAS_LIBS) \
-    $(FLIBS) \
-    $(LIBS)
-endif
-
-OCTINTERP_LINK_DEPS = $(RLD_FLAG) -L../liboctave $(LIBOCTAVE) \
-  -L../libcruft $(LIBCRUFT) \
-  $(FFTW_LDFLAGS) $(FFTW_LIBS) \
-  $(HDF5_LDFLAGS) $(HDF5_LIBS) $(Z_LDFLAGS) $(Z_LIBS) \
-  $(OPENGL_LIBS) $(X11_LIBS) $(CARBON_LIBS) \
-  $(READLINE_LIBS) $(TERM_LIBS) \
-  $(LIBGLOB) \
-  $(BLAS_LIBS) \
-  $(FLIBS) \
-  $(LIBS)
-
-OCT_LINK_DEPS = $(RLD_FLAG) $(LDFLAGS) -L. $(LIBOCTINTERP) \
-  -L../liboctave $(LIBOCTAVE) \
-  -L../libcruft $(LIBCRUFT)
-
-BUILT_DISTFILES = DOCSTRINGS oct-gperf.h parse.cc lex.cc y.tab.h \
-	$(OPT_HANDLERS) $(BUILT_EXTRAS)
-
-DISTFILES = Makefile.in ChangeLog genprops.awk mkdefs mkops mkgendoc \
-	mkbuiltins mk-errno-list mk-pkg-add \
-	defaults.h.in graphics.h.in mxarray.h.in oct-conf.h.in \
-	oct-errno.cc.in octave.gperf \
-	$(INCLUDES) $(DIST_SRC) $(EXTRAS)
-
-all: octave$(EXEEXT) $(OCT_FILES) PKG_ADD DOCSTRINGS
-.PHONY: all
-
-objects: $(OBJECTS)
-
-lex.o parse.o pic/lex.o pic/parse.o: \
-	ALL_CXXFLAGS := $(filter-out -Wold-style-cast, $(ALL_CXXFLAGS))
-
-$(DLD_PICOBJ): \
-	ALL_CXXFLAGS := $(filter-out $(DLL_CXXDEFS), $(ALL_CXXFLAGS))
-
-fltk_backend.o pic/fltk_backend.o: \
-	ALL_CXXFLAGS := $(filter-out $(DLL_CXXDEFS), $(ALL_CXXFLAGS) $(GRAPHICS_CFLAGS))
-
-XERBLA = ../libcruft/blas-xtra/xerbla.o
-ifdef FPICFLAG
-  PIC_XERBLA = ../libcruft/blas-xtra/pic/xerbla.o
-else
-  PIC_XERBLA = $(XERBLA)
-endif
-
-ifeq ($(SHARED_LIBS), true)
-  ifeq ($(STATIC_LIBS), true)
-    LIBRARIES = $(LIBPRE)octinterp.$(LIBEXT) $(SHLPRE)octinterp.$(SHLEXT_VER)
-  else
-    LIBRARIES = $(SHLPRE)octinterp.$(SHLEXT_VER)
-  endif
-else
-  ifeq ($(STATIC_LIBS), true)
-    LIBRARIES = $(LIBPRE)octinterp.$(LIBEXT)
-  else
-    ## This is not going to work, but hey, you asked for it...
-    LIBRARIES =
-  endif
-endif
-
-libraries: $(LIBRARIES)
-.PHONY: libraries
-
-$(LIBPRE)octinterp.$(LIBEXT): $(OBJECTS) $(XERBLA)
-	rm -f $@
-	$(TEMPLATE_AR) $(TEMPLATE_ARFLAGS) $@ $^
-	$(RANLIB) $@
-
-$(SHLPRE)octinterp.$(SHLEXT_VER): $(SHLPRE)octinterp.$(SHLEXT)
-	rm -f $@
-	$(LN_S) $< $@
-
-$(SHLPRE)octinterp.$(SHLEXT): $(PICOBJ) $(PIC_XERBLA)
-	rm -f $@
-	$(SH_LD) $(SH_LDFLAGS) $(LDFLAGS) $(SONAME_FLAGS) -o $@ $^ $(OCTINTERP_LINK_DEPS)
-
-octave$(EXEEXT): $(LIBRARIES) main.o $(DLD_STATIC_OBJ)
-	$(LD_CXX) $(CPPFLAGS) $(ALL_CXXFLAGS) $(RDYNAMIC_FLAG) \
-	$(ALL_LDFLAGS) -o $@ main.o $(DLD_STATIC_OBJ) \
-	$(RLD_FLAG) \
-	$(OCTAVE_LIBS)
-
-stmp-pic: pic
-	@if [ -f stmp-pic ]; then \
-	  true; \
-	else \
-	  echo "touch stmp-pic"; \
-	  touch stmp-pic; \
-	fi
-
-pic:
-	@if [ -d pic ]; then \
-	  true; \
-	else \
-	  echo "mkdir pic"; \
-	  mkdir pic; \
-	fi
-
-$(PICOBJ): stmp-pic
-
-builtins.cc: $(DEF_FILES) mkbuiltins
-	@echo making $@
-	@echo DEF_FILES = $(DEF_FILES)
-	@echo $(DEF_FILES) > def-files
-	@$(srcdir)/mkbuiltins def-files > $@-t
-	@mv $@-t $@
-
-## FIXME -- maybe genprops.awk should write both output files?
-## Or maybe there should be separate commands to generate each file?
-graphics.h graphics-props.cc: graphics.h.in genprops.awk
-	@echo making graphics.h and graphics-props.cc
-	@$(AWK) -f $(srcdir)/genprops.awk $< > graphics.h-t
-	@mv graphics.h-t graphics.h
-
-PKG_ADD: $(DLD_DEF_FILES)
-	$(srcdir)/mk-pkg-add $(DLD_DEF_FILES) > $@-t
-	@mv $@-t $@
-
-DOCSTRINGS: gendoc$(BUILD_EXEEXT)
-	@echo making $@
-	@./gendoc > $@-t
-	@mv $@-t $@
-
-doc-files: $(DOC_FILES)
-	@echo making $@
-	@echo DOC_FILES = $(DOC_FILES)
-	@echo $(DOC_FILES) > $@-t
-	mv $@-t $@
-
-gendoc.cc: doc-files mkgendoc
-	@echo making $@
-	@$(srcdir)/mkgendoc doc-files > $@-t
-	@mv $@-t $@
-
-gendoc$(BUILD_EXEEXT): gendoc.cc
-	$(BUILD_CXX) $(BUILD_CXXFLAGS) -o $@ $^ $(BUILD_LDFLAGS)
-
-ops.cc: $(OP_SRC) mkops
-	@echo making $@ from $(OP_SRC)
-	@$(srcdir)/mkops $(OP_SRC) > $@-t
-	@mv $@-t $@
-
-PREREQ := defaults.h graphics.h oct-conf.h oct-errno.cc oct-gperf.h parse.cc lex.cc 
-
-$(DEF_FILES): $(OPT_INC) mkdefs 
-
-ifndef omit_deps
-$(MAKEDEPS): $(OPT_INC) $(OPT_HANDLERS) $(PREREQ)
-endif
-
-check: all
-.PHONY: check
-
-install: install-bin install-oct install-lib install-inc
-.PHONY: install
-
-install-strip:
-	$(MAKE) INSTALL_PROGRAM="$(INSTALL_PROGRAM) -s" install
-.PHONY: install-strip
-
-install-bin:
-	$(top_srcdir)/mkinstalldirs $(DESTDIR)$(bindir)
-	rm -f $(DESTDIR)$(bindir)/octave$(EXEEXT)
-	$(INSTALL_PROGRAM) octave$(EXEEXT) $(DESTDIR)$(bindir)/octave-$(version)$(EXEEXT)
-	cd $(DESTDIR)$(bindir) ; $(LN_S) octave-$(version)$(EXEEXT) octave$(EXEEXT)
-.PHONY: install-bin
-
-install-oct:
-	$(top_srcdir)/mkinstalldirs $(DESTDIR)$(octfiledir)
-	$(INSTALL_DATA) PKG_ADD $(DESTDIR)$(octfiledir)/PKG_ADD
-	if [ -n "$(OCT_FILES)" ]; then \
-	  xfiles="$(OCT_FILES)"; \
-	  for f in $$xfiles; do \
-	    $(INSTALL_PROGRAM) $$f $(DESTDIR)$(octfiledir)/$$f; \
-	  done; \
-	fi
-.PHONY: install-oct
-
-install-lib:
-	$(top_srcdir)/mkinstalldirs $(DESTDIR)$(octlibdir)
-	if $(STATIC_LIBS); then \
-	  rm -f $(DESTDIR)$(octlibdir)/$(LIBPRE)octinterp.$(LIBEXT); \
-	  $(INSTALL_DATA) $(LIBPRE)octinterp.$(LIBEXT) \
-	    $(DESTDIR)$(octlibdir)/$(LIBPRE)octinterp.$(LIBEXT); \
-	  $(RANLIB) $(DESTDIR)$(octlibdir)/$(LIBPRE)octinterp.$(LIBEXT); \
-	fi
-	if $(SHARED_LIBS); then \
-	  rm -f $(DESTDIR)$(octlibdir)/$(SHLLIBPRE)octinterp.$(SHLLIB_VER); \
-	  $(INSTALL) $(SHLLIBPRE)octinterp.$(SHLLIB) \
-	    $(DESTDIR)$(octlibdir)/$(SHLLIBPRE)octinterp.$(SHLLIB_VER); \
-	  rm -f $(DESTDIR)$(octlibdir)/$(SHLLIBPRE)octinterp.$(SHLLIB); \
-	  (cd $(DESTDIR)$(octlibdir) ; $(LN_S) $(SHLLIBPRE)octinterp.$(SHLLIB_VER) $(DESTDIR)$(octlibdir)/$(SHLLIBPRE)octinterp.$(SHLLIB)); \
-	  if  test x$(SHLBIN) != x ; then \
-	    rm -f $(DESTDIR)$(bindir)/$(SHLBINPRE)octinterp.$(SHLBIN); \
-	    $(INSTALL_PROGRAM) \
-	      $(SHLBINPRE)octinterp.$(SHLBIN) $(DESTDIR)$(bindir)/$(SHLBINPRE)octinterp.$(SHLBIN); \
-	  fi; \
-	fi
-.PHONY: install-lib
-
-install-inc:
-	$(top_srcdir)/mkinstalldirs $(DESTDIR)$(octincludedir)/octave
-	for f in $(INCLUDES_FOR_INSTALL); do \
-	  rm -f $(DESTDIR)$(octincludedir)/octave/$$f; \
-	  if [ -f $$f ]; then \
-	    $(INSTALL_DATA) $$f $(DESTDIR)$(octincludedir)/octave/$$f; \
-	  else \
-	    $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(octincludedir)/octave/$$f; \
-	  fi ; \
-	done
-	for f in defaults.h oct-conf.h oct-gperf.h; do \
-	  rm -f $(DESTDIR)$(octincludedir)/octave/$$f; \
-	  if [ -f $$f ]; then \
-	    $(INSTALL_DATA) $$f $(DESTDIR)$(octincludedir)/octave/$$f ; \
-	  else \
-	    $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(octincludedir)/octave/$$f ; \
-	  fi ; \
-	done
-.PHONY: install-inc
-
-uninstall:
-	rm -f $(DESTDIR)$(bindir)/octave$(EXEEXT)
-	rm -f $(DESTDIR)$(bindir)/octave-$(version)$(EXEEXT)
-	rm -f $(DESTDIR)$(octlibdir)/$(LIBPRE)octinterp.$(LIBEXT)
-	rm -f $(DESTDIR)$(octlibdir)/$(SHLLIBPRE)octinterp.$(SHLLIB)
-	rm -f $(DESTDIR)$(octlibdir)/$(SHLLIBPRE)octinterp.$(SHLLIB_VER)
-	if test x$(SHLBIN) != x ; then \
-	  rm -f $(DESTDIR)$(bindir)/$(SHLBINPRE)octinterp.$(SHLBIN); \
-	  rm -f $(DESTDIR)$(bindir)/$(SHLBINPRE)octinterp.$(SHLBIN_VER); \
-	fi
-	for f in $(INCLUDES_FOR_INSTALL) defaults.h oct-conf.h oct-gperf.h; do \
-	  rm -f $(DESTDIR)$(octincludedir)/octave/$$f; \
-	done
-	if [ -n "$(OCT_FILES)" ]; then \
-	  xfiles="$(OCT_FILES)"; \
-	  for f in $$xfiles; do \
-	    rm -f $(DESTDIR)$(octfiledir)/$$f; \
-	  done; \
-	fi
-	rm -f $(DESTDIR)$(octfiledir)/PKG_ADD
-	-rmdir $(DESTDIR)$(octincludedir)/octave
-	-rmdir $(DESTDIR)$(octincludedir)
-	-rmdir $(DESTDIR)$(octlibdir)
-	-rmdir $(DESTDIR)$(octfiledir)
-.PHONY: uninstall
-
-tags: $(SOURCES) $(DLD_SRC)
-	ctags $(SOURCES) $(DLD_SRC)
-
-TAGS: $(SOURCES) $(DLD_SRC)
-	etags $(SOURCES) $(DLD_SRC)
-
-clean:
-	rm -f $(LIBPRE)octinterp.$(LIBEXT)
-	rm -f $(SHLPRE)octinterp.$(SHLEXT_VER) $(SHLPRE)octinterp.$(SHLEXT)
-	rm -f $(SHLBINPRE)octinterp.$(SHLBIN_VER) $(SHLBINPRE)octinterp.$(SHLBIN)
-	rm -f $(OBJECTS) $(DLD_OBJ) $(MAKEDEPS) $(DOC_FILES) $(OCT_FILES)
-	rm -f $(PICOBJ) $(DLD_PICOBJ) stmp-pic gendoc$(EXEEXT)
-	rm -f builtins.cc ops.cc defaults.h oct-conf.h def-files
-	rm -f PKG_ADD
-	-rmdir pic
-.PHONY: clean
-
-mostlyclean: clean
-.PHONY: mostlyclean
-
-distclean: clean
-	rm -f Makefile octave$(EXEEXT) .fname so_locations oct-errno.cc
-	rm -f tags TAGS y.output yy.lex.c parse.output
-	rm -f stamp-liboctave-prereq
-	rm -f doc-files gendoc.cc graphics.h graphics-props.cc mxarray.h DOCSTRINGS
-.PHONY: distclean
-
-maintainer-clean: distclean
-	rm -f lex.cc parse.cc y.tab.h
-	rm -f oct-gperf.h $(OPT_HANDLERS)
-.PHONY: maintainer-clean
-
-dist: parse.cc lex.cc oct-gperf.h
-	ln $(addprefix $(srcdir)/, $(DISTFILES)) ../`cat ../.fname`/src
-	ln $(BUILT_DISTFILES) ../`cat ../.fname`/src
-	for f in DLD-FUNCTIONS OPERATORS TEMPLATE-INST; do \
-	  if [ -d ../`cat ../.fname`/src/$$f ]; then \
-	    true; \
-	  else \
-	    mkdir ../`cat ../.fname`/src/$$f; \
-	  fi; \
-	done
-	ln $(addprefix $(srcdir)/, $(DLD_SRC)) ../`cat ../.fname`/src/DLD-FUNCTIONS
-	ln $(addprefix $(srcdir)/, $(OP_SRC)) ../`cat ../.fname`/src/OPERATORS
-	ln $(addprefix $(srcdir)/, $(OP_INCLUDES)) ../`cat ../.fname`/src/OPERATORS
-	ln $(addprefix $(srcdir)/, $(TI_SRC)) ../`cat ../.fname`/src/TEMPLATE-INST
-	rm -f parse.cc lex.cc y.tab.h y.output yy.lex.c
-	rm -f oct-gperf.h defaults.h oct-conf.h *.d *.df builtins.cc
-.PHONY: dist
-
-conf-dist:
-	ln $(addprefix $(srcdir)/, octave.cc Makefile.in) ../`cat ../.fname`/src
-.PHONY: conf-dist
-
-# Special rules -- these files need special things to be defined.
-
-$(OPT_HANDLERS) : %.cc : $(top_srcdir)/liboctave/%.in $(top_srcdir)/mk-opts.pl
-	@echo making $@ from $<
-	@$(PERL) $(top_srcdir)/mk-opts.pl --opt-handler-fcns $< > $@-t
-	@mv $@-t $@
-
-## We require Bison.
-parse.cc : parse.y
-	@echo "expect 14 shift/reduce conflicts"
-	$(YACC) $(YFLAGS) --output=$@ --defines=y.tab.h $<
-
-lex.cc : lex.l
-	$(LEX) $(LFLAGS) $< > $(@F)-t
-	@mv $(@F)-t $@
-
-
-$(OPT_INC) : %.h : %.in
-	$(MAKE) -C $(@D) $@
-
-## We want to force an update of defaults.h and oct-conf.h every
-## time make is run because some values may come from the command
-## line or the environment.  The substitution rules use move-if-change,
-## so this should not cause trouble if the file already exists and the
-## newly generated file is not different.
-
-defaults.h: defaults.h.in ../Makeconf Makefile FORCE
-	@$(do-subst-default-vals)
-
-oct-conf.h: oct-conf.h.in ../Makeconf Makefile FORCE
-	@$(do-subst-config-vals)
-
-FORCE:
-.PHONY: FORCE
-
-oct-errno.cc: oct-errno.cc.in ../Makeconf Makefile
-	@echo "making $@ from $<"
-	@if test -n "$(PERL)"; then \
-	  $(srcdir)/mk-errno-list --perl "$(PERL)" < $< > $@-t; \
-	elif test -n "$(PYTHON)"; then \
-	  $(srcdir)/mk-errno-list --python "$(PYTHON)" < $< > $@-t; \
-	else \
-	  $(SED) '/@SYSDEP_ERRNO_LIST@/D' $< > $@-t; \
-	fi
-	@mv $@-t $@
-
-## Don't use a pipeline to process gperf output since if gperf
-## is missing but sed is not, the exit status of the pipeline
-## will still be success and we will end up creating an empty
-## oct-gperf.h file.
-oct-gperf.h: octave.gperf
-	$(GPERF) -t -C -D -G -L C++ -Z octave_kw_hash $< > $@-t1
-	$(SED) 's,lookup\[,gperf_lookup[,' < $@-t1 > $@-t2
-	mv $@-t2 $@
-	rm -f $@-t1
-
-display.d display.df display.o pic/display.o: CPPFLAGS += $(X11_FLAGS)
-
-__magick_read__.d __magick_read__.df __magick_read__.o pic/__magick_read__.o: \
-  CPPFLAGS += $(MAGICK_CPPFLAGS)
-__magick_read__.oct: OCT_LINK_DEPS += $(MAGICK_LDFLAGS) $(MAGICK_LIBS)
-
-convhull.d convhull.df convhull.o pic/convhull.o: CPPFLAGS += $(QHULL_CPPFLAGS)
-convhulln.oct: OCT_LINK_DEPS += $(QHULL_LDFLAGS) $(QHULL_LIBS)
-
-__delaunayn__.d __delaunayn__.df __delaunayn__.o pic/__delaunayn__.o: \
-  CPPFLAGS += $(QHULL_CPPFLAGS)
-__delaunayn__.oct: OCT_LINK_DEPS += $(QHULL_LDFLAGS) $(QHULL_LIBS)
-
-__voronoi__.d __voronoi__.df __voronoi__.o pic/__voronoi__.o: \
-  CPPFLAGS += $(QHULL_CPPFLAGS)
-__voronoi__.oct: OCT_LINK_DEPS += $(QHULL_LDFLAGS) $(QHULL_LIBS)
-
-eigs.d eigs.df eigs.o pic/eigs.o:
-  CPPFLAGS += $(ARPACK_CPPFLAGS) $(SPARSE_CPPFLAGS)
-eigs.oct: \
-  OCT_LINK_DEPS += $(ARPACK_LDFLAGS) $(ARPACK_LIBS) \
-    $(SPARSE_LDFLAGS) $(SPARSE_LIBS) $(BLAS_LIBS)
-
-qz.d qz.df qz.o pic/qz.o:
-qz.oct: OCT_LINK_DEPS += $(BLAS_LIBS)
-
-qr.d qr.df qr.o pic/qr.o: \
-  CPPFLAGS += $(QRUPDATE_CPPFLAGS) $(SPARSE_CPPFLAGS)
-qr.oct: \
-  OCT_LINK_DEPS += $(QRUPDATE_LDFLAGS) $(QRUPDATE_LIBS) \
-    $(SPARSE_LDFLAGS) $(SPARSE_LIBS)
-
-chol.d chol.df chol.o pic/chol.o:
-  CPPFLAGS += $(QRUPDATE_CPPFLAGS) $(SPARSE_CPPFLAGS)
-chol.oct: \
-  OCT_LINK_DEPS += $(QRUPDATE_LDFLAGS) $(QRUPDATE_LIBS) \
-    $(SPARSE_LDFLAGS) $(SPARSE_LIBS)
-
-regexp.d regexp.df regexp.o pic/regexp.o: CPPFLAGS += $(REGEX_CPPFLAGS)
-regexp.oct: OCT_LINK_DEPS += $(REGEX_LDFLAGS) $(REGEX_LIBS)
-
-urlwrite.d urlwrite.df urlwrite.o pic/urlwrite.o: CPPFLAGS += $(CURL_CPPFLAGS)
-urlwrite.oct: OCT_LINK_DEPS += $(CURL_LDFLAGS) $(CURL_LIBS)
-
-__glpk__.d __glpk__.df __glpk__.o pic/__glpk__.o: CPPFLAGS += $(GLPK_CPPFLAGS)
-__glpk__.oct: OCT_LINK_DEPS += $(GLPK_LDFLAGS) $(GLPK_LIBS)
-
-fltk_backend.d fltk_backend.df fltk_backend.o pic/fltk_backend.o: \
-  CPPFLAGS += $(GRAPHICS_CPPFLAGS) $(FT2_CPPFLAGS)
-fltk_backend.oct: \
-  OCT_LINK_DEPS += $(GRAPHICS_LDFLAGS) $(GRAPHICS_LIBS) \
-    $(FT2_LDFLAGS) $(FT2_LIBS)
-
-amd.d amd.df pic/amd.o amd.o: CPPFLAGS += $(SPARSE_CPPFLAGS)
-amd.oct: OCT_LINK_DEPS += $(SPARSE_LDFLAGS) $(SPARSE_LIBS)
-
-colamd.d colamd.df pic/colamd.o colamd.o: CPPFLAGS += $(SPARSE_CPPFLAGS)
-colamd.oct: OCT_LINK_DEPS += $(SPARSE_LDFLAGS) $(SPARSE_LIBS)
-
-ccolamd.d ccolamd.df pic/ccolamd.o ccolamd.o: CPPFLAGS += $(SPARSE_CPPFLAGS)
-ccolamd.oct: OCT_LINK_DEPS += $(SPARSE_LDFLAGS) $(SPARSE_LIBS)
-
-symbfact.d symbfact.df pic/symbfact.o symbfact.o: CPPFLAGS += $(SPARSE_CPPFLAGS)
-symbfact.oct: OCT_LINK_DEPS += $(SPARSE_LDFLAGS) $(SPARSE_LIBS)
-
-dmperm.d dmperm.df pic/dmperm.o dmperm.o: CPPFLAGS += $(SPARSE_CPPFLAGS)
-dmperm.oct: OCT_LINK_DEPS += $(SPARSE_LDFLAGS) $(SPARSE_LIBS)
-
-symrcm.d symrcm.df pic/symrcm.o symrcm.o: CPPFLAGS += $(SPARSE_CPPFLAGS)
-symrcm.oct: OCT_LINK_DEPS += $(SPARSE_LDFLAGS) $(SPARSE_LIBS)
-
-qr.d qr.df pic/qr.o qr.o: CPPFLAGS += $(SPARSE_CPPFLAGS)
-qr.oct: OCT_LINK_DEPS += $(SPARSE_LDFLAGS) $(SPARSE_LIBS)
-
-fft.d fft.df pic/fft.o fft.o: CPPFLAGS += $(FFTW_CPPFLAGS)
-fft.oct: OCT_LINK_DEPS += $(FFTW_LDFLAGS) $(FFTW_LIBS)
-
-fft2.d fft2.df pic/fft2.o fft2.o: CPPFLAGS += $(FFTW_CPPFLAGS)
-fft2.oct: OCT_LINK_DEPS += $(FFTW_LDFLAGS) $(FFTW_LIBS)
-
-fftn.d fftn.df pic/fftn.o fftn.o: CPPFLAGS += $(FFTW_CPPFLAGS)
-fftn.oct: OCT_LINK_DEPS += $(FFTW_LDFLAGS) $(FFTW_LIBS)
-
-fftw.d fftw.df pic/fftw.o fftw.o: CPPFLAGS += $(FFTW_CPPFLAGS)
-fftw.oct: OCT_LINK_DEPS += $(FFTW_LDFLAGS) $(FFTW_LIBS)
-
-pcheck: all
-.PHONY: check
-
-ifdef omit_deps
-.PHONY: $(MAKEDEPS)
-endif
-
--include $(MAKEDEPS)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/OPERATORS/module.mk	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,136 @@
+EXTRA_DIST += OPERATORS/module.mk
+
+OPERATORS_SRC = \
+  OPERATORS/op-b-b.cc \
+  OPERATORS/op-b-bm.cc \
+  OPERATORS/op-b-sbm.cc \
+  OPERATORS/op-bm-b.cc \
+  OPERATORS/op-bm-bm.cc \
+  OPERATORS/op-bm-sbm.cc \
+  OPERATORS/op-cdm-cdm.cc \
+  OPERATORS/op-cdm-cm.cc \
+  OPERATORS/op-cdm-cs.cc \
+  OPERATORS/op-cdm-dm.cc \
+  OPERATORS/op-cdm-m.cc \
+  OPERATORS/op-cdm-s.cc \
+  OPERATORS/op-cell.cc \
+  OPERATORS/op-chm.cc \
+  OPERATORS/op-class.cc \
+  OPERATORS/op-cm-cdm.cc \
+  OPERATORS/op-cm-cm.cc \
+  OPERATORS/op-cm-cs.cc \
+  OPERATORS/op-cm-dm.cc \
+  OPERATORS/op-cm-m.cc \
+  OPERATORS/op-cm-pm.cc \
+  OPERATORS/op-cm-s.cc \
+  OPERATORS/op-cm-scm.cc \
+  OPERATORS/op-cm-sm.cc \
+  OPERATORS/op-cs-cm.cc \
+  OPERATORS/op-cs-cs.cc \
+  OPERATORS/op-cs-m.cc \
+  OPERATORS/op-cs-s.cc \
+  OPERATORS/op-cs-scm.cc \
+  OPERATORS/op-cs-sm.cc \
+  OPERATORS/op-dm-cdm.cc \
+  OPERATORS/op-dm-cm.cc \
+  OPERATORS/op-dm-cs.cc \
+  OPERATORS/op-dm-dm.cc \
+  OPERATORS/op-dm-m.cc \
+  OPERATORS/op-dm-s.cc \
+  OPERATORS/op-dm-scm.cc \
+  OPERATORS/op-dm-sm.cc \
+  OPERATORS/op-double-conv.cc \
+  OPERATORS/op-fcdm-fcdm.cc \
+  OPERATORS/op-fcdm-fcm.cc \
+  OPERATORS/op-fcdm-fcs.cc \
+  OPERATORS/op-fcdm-fdm.cc \
+  OPERATORS/op-fcdm-fm.cc \
+  OPERATORS/op-fcdm-fs.cc \
+  OPERATORS/op-fcm-fcdm.cc \
+  OPERATORS/op-fcm-fcm.cc \
+  OPERATORS/op-fcm-fcs.cc \
+  OPERATORS/op-fcm-fdm.cc \
+  OPERATORS/op-fcm-fm.cc \
+  OPERATORS/op-fcm-fs.cc \
+  OPERATORS/op-fcm-pm.cc \
+  OPERATORS/op-fcs-fcm.cc \
+  OPERATORS/op-fcs-fcs.cc \
+  OPERATORS/op-fcs-fm.cc \
+  OPERATORS/op-fcs-fs.cc \
+  OPERATORS/op-fdm-fcdm.cc \
+  OPERATORS/op-fdm-fcm.cc \
+  OPERATORS/op-fdm-fcs.cc \
+  OPERATORS/op-fdm-fdm.cc \
+  OPERATORS/op-fdm-fm.cc \
+  OPERATORS/op-fdm-fs.cc \
+  OPERATORS/op-float-conv.cc \
+  OPERATORS/op-fm-fcdm.cc \
+  OPERATORS/op-fm-fcm.cc \
+  OPERATORS/op-fm-fcs.cc \
+  OPERATORS/op-fm-fdm.cc \
+  OPERATORS/op-fm-fm.cc \
+  OPERATORS/op-fm-fs.cc \
+  OPERATORS/op-fm-pm.cc \
+  OPERATORS/op-fs-fcm.cc \
+  OPERATORS/op-fs-fcs.cc \
+  OPERATORS/op-fs-fm.cc \
+  OPERATORS/op-fs-fs.cc \
+  OPERATORS/op-i16-i16.cc \
+  OPERATORS/op-i32-i32.cc \
+  OPERATORS/op-i64-i64.cc \
+  OPERATORS/op-i8-i8.cc \
+  OPERATORS/op-int-concat.cc \
+  OPERATORS/op-int-conv.cc \
+  OPERATORS/op-list.cc \
+  OPERATORS/op-m-cdm.cc \
+  OPERATORS/op-m-cm.cc \
+  OPERATORS/op-m-cs.cc \
+  OPERATORS/op-m-dm.cc \
+  OPERATORS/op-m-m.cc \
+  OPERATORS/op-m-pm.cc \
+  OPERATORS/op-m-s.cc \
+  OPERATORS/op-m-scm.cc \
+  OPERATORS/op-m-sm.cc \
+  OPERATORS/op-pm-cm.cc \
+  OPERATORS/op-pm-fcm.cc \
+  OPERATORS/op-pm-fm.cc \
+  OPERATORS/op-pm-m.cc \
+  OPERATORS/op-pm-pm.cc \
+  OPERATORS/op-pm-scm.cc \
+  OPERATORS/op-pm-sm.cc \
+  OPERATORS/op-range.cc \
+  OPERATORS/op-s-cm.cc \
+  OPERATORS/op-s-cs.cc \
+  OPERATORS/op-s-m.cc \
+  OPERATORS/op-s-s.cc \
+  OPERATORS/op-s-scm.cc \
+  OPERATORS/op-s-sm.cc \
+  OPERATORS/op-sbm-b.cc \
+  OPERATORS/op-sbm-bm.cc \
+  OPERATORS/op-sbm-sbm.cc \
+  OPERATORS/op-scm-cm.cc \
+  OPERATORS/op-scm-cs.cc \
+  OPERATORS/op-scm-m.cc \
+  OPERATORS/op-scm-s.cc \
+  OPERATORS/op-scm-scm.cc \
+  OPERATORS/op-scm-sm.cc \
+  OPERATORS/op-sm-cm.cc \
+  OPERATORS/op-sm-cs.cc \
+  OPERATORS/op-sm-m.cc \
+  OPERATORS/op-sm-s.cc \
+  OPERATORS/op-sm-scm.cc \
+  OPERATORS/op-sm-sm.cc \
+  OPERATORS/op-str-m.cc \
+  OPERATORS/op-str-s.cc \
+  OPERATORS/op-str-str.cc \
+  OPERATORS/op-struct.cc \
+  OPERATORS/op-ui16-ui16.cc \
+  OPERATORS/op-ui32-ui32.cc \
+  OPERATORS/op-ui64-ui64.cc \
+  OPERATORS/op-ui8-ui8.cc
+
+octinclude_HEADERS += \
+  OPERATORS/op-dm-template.cc \
+  OPERATORS/op-dms-template.cc \
+  OPERATORS/op-int.h \
+  OPERATORS/op-pm-template.cc
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/TEMPLATE-INST/module.mk	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,5 @@
+EXTRA_DIST += TEMPLATE-INST/module.mk
+
+TEMPLATE_INST_SRC = \
+  TEMPLATE-INST/Array-os.cc \
+  TEMPLATE-INST/Array-tc.cc
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/find-defun-files.sh	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,23 @@
+#! /bin/sh
+
+set -e
+
+# Some stupid egreps don't like empty elements in alternation patterns,
+# so we have to repeat ourselves because some stupid egreps don't like
+# empty elements in alternation patterns.
+
+DEFUN_PATTERN="^[ \t]*DEF(CONSTFUN|CMD|UN|UN_DLD|UNX_DLD|UN_TEXT)[ \t]*\\("
+
+srcdir="$1"
+shift
+
+for arg
+do
+  file=`echo "$arg" | sed 's/\.ll$/.cc/; s/\.yy$/.cc/'`;
+  if [ ! -f $file ]; then
+    file="$srcdir/$file"
+  fi
+  if [ "`egrep -l "$DEFUN_PATTERN" $file`" ]; then
+    echo "$file" | sed 's/\.cc$/.df/';
+  fi
+done
--- a/src/lex.l	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3668 +0,0 @@
-/*
-
-Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-              2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
-              John W. Eaton
-
-This file is part of Octave.
-
-Octave is free software; you can redistribute it and/or modify it
-under the terms of the GNU General Public License as published by the
-Free Software Foundation; either version 3 of the License, or (at your
-option) any later version.
-
-Octave is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License
-along with Octave; see the file COPYING.  If not, see
-<http://www.gnu.org/licenses/>.
-
-*/
-
-%option prefix = "octave_"
-
-%s COMMAND_START
-%s MATRIX_START
-
-%x SCRIPT_FILE_BEGIN
-%x FUNCTION_FILE_BEGIN
-
-%{
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <cctype>
-#include <cstring>
-
-#include <iostream>
-#include <set>
-#include <sstream>
-#include <string>
-#include <stack>
-
-#ifdef HAVE_UNISTD_H
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#include <unistd.h>
-#endif
-
-#include "cmd-edit.h"
-#include "quit.h"
-#include "lo-mappers.h"
-
-// These would be alphabetical, but y.tab.h must be included before
-// oct-gperf.h and y.tab.h must be included after token.h and the tree
-// class declarations.  We can't include y.tab.h in oct-gperf.h
-// because it may not be protected to allow it to be included multiple
-// times.
-
-#include "Cell.h"
-#include "comment-list.h"
-#include "defun.h"
-#include "error.h"
-#include "gripes.h"
-#include "input.h"
-#include "lex.h"
-#include "ov.h"
-#include "parse.h"
-#include "pt-all.h"
-#include "symtab.h"
-#include "token.h"
-#include "toplev.h"
-#include "utils.h"
-#include "variables.h"
-#include <y.tab.h>
-#include <oct-gperf.h>
-
-#if ! (defined (FLEX_SCANNER) \
-       && defined (YY_FLEX_MAJOR_VERSION) && YY_FLEX_MAJOR_VERSION >= 2 \
-       && defined (YY_FLEX_MINOR_VERSION) && YY_FLEX_MINOR_VERSION >= 5)
-#error lex.l requires flex version 2.5.4 or later
-#endif
-
-#define yylval octave_lval
-
-// Arrange to get input via readline.
-
-#ifdef YY_INPUT
-#undef YY_INPUT
-#endif
-#define YY_INPUT(buf, result, max_size) \
-  if ((result = octave_read (buf, max_size)) < 0) \
-    YY_FATAL_ERROR ("octave_read () in flex scanner failed");
-
-// Try to avoid crashing out completely on fatal scanner errors.
-// The call to yy_fatal_error should never happen, but it avoids a
-// `static function defined but not used' warning from gcc.
-
-#ifdef YY_FATAL_ERROR
-#undef YY_FATAL_ERROR
-#endif
-#define YY_FATAL_ERROR(msg) \
-  do \
-    { \
-      error (msg); \
-      OCTAVE_QUIT; \
-      yy_fatal_error (msg); \
-    } \
-  while (0)
-
-#define DISPLAY_TOK_AND_RETURN(tok) \
-  do \
-    { \
-      int tok_val = tok; \
-      if (Vdisplay_tokens) \
-        display_token (tok_val); \
-      if (lexer_debug_flag) \
-        { \
-	  std::cerr << "R: "; \
-          display_token (tok_val); \
-	  std::cerr << std::endl;  \
-	} \
-      return tok_val; \
-    } \
-  while (0)
-
-#define COUNT_TOK_AND_RETURN(tok) \
-  do \
-    { \
-      Vtoken_count++; \
-      DISPLAY_TOK_AND_RETURN (tok); \
-    } \
-  while (0)
-
-#define TOK_RETURN(tok) \
-  do \
-    { \
-      current_input_column += yyleng; \
-      lexer_flags.quote_is_transpose = false; \
-      lexer_flags.convert_spaces_to_comma = true; \
-      COUNT_TOK_AND_RETURN (tok); \
-    } \
-  while (0)
-
-#define TOK_PUSH_AND_RETURN(name, tok) \
-  do \
-    { \
-      yylval.tok_val = new token (name, input_line_number, \
-				  current_input_column); \
-      token_stack.push (yylval.tok_val); \
-      TOK_RETURN (tok); \
-    } \
-  while (0)
-
-#define BIN_OP_RETURN(tok, convert, bos) \
-  do \
-    { \
-      yylval.tok_val = new token (input_line_number, current_input_column); \
-      token_stack.push (yylval.tok_val); \
-      current_input_column += yyleng; \
-      lexer_flags.quote_is_transpose = false; \
-      lexer_flags.convert_spaces_to_comma = convert; \
-      lexer_flags.looking_for_object_index = false; \
-      lexer_flags.at_beginning_of_statement = bos; \
-      COUNT_TOK_AND_RETURN (tok); \
-    } \
-  while (0)
-
-#define XBIN_OP_RETURN(tok, convert, bos) \
-  do \
-    { \
-      gripe_matlab_incompatible_operator (yytext); \
-      BIN_OP_RETURN (tok, convert, bos); \
-    } \
-  while (0)
-
-#define LEXER_DEBUG(pattern) \
-  do \
-    { \
-      if (lexer_debug_flag) \
-        lexer_debug (pattern, yytext); \
-    } \
-  while (0)
-
-// TRUE means that we have encountered EOF on the input stream.
-bool parser_end_of_input = false;
-
-// Flags that need to be shared between the lexer and parser.
-lexical_feedback lexer_flags;
-
-// Stack to hold tokens so that we can delete them when the parser is
-// reset and avoid growing forever just because we are stashing some
-// information.  This has to appear before lex.h is included, because
-// one of the macros defined there uses token_stack.
-//
-// FIXME -- this should really be static, but that causes
-// problems on some systems.
-std::stack <token*> token_stack;
-
-// Did eat_whitespace() eat a space or tab, or a newline, or both?
-
-typedef int yum_yum;
-
-const yum_yum ATE_NOTHING = 0;
-const yum_yum ATE_SPACE_OR_TAB = 1;
-const yum_yum ATE_NEWLINE = 2;
-
-// Is the closest nesting level a square bracket, squiggly brace or a paren?
-
-class bracket_brace_paren_nesting_level
-{
-public:
-
-  bracket_brace_paren_nesting_level (void) : context () { }
-
-  ~bracket_brace_paren_nesting_level (void) { }
-
-  void bracket (void) { context.push (BRACKET); }
-  bool is_bracket (void)
-    { return ! context.empty () && context.top () == BRACKET; }
-
-  void brace (void) {  context.push (BRACE); }
-  bool is_brace (void)
-    { return ! context.empty () && context.top () == BRACE; }
-
-  void paren (void) {  context.push (PAREN); }
-  bool is_paren (void)
-    { return ! context.empty () && context.top () == PAREN; }
-
-  bool is_bracket_or_brace (void)
-    { return (! context.empty ()
-	      && (context.top () == BRACKET || context.top () == BRACE)); }
-
-  bool none (void) { return context.empty (); }
-
-  void remove (void) { if (! context.empty ()) context.pop (); }
-
-  void clear (void) { while (! context.empty ()) context.pop (); }
-
-private:
-
-  std::stack<int> context;
-
-  static const int BRACKET;
-  static const int BRACE;
-  static const int PAREN;
-
-  bracket_brace_paren_nesting_level (const bracket_brace_paren_nesting_level&);
-
-  bracket_brace_paren_nesting_level&
-  operator = (const bracket_brace_paren_nesting_level&);
-};
-
-const int bracket_brace_paren_nesting_level::BRACKET = 1;
-const int bracket_brace_paren_nesting_level::BRACE = 2;
-const int bracket_brace_paren_nesting_level::PAREN = 3;
-
-static bracket_brace_paren_nesting_level nesting_level;
-
-static bool Vdisplay_tokens = false;
-
-static unsigned int Vtoken_count = 0;
-
-// The start state that was in effect when the beginning of a block
-// comment was noticed.
-static int block_comment_nesting_level = 0;
-
-// Internal variable for lexer debugging state.
-static bool lexer_debug_flag = false;
-
-// Forward declarations for functions defined at the bottom of this
-// file.
-
-static int text_yyinput (void);
-static void xunput (char c, char *buf);
-static void fixup_column_count (char *s);
-static void do_comma_insert_check (void);
-static int is_keyword_token (const std::string& s);
-static int process_comment (bool start_in_block, bool& eof);
-static bool match_any (char c, const char *s);
-static bool next_token_is_sep_op (void);
-static bool next_token_is_bin_op (bool spc_prev);
-static bool next_token_is_postfix_unary_op (bool spc_prev);
-static std::string strip_trailing_whitespace (char *s);
-static void handle_number (void);
-static int handle_string (char delim);
-static int handle_close_bracket (bool spc_gobbled, int bracket_type);
-static int handle_superclass_identifier (void);
-static int handle_meta_identifier (void);
-static int handle_identifier (void);
-static bool have_continuation (bool trailing_comments_ok = true);
-static bool have_ellipsis_continuation (bool trailing_comments_ok = true);
-static void scan_for_comments (const char *);
-static yum_yum eat_whitespace (void);
-static yum_yum eat_continuation (void);
-static void maybe_warn_separator_insert (char sep);
-static void gripe_single_quote_string (void);
-static void gripe_matlab_incompatible (const std::string& msg);
-static void maybe_gripe_matlab_incompatible_comment (char c);
-static void gripe_matlab_incompatible_continuation (void);
-static void gripe_matlab_incompatible_operator (const std::string& op);
-static void display_token (int tok);
-static void lexer_debug (const char *pattern, const char *text);
-
-%}
-
-D	[0-9]
-S	[ \t]
-NL	((\n)|(\r)|(\r\n))
-SNL	({S}|{NL})
-EL	(\.\.\.)
-BS	(\\)
-CONT	({EL}|{BS})
-Im	[iIjJ]
-CCHAR	[#%]
-COMMENT	({CCHAR}.*{NL})
-SNLCMT	({SNL}|{COMMENT})
-NOT	((\~)|(\!))
-POW     ((\*\*)|(\^))
-EPOW    (\.{POW})
-IDENT	([_$a-zA-Z][_$a-zA-Z0-9]*)
-EXPON	([DdEe][+-]?{D}+)
-NUMBER	(({D}+\.?{D}*{EXPON}?)|(\.{D}+{EXPON}?)|(0[xX][0-9a-fA-F]+))
-%%
-
-%{
-// Make script and function files start with a bogus token. This makes
-// the parser go down a special path.
-%}
-
-<SCRIPT_FILE_BEGIN>. {
-    LEXER_DEBUG ("<SCRIPT_FILE_BEGIN>.");
-
-    BEGIN (INITIAL);
-    xunput (yytext[0], yytext);
-    COUNT_TOK_AND_RETURN (SCRIPT_FILE);
-  }
-
-<FUNCTION_FILE_BEGIN>. {
-    LEXER_DEBUG ("<FUNCTION_FILE_BEGIN>.");
-
-    BEGIN (INITIAL);
-    xunput (yytext[0], yytext);
-    COUNT_TOK_AND_RETURN (FUNCTION_FILE);
-  }
-
-%{
-// Help and other command-style functions.
-%}
-
-<COMMAND_START>{NL} {
-    LEXER_DEBUG ("<COMMAND_START>{NL}");
-
-    BEGIN (INITIAL);
-    input_line_number++;
-    current_input_column = 1;
-
-    lexer_flags.quote_is_transpose = false;
-    lexer_flags.convert_spaces_to_comma = true;
-    lexer_flags.looking_for_object_index = false;
-    lexer_flags.at_beginning_of_statement = true;
-
-    COUNT_TOK_AND_RETURN ('\n');
-  }
-
-<COMMAND_START>[\;\,] {
-    LEXER_DEBUG ("<COMMAND_START>[\\;\\,]");
-
-    lexer_flags.looking_for_object_index = false;
-    lexer_flags.at_beginning_of_statement = true;
-
-    BEGIN (INITIAL);
-
-    if (strcmp (yytext, ",") == 0)
-      TOK_RETURN (',');
-    else
-      TOK_RETURN (';');
-  }
-
-<COMMAND_START>[\"\'] {
-    LEXER_DEBUG ("<COMMAND_START>[\\\"\\']");
-
-    lexer_flags.at_beginning_of_statement = false;
-
-    current_input_column++;
-    int tok = handle_string (yytext[0]);
-
-    COUNT_TOK_AND_RETURN (tok);
-  }
-
-<COMMAND_START>[^#% \t\r\n\;\,\"\'][^ \t\r\n\;\,]*{S}* {
-    LEXER_DEBUG ("<COMMAND_START>[^#% \\t\\r\\n\\;\\,\\\"\\'][^ \\t\\r\\n\\;\\,]*{S}*");
-
-    std::string tok = strip_trailing_whitespace (yytext);
-
-    lexer_flags.looking_for_object_index = false;
-    lexer_flags.at_beginning_of_statement = false;
-
-    TOK_PUSH_AND_RETURN (tok, SQ_STRING);
-  }
-
-%{
-// For this and the next two rules, we're looking at ']', and we
-// need to know if the next token is `=' or `=='.
-//
-// It would have been so much easier if the delimiters were simply
-// different for the expression on the left hand side of the equals
-// operator.
-//
-// It's also a pain in the ass to decide whether to insert a comma
-// after seeing a ']' character...
-
-// FIXME -- we need to handle block comments here.
-%}
-
-<MATRIX_START>{SNLCMT}*\]{S}* {
-    LEXER_DEBUG ("<MATRIX_START>{SNLCMT}*\\]{S}*");
-
-    scan_for_comments (yytext);
-    fixup_column_count (yytext);
-
-    lexer_flags.looking_at_object_index.pop_front ();
-
-    lexer_flags.looking_for_object_index = true;
-    lexer_flags.at_beginning_of_statement = false;
-
-    int c = yytext[yyleng-1];
-    int cont_is_spc = eat_continuation ();
-    bool spc_gobbled = (cont_is_spc || c == ' ' || c == '\t');
-    int tok_to_return = handle_close_bracket (spc_gobbled, ']');
-
-    if (spc_gobbled)
-      xunput (' ', yytext);
-
-    COUNT_TOK_AND_RETURN (tok_to_return);
-  }
-
-%{
-// FIXME -- we need to handle block comments here.
-%}
-
-<MATRIX_START>{SNLCMT}*\}{S}* {
-    LEXER_DEBUG ("<MATRIX_START>{SNLCMT}*\\}{S}*");
-
-    scan_for_comments (yytext);
-    fixup_column_count (yytext);
-
-    lexer_flags.looking_at_object_index.pop_front ();
-
-    lexer_flags.looking_for_object_index = true;
-    lexer_flags.at_beginning_of_statement = false;
-
-    int c = yytext[yyleng-1];
-    int cont_is_spc = eat_continuation ();
-    bool spc_gobbled = (cont_is_spc || c == ' ' || c == '\t');
-    int tok_to_return = handle_close_bracket (spc_gobbled, '}');
-
-    if (spc_gobbled)
-      xunput (' ', yytext);
-
-    COUNT_TOK_AND_RETURN (tok_to_return);
-  }
-
-%{
-// Commas are element separators in matrix constants.  If we don't
-// check for continuations here we can end up inserting too many
-// commas.
-%}
-
-<MATRIX_START>{S}*\,{S}* {
-    LEXER_DEBUG ("<MATRIX_START>{S}*\\,{S}*");
-
-    current_input_column += yyleng;
-
-    int tmp = eat_continuation ();
-
-    lexer_flags.quote_is_transpose = false;
-    lexer_flags.convert_spaces_to_comma = true;
-    lexer_flags.looking_for_object_index = false;
-    lexer_flags.at_beginning_of_statement = false;
-
-    if (! lexer_flags.looking_at_object_index.front ())
-      {
-	if ((tmp & ATE_NEWLINE) == ATE_NEWLINE)
-	  {
-	    maybe_warn_separator_insert (';');
-
-	    xunput (';', yytext);
-	  }
-      }
-
-    COUNT_TOK_AND_RETURN (',');
-  }
-
-%{
-// In some cases, spaces in matrix constants can turn into commas.
-// If commas are required, spaces are not important in matrix
-// constants so we just eat them.  If we don't check for continuations
-// here we can end up inserting too many commas.
-%}
-
-<MATRIX_START>{S}+ {
-    LEXER_DEBUG ("<MATRIX_START>{S}+");
-
-    current_input_column += yyleng;
-
-    lexer_flags.at_beginning_of_statement = false;
-
-    int tmp = eat_continuation ();
-
-    if (! lexer_flags.looking_at_object_index.front ())
-      {
-	bool bin_op = next_token_is_bin_op (true);
-	bool postfix_un_op = next_token_is_postfix_unary_op (true);
-	bool sep_op = next_token_is_sep_op ();
-
-	if (! (postfix_un_op || bin_op || sep_op)
-	    && nesting_level.is_bracket_or_brace ()
-	    && lexer_flags.convert_spaces_to_comma)
-	  {
-	    if ((tmp & ATE_NEWLINE) == ATE_NEWLINE)
-	      {
-		maybe_warn_separator_insert (';');
-
-		xunput (';', yytext);
-	      }
-
-	    lexer_flags.quote_is_transpose = false;
-	    lexer_flags.convert_spaces_to_comma = true;
-
-	    maybe_warn_separator_insert (',');
-
-	    COUNT_TOK_AND_RETURN (',');
-	  }
-      }
-  }
-
-%{
-// Semicolons are handled as row seprators in matrix constants.  If we
-// don't eat whitespace here we can end up inserting too many
-// semicolons.
-
-// FIXME -- we need to handle block comments here.
-%}
-
-<MATRIX_START>{SNLCMT}*;{SNLCMT}* {
-    LEXER_DEBUG ("<MATRIX_START>{SNLCMT}*;{SNLCMT}*");
-
-    scan_for_comments (yytext);
-    fixup_column_count (yytext);
-    eat_whitespace ();
-
-    lexer_flags.quote_is_transpose = false;
-    lexer_flags.convert_spaces_to_comma = true;
-    lexer_flags.looking_for_object_index = false;
-    lexer_flags.at_beginning_of_statement = false;
-
-    COUNT_TOK_AND_RETURN (';');
-  }
-
-%{
-// In some cases, new lines can also become row separators.  If we
-// don't eat whitespace here we can end up inserting too many
-// semicolons.
-
-// FIXME -- we need to handle block comments here.
-%}
-
-<MATRIX_START>{S}*{COMMENT}{SNLCMT}* |
-<MATRIX_START>{S}*{NL}{SNLCMT}* {
-    LEXER_DEBUG ("<MATRIX_START>{S}*{COMMENT}{SNLCMT}*|<MATRIX_START>{S}*{NL}{SNLCMT}*");
-
-    scan_for_comments (yytext);
-    fixup_column_count (yytext);
-    eat_whitespace ();
-
-    lexer_flags.quote_is_transpose = false;
-    lexer_flags.convert_spaces_to_comma = true;
-    lexer_flags.at_beginning_of_statement = false;
-
-    if (nesting_level.none ())
-      return LEXICAL_ERROR;
-
-    if (! lexer_flags.looking_at_object_index.front ()
-	&& nesting_level.is_bracket_or_brace ())
-      {
-	maybe_warn_separator_insert (';');
-
-	COUNT_TOK_AND_RETURN (';');
-      }
-  }
-
-\[{S}* {
-    LEXER_DEBUG ("\\[{S}*");
-
-    nesting_level.bracket ();
-
-    lexer_flags.looking_at_object_index.push_front (false);
-
-    current_input_column += yyleng;
-    lexer_flags.quote_is_transpose = false;
-    lexer_flags.convert_spaces_to_comma = true;
-    lexer_flags.looking_for_object_index = false;
-    lexer_flags.at_beginning_of_statement = false;
-
-    if (lexer_flags.defining_func && ! lexer_flags.parsed_function_name)
-      lexer_flags.looking_at_return_list = true;
-    else
-      lexer_flags.looking_at_matrix_or_assign_lhs = true;
-
-    promptflag--;
-    eat_whitespace ();
-
-    lexer_flags.bracketflag++;
-    BEGIN (MATRIX_START);
-    COUNT_TOK_AND_RETURN ('[');
-  }
-
-\] {
-    LEXER_DEBUG ("\\]");
-
-    nesting_level.remove ();
-
-    lexer_flags.looking_at_object_index.pop_front ();
-
-    lexer_flags.looking_for_object_index = true;
-    lexer_flags.at_beginning_of_statement = false;
-
-    TOK_RETURN (']');
-  }
-
-%{
-// Imaginary numbers.
-%}
-
-{NUMBER}{Im} {
-    LEXER_DEBUG ("{NUMBER}{Im}");
-
-    handle_number ();
-    COUNT_TOK_AND_RETURN (IMAG_NUM);
-  }
-
-%{
-// Real numbers.  Don't grab the `.' part of a dot operator as part of
-// the constant.
-%}
-
-{D}+/\.[\*/\\^\'] |
-{NUMBER} {
-    LEXER_DEBUG ("{D}+/\\.[\\*/\\^\\']|{NUMBER}");
-    handle_number ();
-    COUNT_TOK_AND_RETURN (NUM);
-  }
-
-%{
-// Eat whitespace.  Whitespace inside matrix constants is handled by
-// the <MATRIX_START> start state code above.
-%}
-
-{S}* {
-    current_input_column += yyleng;
-  }
-
-%{
-// Continuation lines.  Allow comments after continuations.
-%}
-
-{CONT}{S}*{NL} |
-{CONT}{S}*{COMMENT} {
-    LEXER_DEBUG ("{CONT}{S}*{NL}|{CONT}{S}*{COMMENT}");
-
-    if (yytext[0] == '\\')
-      gripe_matlab_incompatible_continuation ();
-    scan_for_comments (yytext);
-    promptflag--;
-    input_line_number++;
-    current_input_column = 1;
-  }
-
-%{
-// End of file.
-%}
-
-<<EOF>> {
-    LEXER_DEBUG ("<<EOF>>");
-
-    if (block_comment_nesting_level != 0)
-      {
-	warning ("block comment open at end of input");
-
-	if ((reading_fcn_file || reading_script_file || reading_classdef_file)
-	    && ! curr_fcn_file_name.empty ())
-	  warning ("near line %d of file `%s.m'",
-		   input_line_number, curr_fcn_file_name.c_str ());
-      }
-
-    TOK_RETURN (END_OF_INPUT);
-  }
-
-%{
-// Identifiers.  Truncate the token at the first space or tab but
-// don't write directly on yytext.
-%}
-
-{IDENT}{S}* {
-    LEXER_DEBUG ("{IDENT}{S}*");
-
-    int id_tok = handle_identifier ();
-
-    if (id_tok >= 0)
-      COUNT_TOK_AND_RETURN (id_tok);
-  }
-
-%{
-// Superclass method identifiers. 
-%}
-
-{IDENT}@{IDENT}{S}* |
-{IDENT}@{IDENT}.{IDENT}{S}* {
-    LEXER_DEBUG ("{IDENT}@{IDENT}{S}*|{IDENT}@{IDENT}.{IDENT}{S}*");
-
-    int id_tok = handle_superclass_identifier ();
-
-    if (id_tok >= 0)
-      {
-        lexer_flags.looking_for_object_index = true;
-
-        COUNT_TOK_AND_RETURN (SUPERCLASSREF);
-      }
-  }
-  
-%{
-// Metaclass query
-%}  
-  
-\?{IDENT}{S}* | 
-\?{IDENT}.{IDENT}{S}* {
-    LEXER_DEBUG ("\?{IDENT}{S}* | \?{IDENT}.{IDENT}{S}*");
-    
-    int id_tok = handle_meta_identifier ();
-
-    if (id_tok >= 0)
-      {
-        lexer_flags.looking_for_object_index = true;
-
-        COUNT_TOK_AND_RETURN (METAQUERY);
-      }
-  }  
-
-%{
-// Function handles and superclass references
-%}
-
-"@" {
-    LEXER_DEBUG ("@");
-
-    current_input_column++;
-
-    lexer_flags.quote_is_transpose = false;
-    lexer_flags.convert_spaces_to_comma = false;
-    lexer_flags.looking_at_function_handle++;
-    lexer_flags.looking_for_object_index = false;
-    lexer_flags.at_beginning_of_statement = false;
-
-    COUNT_TOK_AND_RETURN ('@');
-      
-  }
-
-%{
-// A new line character.  New line characters inside matrix constants
-// are handled by the <MATRIX_START> start state code above.  If closest
-// nesting is inside parentheses, don't return a row separator.
-%}
-
-{NL} {
-    LEXER_DEBUG ("{NL}");
-
-    input_line_number++;
-    current_input_column = 1;
-
-    lexer_flags.quote_is_transpose = false;
-    lexer_flags.convert_spaces_to_comma = true;
-
-    if (nesting_level.none ())
-      {
-	lexer_flags.at_beginning_of_statement = true;
-	COUNT_TOK_AND_RETURN ('\n');
-      }
-    else if (nesting_level.is_paren ())
-      {
-	lexer_flags.at_beginning_of_statement = false;
-	gripe_matlab_incompatible ("bare newline inside parentheses");
-      }
-    else if (nesting_level.is_bracket_or_brace ())
-      return LEXICAL_ERROR;
-  }
-
-%{
-// Single quote can either be the beginning of a string or a transpose
-// operator. 
-%}
-
-"'" {
-    LEXER_DEBUG ("'");
-
-    current_input_column++;
-    lexer_flags.convert_spaces_to_comma = true;
-
-    if (lexer_flags.quote_is_transpose)
-      {
-	do_comma_insert_check ();
-	COUNT_TOK_AND_RETURN (QUOTE);
-      }
-    else
-      {
-	int tok = handle_string ('\'');
-	COUNT_TOK_AND_RETURN (tok);
-      }
-  }
-
-%{
-// Double quotes always begin strings.
-%}
-
-\" {
-    LEXER_DEBUG ("\"");
-
-    current_input_column++;
-    int tok = handle_string ('"');
-
-    COUNT_TOK_AND_RETURN (tok);
-}
-
-%{
-// Gobble comments.
-%} 
-
-{CCHAR} {
-    LEXER_DEBUG ("{CCHAR}");
-
-    lexer_flags.looking_for_object_index = false;
-
-    xunput (yytext[0], yytext);
-
-    bool eof = false;
-    int tok = process_comment (false, eof);
-
-    if (eof)
-      TOK_RETURN (END_OF_INPUT);
-    else if (tok > 0)
-      COUNT_TOK_AND_RETURN (tok);
-  }
-
-%{
-// Block comments.
-%}
-
-^{S}*{CCHAR}\{{S}*{NL} {
-    LEXER_DEBUG ("^{S}*{CCHAR}\\{{S}*{NL}");
-
-    lexer_flags.looking_for_object_index = false;
-
-    input_line_number++;
-    current_input_column = 1;
-    block_comment_nesting_level++;
-    promptflag--;
-
-    bool eof = false;
-    process_comment (true, eof);
-  }
-
-%{
-// Other operators.
-%}
-
-":"     { LEXER_DEBUG (":"); BIN_OP_RETURN (':', false, false); }
-
-".+"	{ LEXER_DEBUG (".+"); XBIN_OP_RETURN (EPLUS, false, false); }
-".-"	{ LEXER_DEBUG (".-"); XBIN_OP_RETURN (EMINUS, false, false); }
-".*"	{ LEXER_DEBUG (".*"); BIN_OP_RETURN (EMUL, false, false); }
-"./"	{ LEXER_DEBUG ("./"); BIN_OP_RETURN (EDIV, false, false); }
-".\\"	{ LEXER_DEBUG (".\\"); BIN_OP_RETURN (ELEFTDIV, false, false); }
-".^"	{ LEXER_DEBUG (".^"); BIN_OP_RETURN (EPOW, false, false); }
-".**"	{ LEXER_DEBUG (".**"); XBIN_OP_RETURN (EPOW, false, false); }
-".'"	{ LEXER_DEBUG (".'"); do_comma_insert_check (); BIN_OP_RETURN (TRANSPOSE, true, false); }
-"++"	{ LEXER_DEBUG ("++"); do_comma_insert_check (); XBIN_OP_RETURN (PLUS_PLUS, true, false); }
-"--"	{ LEXER_DEBUG ("--"); do_comma_insert_check (); XBIN_OP_RETURN (MINUS_MINUS, true, false); }
-"<="	{ LEXER_DEBUG ("<="); BIN_OP_RETURN (EXPR_LE, false, false); }
-"=="	{ LEXER_DEBUG ("=="); BIN_OP_RETURN (EXPR_EQ, false, false); }
-"~="	{ LEXER_DEBUG ("~="); BIN_OP_RETURN (EXPR_NE, false, false); }
-"!="	{ LEXER_DEBUG ("!="); XBIN_OP_RETURN (EXPR_NE, false, false); }
-">="	{ LEXER_DEBUG (">="); BIN_OP_RETURN (EXPR_GE, false, false); }
-"&"	{ LEXER_DEBUG ("&"); BIN_OP_RETURN (EXPR_AND, false, false); }
-"|"	{ LEXER_DEBUG ("|"); BIN_OP_RETURN (EXPR_OR, false, false); }
-"<"	{ LEXER_DEBUG ("<"); BIN_OP_RETURN (EXPR_LT, false, false); }
-">"	{ LEXER_DEBUG (">"); BIN_OP_RETURN (EXPR_GT, false, false); }
-"+"     { LEXER_DEBUG ("+"); BIN_OP_RETURN ('+', false, false); }
-"-"     { LEXER_DEBUG ("-"); BIN_OP_RETURN ('-', false, false); }
-"*"	{ LEXER_DEBUG ("*"); BIN_OP_RETURN ('*', false, false); }
-"/"	{ LEXER_DEBUG ("/"); BIN_OP_RETURN ('/', false, false); }
-"\\"	{ LEXER_DEBUG ("\\"); BIN_OP_RETURN (LEFTDIV, false, false); }
-";"     { LEXER_DEBUG (";"); BIN_OP_RETURN (';', true, true); }
-","     { LEXER_DEBUG (","); BIN_OP_RETURN (',', true, ! lexer_flags.looking_at_object_index.front ()); }
-"^"	{ LEXER_DEBUG ("^"); BIN_OP_RETURN (POW, false, false); }
-"**"	{ LEXER_DEBUG ("**"); XBIN_OP_RETURN (POW, false, false); }
-"="	{ LEXER_DEBUG ("="); BIN_OP_RETURN ('=', true, false); }
-"&&"	{ LEXER_DEBUG ("&&"); BIN_OP_RETURN (EXPR_AND_AND, false, false); }
-"||"	{ LEXER_DEBUG ("||"); BIN_OP_RETURN (EXPR_OR_OR, false, false); }
-"<<"	{ LEXER_DEBUG ("<<"); XBIN_OP_RETURN (LSHIFT, false, false); }
-">>"	{ LEXER_DEBUG (">>"); XBIN_OP_RETURN (RSHIFT, false, false); }
-
-{NOT} {
-    LEXER_DEBUG ("{NOT}");
-
-    if (yytext[0] == '~')
-      BIN_OP_RETURN (EXPR_NOT, false, false);
-    else
-      XBIN_OP_RETURN (EXPR_NOT, false, false);
-  }
-
-"(" {
-    LEXER_DEBUG ("(");
-
-    // If we are looking for an object index, then push TRUE for
-    // looking_at_object_index.  Otherwise, just push whatever state
-    // is current (so that we can pop it off the stack when we find
-    // the matching close paren).
-
-    lexer_flags.looking_at_object_index.push_front
-      (lexer_flags.looking_for_object_index);
-
-    lexer_flags.looking_at_indirect_ref = false;
-    lexer_flags.looking_for_object_index = false;
-    lexer_flags.at_beginning_of_statement = false;
-
-    nesting_level.paren ();
-    promptflag--;
-
-    TOK_RETURN ('(');
-  }
-
-")" {
-    LEXER_DEBUG (")");
-
-    nesting_level.remove ();
-    current_input_column++;
-
-    lexer_flags.looking_at_object_index.pop_front ();
-
-    lexer_flags.quote_is_transpose = true;
-    lexer_flags.convert_spaces_to_comma = nesting_level.is_bracket_or_brace ();
-    lexer_flags.looking_for_object_index = true;
-    lexer_flags.at_beginning_of_statement = false;
-
-    do_comma_insert_check ();
-
-    COUNT_TOK_AND_RETURN (')');
-  }
-
-"." {
-    LEXER_DEBUG (".");
-
-    lexer_flags.looking_for_object_index = false;
-    lexer_flags.at_beginning_of_statement = false;
-
-    TOK_RETURN ('.');
-  }
-
-"+="	{ LEXER_DEBUG ("+="); XBIN_OP_RETURN (ADD_EQ, false, false); }
-"-="	{ LEXER_DEBUG ("-="); XBIN_OP_RETURN (SUB_EQ, false, false); }
-"*="	{ LEXER_DEBUG ("*="); XBIN_OP_RETURN (MUL_EQ, false, false); }
-"/="	{ LEXER_DEBUG ("/="); XBIN_OP_RETURN (DIV_EQ, false, false); }
-"\\="	{ LEXER_DEBUG ("\\="); XBIN_OP_RETURN (LEFTDIV_EQ, false, false); }
-".+="	{ LEXER_DEBUG (".+="); XBIN_OP_RETURN (ADD_EQ, false, false); }
-".-="	{ LEXER_DEBUG (".-="); XBIN_OP_RETURN (SUB_EQ, false, false); }
-".*="	{ LEXER_DEBUG (".*="); XBIN_OP_RETURN (EMUL_EQ, false, false); }
-"./="	{ LEXER_DEBUG ("./="); XBIN_OP_RETURN (EDIV_EQ, false, false); }
-".\\="	{ LEXER_DEBUG (".\\="); XBIN_OP_RETURN (ELEFTDIV_EQ, false, false); }
-{POW}=  { LEXER_DEBUG ("{POW}="); XBIN_OP_RETURN (POW_EQ, false, false); }
-{EPOW}= { LEXER_DEBUG ("{EPOW}="); XBIN_OP_RETURN (EPOW_EQ, false, false); }
-"&="	{ LEXER_DEBUG ("&="); XBIN_OP_RETURN (AND_EQ, false, false); }
-"|="	{ LEXER_DEBUG ("|="); XBIN_OP_RETURN (OR_EQ, false, false); }
-"<<="	{ LEXER_DEBUG ("<<="); XBIN_OP_RETURN (LSHIFT_EQ, false, false); }
-">>="	{ LEXER_DEBUG (">>="); XBIN_OP_RETURN (RSHIFT_EQ, false, false); }
-
-\{{S}* {
-    LEXER_DEBUG ("\\{{S}*");
-
-    nesting_level.brace ();
-
-    lexer_flags.looking_at_object_index.push_front
-      (lexer_flags.looking_for_object_index);
-
-    current_input_column += yyleng;
-    lexer_flags.quote_is_transpose = false;
-    lexer_flags.convert_spaces_to_comma = true;
-    lexer_flags.looking_for_object_index = false;
-    lexer_flags.at_beginning_of_statement = false;
-
-    promptflag--;
-    eat_whitespace ();
-
-    lexer_flags.braceflag++;
-    BEGIN (MATRIX_START);
-    COUNT_TOK_AND_RETURN ('{');
-  }
-
-"}" {
-    LEXER_DEBUG ("}");
-
-    lexer_flags.looking_at_object_index.pop_front ();
-
-    lexer_flags.looking_for_object_index = true;
-    lexer_flags.at_beginning_of_statement = false;
-
-    nesting_level.remove ();
-
-    TOK_RETURN ('}');
-  }
-
-%{
-// Unrecognized input is a lexical error.
-%}
-
-. {
-    LEXER_DEBUG (".");
-
-    xunput (yytext[0], yytext);
-
-    int c = text_yyinput ();
-
-    if (c != EOF)
-      {
-	current_input_column++;
-
-	error ("invalid character `%s' (ASCII %d) near line %d, column %d",
-	       undo_string_escape (static_cast<char> (c)), c,
-	       input_line_number, current_input_column);
-
-	return LEXICAL_ERROR;
-      }
-    else
-      TOK_RETURN (END_OF_INPUT);
-  }
-
-%%
-
-// GAG.
-//
-// If we're reading a matrix and the next character is '[', make sure
-// that we insert a comma ahead of it.
-
-void
-do_comma_insert_check (void)
-{
-  int spc_gobbled = eat_continuation ();
-
-  int c = text_yyinput ();
-
-  xunput (c, yytext);
-
-  if (spc_gobbled)
-    xunput (' ', yytext);
-
-  lexer_flags.do_comma_insert = (! lexer_flags.looking_at_object_index.front ()
-				 && lexer_flags.bracketflag && c == '[');
-}
-
-// Fix things up for errors or interrupts.  The parser is never called
-// recursively, so it is always safe to reinitialize its state before
-// doing any parsing.
-
-void
-reset_parser (void)
-{
-  // Start off on the right foot.
-  BEGIN (INITIAL);
-
-  parser_end_of_input = false;
-
-  while (! symtab_context.empty ())
-    symtab_context.pop ();
-
-  // We do want a prompt by default.
-  promptflag = 1;
-
-  // We are not in a block comment.
-  block_comment_nesting_level = 0;
-
-  // Error may have occurred inside some brackets, braces, or parentheses.
-  nesting_level.clear ();
-
-  // Clear out the stack of token info used to track line and column
-  // numbers.
-  while (! token_stack.empty ())
-    {
-      delete token_stack.top ();
-      token_stack.pop ();
-    }
-
-  // Can be reset by defining a function.
-  if (! (reading_script_file || reading_fcn_file || reading_classdef_file))
-    {
-      current_input_column = 1;
-      input_line_number = command_editor::current_command_number ();
-    }
-
-  // Only ask for input from stdin if we are expecting interactive
-  // input.
-  if ((interactive || forced_interactive)
-      && ! (reading_fcn_file
-        || reading_classdef_file
-	    || reading_script_file
-	    || get_input_from_eval_string
-	    || input_from_startup_file))
-    yyrestart (stdin);
-
-  // Clear the buffer for help text.
-  while (! help_buf.empty ())
-    help_buf.pop ();
-
-  // Reset other flags.
-  lexer_flags.init ();
-}
-
-static void
-display_character (char c)
-{
-  if (isgraph (c))
-    std::cerr << c;
-  else
-    switch (c)
-      {
-      case 0:
-	std::cerr << "NUL";
-	break;
-
-      case 1:
-	std::cerr << "SOH";
-	break;
-
-      case 2:
-	std::cerr << "STX";
-	break;
-
-      case 3:
-	std::cerr << "ETX";
-	break;
-
-      case 4:
-	std::cerr << "EOT";
-	break;
-
-      case 5:
-	std::cerr << "ENQ";
-	break;
-
-      case 6:
-	std::cerr << "ACK";
-	break;
-
-      case 7:
-	std::cerr << "\\a";
-	break;
-
-      case 8:
-	std::cerr << "\\b";
-	break;
-
-      case 9:
-	std::cerr << "\\t";
-	break;
-
-      case 10:
-	std::cerr << "\\n";
-	break;
-
-      case 11:
-	std::cerr << "\\v";
-	break;
-
-      case 12:
-	std::cerr << "\\f";
-	break;
-
-      case 13:
-	std::cerr << "\\r";
-	break;
-
-      case 14:
-	std::cerr << "SO";
-	break;
-
-      case 15:
-	std::cerr << "SI";
-	break;
-
-      case 16:
-	std::cerr << "DLE";
-	break;
-
-      case 17:
-	std::cerr << "DC1";
-	break;
-
-      case 18:
-	std::cerr << "DC2";
-	break;
-
-      case 19:
-	std::cerr << "DC3";
-	break;
-
-      case 20:
-	std::cerr << "DC4";
-	break;
-
-      case 21:
-	std::cerr << "NAK";
-	break;
-
-      case 22:
-	std::cerr << "SYN";
-	break;
-
-      case 23:
-	std::cerr << "ETB";
-	break;
-
-      case 24:
-	std::cerr << "CAN";
-	break;
-
-      case 25:
-	std::cerr << "EM";
-	break;
-
-      case 26:
-	std::cerr << "SUB";
-	break;
-
-      case 27:
-	std::cerr << "ESC";
-	break;
-
-      case 28:
-	std::cerr << "FS";
-	break;
-
-      case 29:
-	std::cerr << "GS";
-	break;
-
-      case 30:
-	std::cerr << "RS";
-	break;
-
-      case 31:
-	std::cerr << "US";
-	break;
-
-      case 32:
-	std::cerr << "SPACE";
-	break;
-
-      case 127:
-	std::cerr << "DEL";
-	break;
-      }
-}
-
-static int
-text_yyinput (void)
-{
-  int c = yyinput ();
-
-  if (lexer_debug_flag)
-    {
-      std::cerr << "I: ";
-      display_character (c);
-      std::cerr << std::endl;
-    }
-
-  // Convert CRLF into just LF and single CR into LF.
-
-  if (c == '\r')
-    {
-      c = yyinput ();
-
-      if (lexer_debug_flag)
-	{
-	  std::cerr << "I: ";
-	  display_character (c);
-	  std::cerr << std::endl;
-	}
-
-      if (c != '\n')
-	{
-	  xunput (c, yytext);
-	  c = '\n';
-	}
-    }
-
-  if (c == '\n')
-    input_line_number++;
-
-  return c;
-}
-
-static void
-xunput (char c, char *buf)
-{
-  if (lexer_debug_flag)
-    {
-      std::cerr << "U: ";
-      display_character (c);
-      std::cerr << std::endl;
-    }
-
-  if (c == '\n')
-    input_line_number--;
-
-  yyunput (c, buf);
-}
-
-// If we read some newlines, we need figure out what column we're
-// really looking at.
-
-static void
-fixup_column_count (char *s)
-{
-  char c;
-  while ((c = *s++) != '\0')
-    {
-      if (c == '\n')
-        {
-          input_line_number++;
-          current_input_column = 1;
-        }
-      else
-	current_input_column++;
-    }
-}
-
-// Include these so that we don't have to link to libfl.a.
-
-int
-yywrap (void)
-{
-  return 1;
-}
-
-// Tell us all what the current buffer is.
-
-YY_BUFFER_STATE
-current_buffer (void)
-{
-  return YY_CURRENT_BUFFER;
-}
-
-// Create a new buffer.
-
-YY_BUFFER_STATE
-create_buffer (FILE *f)
-{
-  return yy_create_buffer (f, YY_BUF_SIZE);
-}
-
-// Start reading a new buffer.
-
-void
-switch_to_buffer (YY_BUFFER_STATE buf)
-{
-  yy_switch_to_buffer (buf);
-}
-
-// Delete a buffer.
-
-void
-delete_buffer (YY_BUFFER_STATE buf)
-{
-  yy_delete_buffer (buf);
-}
-
-// Restore a buffer (for unwind-prot).
-
-void
-restore_input_buffer (void *buf)
-{
-  switch_to_buffer (static_cast<YY_BUFFER_STATE> (buf));
-}
-
-// Delete a buffer (for unwind-prot).
-
-void
-delete_input_buffer (void *buf)
-{
-  delete_buffer (static_cast<YY_BUFFER_STATE> (buf));
-}
-
-static bool
-inside_any_object_index (void)
-{
-  bool retval = false;
-
-  for (std::list<bool>::const_iterator i = lexer_flags.looking_at_object_index.begin ();
-       i != lexer_flags.looking_at_object_index.end (); i++)
-    {
-      if (*i)
-	{
-	  retval = true;
-	  break;
-	}
-    }
-
-  return retval;
-}
-
-// Handle keywords.  Return -1 if the keyword should be ignored.
-
-static int
-is_keyword_token (const std::string& s)
-{
-  int l = input_line_number;
-  int c = current_input_column;
-
-  int len = s.length ();
-
-  const octave_kw *kw = octave_kw_hash::in_word_set (s.c_str (), len);
-
-  if (kw)
-    {
-      yylval.tok_val = 0;
-
-      switch (kw->kw_id)
-	{
-	case break_kw:
-	case catch_kw:
-	case continue_kw:
-	case else_kw:
-	case otherwise_kw:
-	case return_kw:
-	case unwind_protect_cleanup_kw:
-	  lexer_flags.at_beginning_of_statement = true;
-	  break;
-
-	case case_kw:
-	case elseif_kw:
-	case global_kw:
-	case static_kw:
-	case until_kw:
-	  break;
-
-	case end_kw:
-	  if (! reading_classdef_file
-	      && (inside_any_object_index ()
-		  || (lexer_flags.defining_func
-		      && ! (lexer_flags.looking_at_return_list
-			    || lexer_flags.parsed_function_name))))
-	    return 0;
-
-	  yylval.tok_val = new token (token::simple_end, l, c);
-	  lexer_flags.at_beginning_of_statement = true;
-	  break;
-
-	case end_try_catch_kw:
-	  yylval.tok_val = new token (token::try_catch_end, l, c);
-	  lexer_flags.at_beginning_of_statement = true;
-	  break;
-
-	case end_unwind_protect_kw:
-	  yylval.tok_val = new token (token::unwind_protect_end, l, c);
-	  lexer_flags.at_beginning_of_statement = true;
-	  break;
-
-	case endfor_kw:
-	  yylval.tok_val = new token (token::for_end, l, c);
-	  lexer_flags.at_beginning_of_statement = true;
-	  break;
-
-	case endfunction_kw:
-	  yylval.tok_val = new token (token::function_end, l, c);
-	  lexer_flags.at_beginning_of_statement = true;
-	  break;
-
-	case endif_kw:
-	  yylval.tok_val = new token (token::if_end, l, c);
-	  lexer_flags.at_beginning_of_statement = true;
-	  break;
-
-	case endswitch_kw:
-	  yylval.tok_val = new token (token::switch_end, l, c);
-	  lexer_flags.at_beginning_of_statement = true;
-	  break;
-
-	case endwhile_kw:
-	  yylval.tok_val = new token (token::while_end, l, c);
-	  lexer_flags.at_beginning_of_statement = true;
-	  break;
-	  
-	case endclassdef_kw:
-	  yylval.tok_val = new token (token::classdef_end, l, c);
-	  lexer_flags.at_beginning_of_statement = true;
-	  break;
-	  
-	case endevents_kw:
-	  yylval.tok_val = new token (token::events_end, l, c);
-	  lexer_flags.at_beginning_of_statement = true;
-	  break;
-	  
-	case endmethods_kw:
-	  yylval.tok_val = new token (token::methods_end, l, c);
-	  lexer_flags.at_beginning_of_statement = true;
-	  break;
-	  
-	case endproperties_kw:
-	  yylval.tok_val = new token (token::properties_end, l, c);
-	  lexer_flags.at_beginning_of_statement = true;
-	  break;
-
-	case for_kw:
-	case while_kw:
-	  promptflag--;
-	  lexer_flags.looping++;
-	  break;
-
-	case do_kw:
-	  lexer_flags.at_beginning_of_statement = true;
-	  promptflag--;
-	  lexer_flags.looping++;
-	  break;
-
-	case try_kw:
-	case unwind_protect_kw:
-	  lexer_flags.at_beginning_of_statement = true;
-	  promptflag--;
-	  break;
-
-	case if_kw:
-	case switch_kw:
-	  promptflag--;
-	  break;
-
-	case get_kw:
-	case set_kw:  
-	  // 'get' and 'set' are keywords in classdef method
-	  // declarations.
-	  if (! lexer_flags.maybe_classdef_get_set_method)
-	    return 0;
-	  break;
-
-	case properties_kw:
-	case methods_kw:
-	case events_kw:
-	  // 'properties', 'methods' and 'events' are keywords for
-	  // classdef blocks.
-	  if (! lexer_flags.parsing_classdef)
-	    return 0;
-	  // fall through ...
-
-	case classdef_kw:
-	  // 'classdef' is always a keyword.
-	  promptflag--;
-	  break;	  
-
-	case function_kw:
-	  promptflag--;
-
-	  lexer_flags.defining_func = true;
-	  lexer_flags.parsed_function_name = false;
-
-	  if (! (reading_fcn_file || reading_script_file
-		 || reading_classdef_file))
-	    input_line_number = 1;
-	  break;
-
-        case magic_file_kw:
-	  {
-	    if ((reading_fcn_file || reading_script_file
-		 || reading_classdef_file)
-		&& ! curr_fcn_file_full_name.empty ())
-	      yylval.tok_val = new token (curr_fcn_file_full_name, l, c);
-	    else
-	      yylval.tok_val = new token ("stdin", l, c);
-	  }
-	  break;
-
-        case magic_line_kw:
-	  yylval.tok_val = new token (static_cast<double> (l), "", l, c);
-	  break;
-
-	default:
-	  panic_impossible ();
-	}
-
-      if (! yylval.tok_val)
-	yylval.tok_val = new token (l, c);
-
-      token_stack.push (yylval.tok_val);
-
-      return kw->tok;
-    }
-
-  return 0;
-}
-
-static bool
-is_variable (const std::string& name)
-{
-  return (symbol_table::is_variable (name)
-	  || (lexer_flags.pending_local_variables.find (name)
-	      != lexer_flags.pending_local_variables.end ()));
-}
-
-static std::string
-grab_block_comment (stream_reader& reader, bool& eof)
-{
-  std::string buf;
-
-  bool at_bol = true;
-  bool look_for_marker = false;
-
-  bool warned_incompatible = false;
-
-  int c = 0;
-
-  while ((c = reader.getc ()) != EOF)
-    {
-      current_input_column++;
-
-      if (look_for_marker)
-	{
-	  at_bol = false;
-	  look_for_marker = false;
-
-	  if (c == '{' || c == '}')
-	    {
-	      std::string tmp_buf (1, static_cast<char> (c));
-
-	      int type = c;
-
-	      bool done = false;
-
-	      while ((c = reader.getc ()) != EOF && ! done)
-		{
-		  current_input_column++;
-
-		  switch (c)
-		    {
-		    case ' ':
-		    case '\t':
-		      tmp_buf += static_cast<char> (c);
-		      break;
-
-		    case '\n':
-		      {
-			current_input_column = 0;
-			at_bol = true;
-			done = true;
-
-			if (type == '{')
-			  {
-			    block_comment_nesting_level++;
-			    promptflag--;
-			  }
-			else
-			  {
-			    block_comment_nesting_level--;
-			    promptflag++;
-
-			    if (block_comment_nesting_level == 0)
-			      {
-				buf += grab_comment_block (reader, true, eof);
-
-				return buf;
-			      }
-			  }
-		      }
-		      break;
-
-		    default:
-		      at_bol = false;
-		      tmp_buf += static_cast<char> (c);
-		      buf += tmp_buf;
-		      done = true;
-		      break;
-		    }
-		}
-	    }
-	}
-
-      if (at_bol && (c == '%' || c == '#'))
-        {
-          if (c == '#' && ! warned_incompatible)
-	    {
-	      warned_incompatible = true;
-	      maybe_gripe_matlab_incompatible_comment (c);
-	    }
-
-	  at_bol = false;
-	  look_for_marker = true;
-	}
-      else
-	{
-	  buf += static_cast<char> (c);
-
-	  if (c == '\n')
-	    {
-	      current_input_column = 0;
-	      at_bol = true;
-	    }
-	}
-    }
-
-  if (c == EOF)
-    eof = true;
-
-  return buf;
-}
-
-std::string
-grab_comment_block (stream_reader& reader, bool at_bol,
-		    bool& eof)
-{
-  std::string buf;
-
-  // TRUE means we are at the beginning of a comment block.
-  bool begin_comment = false;
-
-  // TRUE means we are currently reading a comment block.
-  bool in_comment = false;
-
-  bool warned_incompatible = false;
-
-  int c = 0;
-
-  while ((c = reader.getc ()) != EOF)
-    {
-      current_input_column++;
-
-      if (begin_comment)
-	{
-	  if (c == '%' || c == '#')
-	    {
-	      at_bol = false;
-	      continue;
-	    }
-	  else if (at_bol && c == '{')
-	    {
-	      std::string tmp_buf (1, static_cast<char> (c));
-
-	      bool done = false;
-
-	      while ((c = reader.getc ()) != EOF && ! done)
-		{
-		  current_input_column++;
-
-		  switch (c)
-		    {
-		    case ' ':
-		    case '\t':
-		      tmp_buf += static_cast<char> (c);
-		      break;
-
-		    case '\n':
-		      {
-			current_input_column = 0;
-			at_bol = true;
-			done = true;
-
-			block_comment_nesting_level++;
-			promptflag--;
-
-			buf += grab_block_comment (reader, eof);
-
-			in_comment = false;
-
-			if (eof)
-			  goto done;
-		      }
-		      break;
-
-		    default:
-		      at_bol = false;
-		      tmp_buf += static_cast<char> (c);
-		      buf += tmp_buf;
-		      done = true;
-		      break;
-		    }
-		}
-	    }
-	  else
-	    {
-	      at_bol = false;
-	      begin_comment = false;
-	    }
-	}	
-
-      if (in_comment)
-	{
-	  buf += static_cast<char> (c);
-
-	  if (c == '\n')
-	    {
-	      at_bol = true;
-	      current_input_column = 0;
-	      in_comment = false;
-
-	      // FIXME -- bailing out here prevents things like
-	      //
-	      //    octave> # comment
-	      //    octave> x = 1
-	      //
-	      // from failing at the command line, while still
-	      // allowing blocks of comments to be grabbed properly
-	      // for function doc strings.  But only the first line of
-	      // a mult-line doc string will be picked up for
-	      // functions defined on the command line.  We need a
-	      // better way of collecting these comments...
-	      if (! (reading_fcn_file || reading_script_file))
-		goto done;
-	    }
-	}
-      else
-	{
-	  switch (c)
-	    {
-	    case ' ':
-	    case '\t':
-	      break;
-
-	    case '#':
-	      if (! warned_incompatible)
-		{
-		  warned_incompatible = true;
-		  maybe_gripe_matlab_incompatible_comment (c);
-		}
-	      // fall through...
-
-	    case '%':
-	      in_comment = true;
-	      begin_comment = true;
-	      break;
-
-	    default:
-	      current_input_column--;
-	      reader.ungetc (c);
-	      goto done;
-	    }
-	}
-    }
-
- done:
-
-  if (c == EOF)
-    eof = true;
-
-  return buf;
-}
-
-class
-flex_stream_reader : public stream_reader
-{
-public:
-  flex_stream_reader (char *buf_arg) : stream_reader (), buf (buf_arg) { }
-
-  int getc (void) { return ::text_yyinput (); }
-  int ungetc (int c) { ::xunput (c, buf); return 0; }
-  
-private:
-  char *buf;
-};
-
-static int
-process_comment (bool start_in_block, bool& eof)
-{
-  eof = false;
-
-  std::string help_txt;
-
-  if (! help_buf.empty ())
-    help_txt = help_buf.top ();
-
-  flex_stream_reader flex_reader (yytext);
-
-  // process_comment is only supposed to be called when we are not
-  // initially looking at a block comment.
-
-  std::string txt = start_in_block
-    ? grab_block_comment (flex_reader, eof)
-    : grab_comment_block (flex_reader, false, eof);
-
-  if (lexer_debug_flag)
-    std::cerr << "C: " << txt << std::endl;
-
-  if (help_txt.empty () && nesting_level.none ())
-    {
-      if (! help_buf.empty ())
-	help_buf.pop ();
-
-      help_buf.push (txt);
-    }
-
-  octave_comment_buffer::append (txt);
-
-  current_input_column = 1;
-  lexer_flags.quote_is_transpose = false;
-  lexer_flags.convert_spaces_to_comma = true;
-  lexer_flags.at_beginning_of_statement = true;
-
-  if (YY_START == COMMAND_START)
-    BEGIN (INITIAL);
-
-  if (nesting_level.none ())
-    return '\n';
-  else if (nesting_level.is_bracket_or_brace ())
-    return ';';
-  else
-    return 0;
-}
-
-// Return 1 if the given character matches any character in the given
-// string.
-
-static bool
-match_any (char c, const char *s)
-{
-  char tmp;
-  while ((tmp = *s++) != '\0')
-    {
-      if (c == tmp)
-	return true;
-    }
-  return false;
-}
-
-// Given information about the spacing surrounding an operator,
-// return 1 if it looks like it should be treated as a binary
-// operator.  For example,
-//
-//   [ 1 + 2 ]  or  [ 1+ 2]  or  [ 1+2 ]  ==>  binary
-//
-//   [ 1 +2 ]  ==>  unary
-
-static bool
-looks_like_bin_op (bool spc_prev, int next_char)
-{
-  bool spc_next = (next_char == ' ' || next_char == '\t');
-
-  return ((spc_prev && spc_next) || ! spc_prev);
-}
-
-// Recognize separators.  If the separator is a CRLF pair, it is
-// replaced by a single LF.
-
-static bool
-next_token_is_sep_op (void)
-{
-  bool retval = false;
-
-  int c = text_yyinput ();
-
-  retval = match_any (c, ",;\n]");
-
-  xunput (c, yytext);
-
-  return retval;
-}
-
-// Try to determine if the next token should be treated as a postfix
-// unary operator.  This is ugly, but it seems to do the right thing.
-
-static bool
-next_token_is_postfix_unary_op (bool spc_prev)
-{
-  bool un_op = false;
-
-  int c0 = text_yyinput ();
-
-  if (c0 == '\'' && ! spc_prev)
-    {
-      un_op = true;
-    }
-  else if (c0 == '.')
-    {
-      int c1 = text_yyinput ();
-      un_op = (c1 == '\'');
-      xunput (c1, yytext);
-    }
-  else if (c0 == '+')
-    {
-      int c1 = text_yyinput ();
-      un_op = (c1 == '+');
-      xunput (c1, yytext);
-    }
-  else if (c0 == '-')
-    {
-      int c1 = text_yyinput ();
-      un_op = (c1 == '-');
-      xunput (c1, yytext);
-    }
-
-  xunput (c0, yytext);
-
-  return un_op;
-}
-
-// Try to determine if the next token should be treated as a binary
-// operator.
-//
-// This kluge exists because whitespace is not always ignored inside
-// the square brackets that are used to create matrix objects (though
-// spacing only really matters in the cases that can be interpreted
-// either as binary ops or prefix unary ops: currently just +, -).
-//
-// Note that a line continuation directly following a + or - operator
-// (e.g., the characters '[' 'a' ' ' '+' '\' LFD 'b' ']') will be
-// parsed as a binary operator.
-
-static bool
-next_token_is_bin_op (bool spc_prev)
-{
-  bool bin_op = false;
-
-  int c0 = text_yyinput ();
-
-  switch (c0)
-    {
-    case '+':
-    case '-':
-      {
-	int c1 = text_yyinput ();
-
-	switch (c1)
-	  {
-	  case '+':
-	  case '-':
-	    // Unary ops, spacing doesn't matter.
-	    break;
-
-	  case '=':
-	    // Binary ops, spacing doesn't matter.
-	    bin_op = true;
-	    break;
-
-	  default:
-	    // Could be either, spacing matters.
-	    bin_op = looks_like_bin_op (spc_prev, c1);
-	    break;
-	  }
-
-	xunput (c1, yytext);
-      }
-      break;
-
-    case ':':
-    case '/':
-    case '\\':
-    case '^':
-      // Always a binary op (may also include /=, \=, and ^=).
-      bin_op = true;
-      break;
-
-    // .+ .- ./ .\ .^ .* .**
-    case '.':
-      {
-	int c1 = text_yyinput ();
-
-	if (match_any (c1, "+-/\\^*"))
-	  // Always a binary op (may also include .+=, .-=, ./=, ...).
-	  bin_op = true;
-	else if (! isdigit (c1) && c1 != ' ' && c1 != '\t' && c1 != '.')
-	  // A structure element reference is a binary op.
-	  bin_op = true;
-
-	xunput (c1, yytext);
-      }
-      break;
-
-    // = == & && | || * **
-    case '=':
-    case '&':
-    case '|':
-    case '*':
-      // Always a binary op (may also include ==, &&, ||, **).
-      bin_op = true;
-      break;
-
-    // < <= <> > >=
-    case '<':
-    case '>':
-      // Always a binary op (may also include <=, <>, >=).
-      bin_op = true;
-      break;
-
-    // ~= !=
-    case '~':
-    case '!':
-      {
-	int c1 = text_yyinput ();
-
-	// ~ and ! can be unary ops, so require following =.
-	if (c1 == '=')
-	  bin_op = true;
-
-	xunput (c1, yytext);
-      }
-      break;
-
-    default:
-      break;
-    }
-
-  xunput (c0, yytext);
-
-  return bin_op;
-}
-
-// Used to delete trailing white space from tokens.
-
-static std::string
-strip_trailing_whitespace (char *s)
-{
-  std::string retval = s;
-
-  size_t pos = retval.find_first_of (" \t");
-
-  if (pos != std::string::npos)
-    retval.resize (pos);
-
-  return retval;
-}
-
-// FIXME -- we need to handle block comments here.
-
-static void
-scan_for_comments (const char *text)
-{
-  std::string comment_buf;
-
-  bool in_comment = false;
-  bool beginning_of_comment = false;
-
-  int len = strlen (text);
-  int i = 0;
-
-  while (i < len)
-    {
-      char c = text[i++];
-
-      switch (c)
-	{
-	case '%':
-	case '#':
-	  if (in_comment)
-	    {
-	      if (! beginning_of_comment)
-		comment_buf += static_cast<char> (c);
-	    }
-	  else
-	    {
-	      maybe_gripe_matlab_incompatible_comment (c);
-	      in_comment = true;
-	      beginning_of_comment = true;
-	    }
-	  break;
-
-	case '\n':
-	  if (in_comment)
-	    {
-	      comment_buf += static_cast<char> (c);
-	      octave_comment_buffer::append (comment_buf);
-	      comment_buf.resize (0);
-	      in_comment = false;
-	      beginning_of_comment = false;
-	    }
-	  break;
-
-	default:
-	  if (in_comment)
-	    {
-	      comment_buf += static_cast<char> (c);
-	      beginning_of_comment = false;
-	    }
-	  break;
-	}
-    }
-
-  if (! comment_buf.empty ())
-    octave_comment_buffer::append (comment_buf);
-}
-
-// Discard whitespace, including comments and continuations.
-//
-// Return value is logical OR of the following values:
-//
-//  ATE_NOTHING      : no spaces to eat
-//  ATE_SPACE_OR_TAB : space or tab in input
-//  ATE_NEWLINE      : bare new line in input
-
-// FIXME -- we need to handle block comments here.
-
-static yum_yum
-eat_whitespace (void)
-{
-  yum_yum retval = ATE_NOTHING;
-
-  std::string comment_buf;
-
-  bool in_comment = false;
-  bool beginning_of_comment = false;
-
-  int c = 0;
-
-  while ((c = text_yyinput ()) != EOF)
-    {
-      current_input_column++;
-
-      switch (c)
-	{
-	case ' ':
-	case '\t':
-	  if (in_comment)
-	    {
-	      comment_buf += static_cast<char> (c);
-	      beginning_of_comment = false;
-	    }
-	  retval |= ATE_SPACE_OR_TAB;
-	  break;
-
-	case '\n':
-	  retval |= ATE_NEWLINE;
-	  if (in_comment)
-	    {
-	      comment_buf += static_cast<char> (c);
-	      octave_comment_buffer::append (comment_buf);
-	      comment_buf.resize (0);
-	      in_comment = false;
-	      beginning_of_comment = false;
-	    }
-	  current_input_column = 0;
-	  break;
-
-	case '#':
-	case '%':
-	  if (in_comment)
-	    {
-	      if (! beginning_of_comment)
-		comment_buf += static_cast<char> (c);
-	    }
-	  else
-	    {
-	      maybe_gripe_matlab_incompatible_comment (c);
-	      in_comment = true;
-	      beginning_of_comment = true;
-	    }
-	  break;
-
-	case '.':
-	  if (in_comment)
-	    {
-	      comment_buf += static_cast<char> (c);
-	      beginning_of_comment = false;
-	      break;
-	    }
-	  else
-	    {
-	      if (have_ellipsis_continuation ())
-		break;
-	      else
-		goto done;
-	    }
-
-	case '\\':
-	  if (in_comment)
-	    {
-	      comment_buf += static_cast<char> (c);
-	      beginning_of_comment = false;
-	      break;
-	    }
-	  else
-	    {
-	      if (have_continuation ())
-		break;
-	      else
-		goto done;
-	    }
-
-	default:
-	  if (in_comment)
-	    {
-	      comment_buf += static_cast<char> (c);
-	      beginning_of_comment = false;
-	      break;
-	    }
-	  else
-	    goto done;
-	}
-    }
-
-  if (! comment_buf.empty ())
-    octave_comment_buffer::append (comment_buf);
-
- done:
-  xunput (c, yytext);
-  current_input_column--;
-  return retval;
-}
-
-static inline bool
-looks_like_hex (const char *s, int len)
-{
-  return (len > 2 && s[0] == '0' && (s[1] == 'x' || s[1] == 'X'));
-}
-
-static void
-handle_number (void)
-{
-  double value = 0.0;
-  int nread = 0;
-
-  if (looks_like_hex (yytext, strlen (yytext)))
-    {
-      unsigned long ival;
-
-      nread = sscanf (yytext, "%lx", &ival);
-
-      value = static_cast<double> (ival);
-    }
-  else
-    {
-      char *tmp = strsave (yytext);
-
-      char *idx = strpbrk (tmp, "Dd");
-
-      if (idx)
-	*idx = 'e';
-
-      nread = sscanf (tmp, "%lf", &value);
-
-      delete [] tmp;
-    }
-
-  // If yytext doesn't contain a valid number, we are in deep doo doo.
-
-  assert (nread == 1);
-
-  lexer_flags.quote_is_transpose = true;
-  lexer_flags.convert_spaces_to_comma = true;
-  lexer_flags.looking_for_object_index = true;
-  lexer_flags.at_beginning_of_statement = false;
-
-  yylval.tok_val = new token (value, yytext, input_line_number,
-			      current_input_column);
-
-  token_stack.push (yylval.tok_val);
-
-  current_input_column += yyleng;
-
-  do_comma_insert_check ();
-}
-
-// We have seen a backslash and need to find out if it should be
-// treated as a continuation character.  If so, this eats it, up to
-// and including the new line character.
-//
-// Match whitespace only, followed by a comment character or newline.
-// Once a comment character is found, discard all input until newline.
-// If non-whitespace characters are found before comment
-// characters, return 0.  Otherwise, return 1.
-
-// FIXME -- we need to handle block comments here.
-
-static bool
-have_continuation (bool trailing_comments_ok)
-{
-  std::ostringstream buf;
-
-  std::string comment_buf;
-
-  bool in_comment = false;
-  bool beginning_of_comment = false;
-
-  int c = 0;
-
-  while ((c = text_yyinput ()) != EOF)
-    {
-      buf << static_cast<char> (c);
-
-      switch (c)
-	{
-	case ' ':
-	case '\t':
-	  if (in_comment)
-	    {
-	      comment_buf += static_cast<char> (c);
-	      beginning_of_comment = false;
-	    }
-	  break;
-
-	case '%':
-	case '#':
-	  if (trailing_comments_ok)
-	    {
-	      if (in_comment)
-		{
-		  if (! beginning_of_comment)
-		    comment_buf += static_cast<char> (c);
-		}
-	      else
-		{
-		  maybe_gripe_matlab_incompatible_comment (c);
-		  in_comment = true;
-		  beginning_of_comment = true;
-		}
-	    }
-	  else
-	    goto cleanup;
-	  break;
-
-	case '\n':
-	  if (in_comment)
-	    {
-	      comment_buf += static_cast<char> (c);
-	      octave_comment_buffer::append (comment_buf);
-	    }
-	  current_input_column = 0;
-	  promptflag--;
-	  gripe_matlab_incompatible_continuation ();
-	  return true;
-
-	default:
-	  if (in_comment)
-	    {
-	      comment_buf += static_cast<char> (c);
-	      beginning_of_comment = false;
-	    }
-	  else
-	    goto cleanup;
-	  break;
-	}
-    }
-
-  xunput (c, yytext);
-  return false;
-
-cleanup:
-
-  std::string s = buf.str ();
-
-  int len = s.length ();
-  while (len--)
-    xunput (s[len], yytext);
-
-  return false;
-}
-
-// We have seen a `.' and need to see if it is the start of a
-// continuation.  If so, this eats it, up to and including the new
-// line character.
-
-static bool
-have_ellipsis_continuation (bool trailing_comments_ok)
-{
-  char c1 = text_yyinput ();
-  if (c1 == '.')
-    {
-      char c2 = text_yyinput ();
-      if (c2 == '.' && have_continuation (trailing_comments_ok))
-	return true;
-      else
-	{
-	  xunput (c2, yytext);
-	  xunput (c1, yytext);
-	}
-    }
-  else
-    xunput (c1, yytext);
-
-  return false;
-}
-
-// See if we have a continuation line.  If so, eat it and the leading
-// whitespace on the next line.
-//
-// Return value is the same as described for eat_whitespace().
-
-static yum_yum
-eat_continuation (void)
-{
-  int retval = ATE_NOTHING;
-
-  int c = text_yyinput ();
-
-  if ((c == '.' && have_ellipsis_continuation ())
-      || (c == '\\' && have_continuation ()))
-    retval = eat_whitespace ();
-  else
-    xunput (c, yytext);
-
-  return retval;
-}
-
-static int
-handle_string (char delim)
-{
-  std::ostringstream buf;
-
-  int bos_line = input_line_number;
-  int bos_col = current_input_column;
-
-  int c;
-  int escape_pending = 0;
-
-  while ((c = text_yyinput ()) != EOF)
-    {
-      current_input_column++;
-
-      if (c == '\\')
-	{
-	  if (delim == '\'' || escape_pending)
-	    {
-	      buf << static_cast<char> (c);
-	      escape_pending = 0;
-	    }
-	  else
-	    {
-	      if (have_continuation (false))
-		escape_pending = 0;
-	      else
-		{
-		  buf << static_cast<char> (c);
-		  escape_pending = 1;
-		}
-	    }
-	  continue;
-	}
-      else if (c == '.')
-	{
-	  if (delim == '\'' || ! have_ellipsis_continuation (false))
-	    buf << static_cast<char> (c);
-	}
-      else if (c == '\n')
-	{
-	  error ("unterminated string constant");
-	  break;
-	}
-      else if (c == delim)
-	{
-	  if (escape_pending)
-	    buf << static_cast<char> (c);
-	  else
-	    {
-	      c = text_yyinput ();
-	      if (c == delim)
-		{
-		  buf << static_cast<char> (c);		    
-		}
-	      else
-		{
-		  std::string s;  
-		  xunput (c, yytext);
-
-		  if (delim == '\'')
-		    s = buf.str ();
-		  else
-		    s = do_string_escapes (buf.str ());
-
-		  lexer_flags.quote_is_transpose = true;
-		  lexer_flags.convert_spaces_to_comma = true;
-
-		  yylval.tok_val = new token (s, bos_line, bos_col);
-		  token_stack.push (yylval.tok_val);
-
-		  if (delim == '"')
-		    gripe_matlab_incompatible ("\" used as string delimiter");
-		  else if (delim == '\'')
-		    gripe_single_quote_string ();
-
-                  lexer_flags.looking_for_object_index = true;
-		  lexer_flags.at_beginning_of_statement = false;
-
-		  return delim == '"' ? DQ_STRING : SQ_STRING;
-		}
-	    }
-	}
-      else
-	{
-	  buf << static_cast<char> (c);
-	}
-
-      escape_pending = 0;
-    }
-
-  return LEXICAL_ERROR;
-}
-
-static bool
-next_token_is_assign_op (void)
-{
-  bool retval = false;
-
-  int c0 = text_yyinput ();
-
-  switch (c0)
-    {
-    case '=':
-      {
-	int c1 = text_yyinput ();
-	xunput (c1, yytext);
-	if (c1 != '=')
-	  retval = true;
-      }
-      break;
-
-    case '+':
-    case '-':
-    case '*':
-    case '/':
-    case '\\':
-    case '&':
-    case '|':
-      {
-	int c1 = text_yyinput ();
-	xunput (c1, yytext);
-	if (c1 == '=')
-	  retval = true;
-      }
-      break;
-
-    case '.':
-      {
-	int c1 = text_yyinput ();
-	if (match_any (c1, "+-*/\\"))
-	  {
-	    int c2 = text_yyinput ();
-	    xunput (c2, yytext);
-	    if (c2 == '=')
-	      retval = true;
-	  }
-	xunput (c1, yytext);
-      }
-      break;
-
-    case '>':
-      {
-	int c1 = text_yyinput ();
-	if (c1 == '>')
-	  {
-	    int c2 = text_yyinput ();
-	    xunput (c2, yytext);
-	    if (c2 == '=')
-	      retval = true;
-	  }
-	xunput (c1, yytext);
-      }
-      break;
-
-    case '<':
-      {
-	int c1 = text_yyinput ();
-	if (c1 == '<')
-	  {
-	    int c2 = text_yyinput ();
-	    xunput (c2, yytext);
-	    if (c2 == '=')
-	      retval = true;
-	  }
-	xunput (c1, yytext);
-      }
-      break;
-
-    default:
-      break;
-    }
-
-  xunput (c0, yytext);
-
-  return retval;
-}
-
-static bool
-next_token_is_index_op (void)
-{
-  int c = text_yyinput ();
-  xunput (c, yytext);
-  return c == '(' || c == '{';
-}
-
-static int
-handle_close_bracket (bool spc_gobbled, int bracket_type)
-{
-  int retval = bracket_type;
-
-  if (! nesting_level.none ())
-    {
-      nesting_level.remove ();
-
-      if (bracket_type == ']')
-	lexer_flags.bracketflag--;
-      else if (bracket_type == '}')
-	lexer_flags.braceflag--;
-      else
-	panic_impossible ();
-    }
-
-  if (lexer_flags.bracketflag == 0 && lexer_flags.braceflag == 0)
-    BEGIN (INITIAL);
-
-  if (bracket_type == ']'
-      && next_token_is_assign_op ()
-      && ! lexer_flags.looking_at_return_list)
-    {
-      retval = CLOSE_BRACE;
-    }
-  else if ((lexer_flags.bracketflag || lexer_flags.braceflag)
-	   && lexer_flags.convert_spaces_to_comma
-	   && (nesting_level.is_bracket ()
-	       || (nesting_level.is_brace ()
-		   && ! lexer_flags.looking_at_object_index.front ())))
-    {
-      bool index_op = next_token_is_index_op ();
-
-      // Don't insert comma if we are looking at something like
-      //
-      //   [x{i}{j}] or [x{i}(j)]
-      //
-      // but do if we are looking at
-      //
-      //   [x{i} {j}] or [x{i} (j)]
-
-      if (spc_gobbled || ! (bracket_type == '}' && index_op))
-	{
-	  bool bin_op = next_token_is_bin_op (spc_gobbled);
-
-	  bool postfix_un_op = next_token_is_postfix_unary_op (spc_gobbled);
-
-	  bool sep_op = next_token_is_sep_op ();
-
-	  if (! (postfix_un_op || bin_op || sep_op))
-	    {
-	      maybe_warn_separator_insert (',');
-
-	      xunput (',', yytext);
-	      return retval;
-	    }
-	}
-    }
-
-  lexer_flags.quote_is_transpose = true;
-  lexer_flags.convert_spaces_to_comma = true;
-
-  return retval;
-}
-
-static void
-maybe_unput_comma (int spc_gobbled)
-{
-  if (nesting_level.is_bracket ()
-      || (nesting_level.is_brace ()
-	  && ! lexer_flags.looking_at_object_index.front ()))
-    {
-      int bin_op = next_token_is_bin_op (spc_gobbled);
-
-      int postfix_un_op = next_token_is_postfix_unary_op (spc_gobbled);
-
-      int c1 = text_yyinput ();
-      int c2 = text_yyinput ();
-
-      xunput (c2, yytext);
-      xunput (c1, yytext);
-
-      int sep_op = next_token_is_sep_op ();
-
-      int dot_op = (c1 == '.'
-		    && (isalpha (c2) || isspace (c2) || c2 == '_'));
-
-      if (postfix_un_op || bin_op || sep_op || dot_op)
-	return;
-
-      int index_op = (c1 == '(' || c1 == '{');
-
-      // If there is no space before the indexing op, we don't insert
-      // a comma.
-
-      if (index_op && ! spc_gobbled)
-	return;
-
-      maybe_warn_separator_insert (',');
-
-      xunput (',', yytext);
-    }
-}
-
-static bool
-next_token_can_follow_bin_op (void)
-{
-  std::stack<char> buf;
-
-  int c = EOF;
-
-  // Skip whitespace in current statement on current line
-  while (true)
-    {
-      c = text_yyinput ();
-
-      buf.push (c);
-
-      if (match_any (c, ",;\n") || (c != ' ' && c != '\t'))
-	break;
-    }
-
-  // Restore input.
-  while (! buf.empty ())
-    {
-      xunput (buf.top (), yytext);
-
-      buf.pop ();
-    }
-
-  return (isalnum (c) || match_any (c, "!\"'(-[_{~"));
-}
-
-static bool
-looks_like_command_arg (void)
-{
-  bool retval = true;
-
-  int c0 = text_yyinput ();
-
-  switch (c0)
-    {
-    // = ==
-    case '=':
-      {
-	int c1 = text_yyinput ();
-
-	if (c1 == '=')
-	  {
-	    int c2 = text_yyinput ();
-
-	    if (! match_any (c2, ",;\n") && (c2 == ' ' || c2 == '\t')
-		&& next_token_can_follow_bin_op ())
-	      retval = false;
-
-	    xunput (c2, yytext);
-	  }
-	else
-	  retval = false;
-
-	xunput (c1, yytext);
-      }
-      break;
-
-    case '(':
-    case '{':
-      // Indexing.
-      retval = false;
-      break;
-
-    case '\n':
-      // EOL.
-      break;
-
-    case '\'':
-    case '"':
-      // Beginning of a character string.
-      break;
-
-    // + - ++ -- += -=
-    case '+':
-    case '-':
-      {
-	int c1 = text_yyinput ();
-
-	switch (c1)
-	  {
-	  case '\n':
-	    // EOL.
-	  case '+':
-	  case '-':
-	    // Unary ops, spacing doesn't matter.
-	    break;
-
-	  case '\t':
-	  case ' ':
-	    {
-	      if (next_token_can_follow_bin_op ())
-		retval = false;
-	    }
-	    break;
-
-	  case '=':
-	    {
-	      int c2 = text_yyinput ();
-
-	      if (! match_any (c2, ",;\n") && (c2 == ' ' || c2 == '\t')
-		  && next_token_can_follow_bin_op ())
-		retval = false;
-
-	      xunput (c2, yytext);
-	    }
-	    break;
-	  }
-
-	xunput (c1, yytext);
-      }
-      break;
-
-    case ':':
-    case '/':
-    case '\\':
-    case '^':
-      {
-	int c1 = text_yyinput ();
-
-	if (! match_any (c1, ",;\n") && (c1 == ' ' || c1 == '\t')
-	    && next_token_can_follow_bin_op ())
-	  retval = false;
-
-	xunput (c1, yytext);
-      }
-      break;
-
-    // .+ .- ./ .\ .^ .* .**
-    case '.':
-      {
-	int c1 = text_yyinput ();
-
-	if (match_any (c1, "+-/\\^*"))
-	  {
-	    int c2 = text_yyinput ();
-
-	    if (c2 == '=')
-	      {
-		int c3 = text_yyinput ();
-
-		if (! match_any (c3, ",;\n") && (c3 == ' ' || c3 == '\t')
-		    && next_token_can_follow_bin_op ())
-		  retval = false;
-
-		xunput (c3, yytext);
-	      }
-	    else if (! match_any (c2, ",;\n") && (c2 == ' ' || c2 == '\t')
-		     && next_token_can_follow_bin_op ())
-	      retval = false;
-
-	    xunput (c2, yytext);
-	  }
-	else if (! match_any (c1, ",;\n")
-		 && (! isdigit (c1) && c1 != ' ' && c1 != '\t'
-		     && c1 != '.'))
-	  {
-	    // Structure reference.  FIXME -- is this a complete check?
-
-	    retval = false;
-	  }
-
-	xunput (c1, yytext);
-      }
-      break;
-
-    // & && | || * **
-    case '&':
-    case '|':
-    case '*':
-      {
-	int c1 = text_yyinput ();
-
-	if (c1 == c0)
-	  {
-	    int c2 = text_yyinput ();
-
-	    if (! match_any (c2, ",;\n") && (c2 == ' ' || c2 == '\t')
-		&& next_token_can_follow_bin_op ())
-	      retval = false;
-
-	    xunput (c2, yytext);
-	  }
-	else if (! match_any (c1, ",;\n") && (c1 == ' ' || c1 == '\t')
-		 && next_token_can_follow_bin_op ())
-	  retval = false;
-
-	xunput (c1, yytext);
-      }
-      break;
-
-    // < <= > >=
-    case '<':
-    case '>':
-      {
-	int c1 = text_yyinput ();
-
-	if (c1 == '=')
-	  {
-	    int c2 = text_yyinput ();
-
-	    if (! match_any (c2, ",;\n") && (c2 == ' ' || c2 == '\t')
-		&& next_token_can_follow_bin_op ())
-	      retval = false;
-
-	    xunput (c2, yytext);
-	  }
-	else if (! match_any (c1, ",;\n") && (c1 == ' ' || c1 == '\t')
-		 && next_token_can_follow_bin_op ())
-	  retval = false;
-
-	xunput (c1, yytext);
-      }
-      break;
-
-    // ~= !=
-    case '~':
-    case '!':
-      {
-	int c1 = text_yyinput ();
-
-	// ~ and ! can be unary ops, so require following =.
-	if (c1 == '=')
-	  {
-	    int c2 = text_yyinput ();
-
-	    if (! match_any (c2, ",;\n") && (c2 == ' ' || c2 == '\t')
-		&& next_token_can_follow_bin_op ())
-	      retval = false;
-
-	    xunput (c2, yytext);
-	  }
-	else if (! match_any (c1, ",;\n") && (c1 == ' ' || c1 == '\t')
-		 && next_token_can_follow_bin_op ())
-	  retval = false;
-
-	xunput (c1, yytext);
-      }
-      break;
-
-    default:
-      break;
-    }
-
-  xunput (c0, yytext);
-
-  return retval;
-}
-
-static int
-handle_superclass_identifier (void)
-{
-  eat_continuation ();
-
-  std::string pkg;  
-  std::string meth = strip_trailing_whitespace (yytext); 
-  size_t pos = meth.find ("@");
-  std::string cls = meth.substr (pos).substr (1);
-  meth = meth.substr (0, pos - 1);  
-  
-  pos = cls.find (".");
-  if (pos != std::string::npos)
-    {	 
-      pkg = cls.substr (pos).substr (1);
-      cls = cls.substr (0, pos - 1);
-    }
-    
-  int kw_token = (is_keyword_token (meth) || is_keyword_token (cls)
-		  || is_keyword_token (pkg));
-  if (kw_token)
-    {
-      error ("method, class and package names may not be keywords");
-      return LEXICAL_ERROR;
-    }
- 
-  yylval.tok_val
-    = new token (meth.empty () ? 0 : &(symbol_table::insert (meth)),
-                 cls.empty () ? 0 : &(symbol_table::insert (cls)),
-                 pkg.empty () ? 0 : &(symbol_table::insert (pkg)),
-		 input_line_number, current_input_column);				   
-  token_stack.push (yylval.tok_val);
-  
-  lexer_flags.convert_spaces_to_comma = true;
-  current_input_column += yyleng;
-  
-  return SUPERCLASSREF;
-}
-
-static int
-handle_meta_identifier (void)
-{
-  eat_continuation ();
-
-  std::string pkg;
-  std::string cls = strip_trailing_whitespace (yytext).substr (1);
-  size_t pos = cls.find (".");
-  
-  if (pos != std::string::npos)
-    {	 
-      pkg = cls.substr (pos).substr (1);
-      cls = cls.substr (0, pos - 1);
-    }
-  
-  int kw_token = is_keyword_token (cls) || is_keyword_token (pkg);
-  if (kw_token)
-    {
-       error ("class and package names may not be keywords");
-      return LEXICAL_ERROR;
-    }
-  
-  yylval.tok_val
-    = new token (cls.empty () ? 0 : &(symbol_table::insert (cls)),
-		 pkg.empty () ? 0 : &(symbol_table::insert (pkg)),
-		 input_line_number, current_input_column);
-
-  token_stack.push (yylval.tok_val);
-                   
-  lexer_flags.convert_spaces_to_comma = true;
-  current_input_column += yyleng;
-  
-  return METAQUERY;
-}
-
-// Figure out exactly what kind of token to return when we have seen
-// an identifier.  Handles keywords.  Return -1 if the identifier
-// should be ignored.
-
-static int
-handle_identifier (void)
-{
-  bool at_bos = lexer_flags.at_beginning_of_statement;
-
-  std::string tok = strip_trailing_whitespace (yytext);
-
-  int c = yytext[yyleng-1];
-
-  int cont_is_spc = eat_continuation ();
-
-  int spc_gobbled = (cont_is_spc || c == ' ' || c == '\t');
-
-  // If we are expecting a structure element, avoid recognizing
-  // keywords and other special names and return STRUCT_ELT, which is
-  // a string that is also a valid identifier.  But first, we have to
-  // decide whether to insert a comma.
-
-  if (lexer_flags.looking_at_indirect_ref)
-    {
-      do_comma_insert_check ();
-
-      maybe_unput_comma (spc_gobbled);
-
-      yylval.tok_val = new token (tok, input_line_number,
-				  current_input_column);
-
-      token_stack.push (yylval.tok_val);
-
-      lexer_flags.quote_is_transpose = true;
-      lexer_flags.convert_spaces_to_comma = true;
-      lexer_flags.looking_for_object_index = true;
-
-      current_input_column += yyleng;
-
-      return STRUCT_ELT;
-    }
-
-  lexer_flags.at_beginning_of_statement = false;
-
-  // The is_keyword_token may reset
-  // lexer_flags.at_beginning_of_statement.  For example, if it sees
-  // an else token, then the next token is at the beginning of a
-  // statement.
-
-  int kw_token = is_keyword_token (tok);
-
-  // If we found a keyword token, then the beginning_of_statement flag
-  // is already set.  Otherwise, we won't be at the beginning of a
-  // statement.
-
-  if (lexer_flags.looking_at_function_handle)
-    {
-      if (kw_token)
-	{
-	  error ("function handles may not refer to keywords");
-
-	  return LEXICAL_ERROR;
-	}
-      else
-	{
-	  yylval.tok_val = new token (tok, input_line_number,
-				      current_input_column);
-
-	  token_stack.push (yylval.tok_val);
-
-	  current_input_column += yyleng;
-	  lexer_flags.quote_is_transpose = false;
-	  lexer_flags.convert_spaces_to_comma = true;
-	  lexer_flags.looking_for_object_index = true;
-
-	  return FCN_HANDLE;
-	}
-    }
-
-  // If we have a regular keyword, return it.
-  // Keywords can be followed by identifiers.
-
-  if (kw_token)
-    {
-      if (kw_token >= 0)
-	{
-	  current_input_column += yyleng;
-	  lexer_flags.quote_is_transpose = false;
-	  lexer_flags.convert_spaces_to_comma = true;
-	  lexer_flags.looking_for_object_index = false;
-	}
-
-      return kw_token;
-    }
-
-  // See if we have a plot keyword (title, using, with, or clear).
-
-  int c1 = text_yyinput ();
-
-  bool next_tok_is_eq = false;
-  if (c1 == '=')
-    {
-      int c2 = text_yyinput ();
-      xunput (c2, yytext);
-
-      if (c2 != '=')
-	next_tok_is_eq = true;
-    }
-
-  xunput (c1, yytext);
-
-  // Kluge alert.
-  //
-  // If we are looking at a text style function, set up to gobble its
-  // arguments.
-  //
-  // If the following token is `=', or if we are parsing a function
-  // return list or function parameter list, or if we are looking at
-  // something like [ab,cd] = foo (), force the symbol to be inserted
-  // as a variable in the current symbol table.
-
-  if (! is_variable (tok))
-    {
-      if (at_bos && spc_gobbled && looks_like_command_arg ())
-	{
-	  BEGIN (COMMAND_START);
-	}
-      else if (next_tok_is_eq
-	       || lexer_flags.looking_at_decl_list
-	       || lexer_flags.looking_at_return_list
-	       || (lexer_flags.looking_at_parameter_list
-		   && ! lexer_flags.looking_at_initializer_expression))
-	{
-	  symbol_table::force_variable (tok);
-	}
-      else if (lexer_flags.looking_at_matrix_or_assign_lhs)
-	{
-	  lexer_flags.pending_local_variables.insert (tok);
-	}
-    }
-
-  // Find the token in the symbol table.  Beware the magic
-  // transformation of the end keyword...
-
-  if (tok == "end")
-    tok = "__end__";    
-
-  yylval.tok_val = new token (&(symbol_table::insert (tok)),
-			      input_line_number, current_input_column);
-
-  token_stack.push (yylval.tok_val);
-
-  // After seeing an identifer, it is ok to convert spaces to a comma
-  // (if needed).
-
-  lexer_flags.convert_spaces_to_comma = true;
-
-  if (! (next_tok_is_eq || YY_START == COMMAND_START))
-    {
-      lexer_flags.quote_is_transpose = true;
-
-      do_comma_insert_check ();
-
-      maybe_unput_comma (spc_gobbled);
-    }
-
-  current_input_column += yyleng;
-
-  if (tok != "__end__")
-    lexer_flags.looking_for_object_index = true;
-
-  return NAME;
-}
-
-void
-lexical_feedback::init (void)
-{
-  // Not initially defining a matrix list.
-  bracketflag = 0;
-
-  // Not initially defining a cell array list.
-  braceflag = 0;
-
-  // Not initially inside a loop or if statement.
-  looping = 0;
-
-  // Not initially defining a function.
-  defining_func = false;
-  parsed_function_name = false;
-  parsing_class_method = false;
-  
-  // Not initially defining a class with classdef.
-  maybe_classdef_get_set_method = false;
-  parsing_classdef = false;
-
-  // Not initiallly looking at a function handle.
-  looking_at_function_handle = 0;
-
-  // Not parsing a function return, parameter, or declaration list.
-  looking_at_return_list = false;
-  looking_at_parameter_list = false;
-  looking_at_decl_list = false;
-
-  // Not looking at an argument list initializer expression.
-  looking_at_initializer_expression = false;
-
-  // Not parsing a matrix or the left hand side of multi-value
-  // assignment statement.
-  looking_at_matrix_or_assign_lhs = false;
-
-  // Not parsing an object index.
-  while (! looking_at_object_index.empty ())
-    looking_at_object_index.pop_front ();
-
-  looking_at_object_index.push_front (false);
-
-  // Object index not possible until we've seen something.
-  looking_for_object_index = false;
-
-  // Yes, we are at the beginning of a statement.
-  at_beginning_of_statement = true;
-
-  // No need to do comma insert or convert spaces to comma at
-  // beginning of input. 
-  convert_spaces_to_comma = true;
-  do_comma_insert = false;
-
-  // Not initially looking at indirect references.
-  looking_at_indirect_ref = false;
-
-  // Quote marks strings intially.
-  quote_is_transpose = false;
-
-  // Set of identifiers that might be local variable names is empty.
-  pending_local_variables.clear ();
-}
-
-bool
-is_keyword (const std::string& s)
-{
-  return octave_kw_hash::in_word_set (s.c_str (), s.length ()) != 0;
-}
-
-DEFUN (iskeyword, args, ,
-  "-*- texinfo -*-\n\
-@deftypefn {Built-in Function} {} iskeyword (@var{name})\n\
-Return true if @var{name} is an Octave keyword.  If @var{name}\n\
-is omitted, return a list of keywords.\n\
-@end deftypefn")
-{
-  octave_value retval;
-
-  int argc = args.length () + 1;
-
-  string_vector argv = args.make_argv ("iskeyword");
-
-  if (error_state)
-    return retval;
-
-  if (argc == 1)
-    {
-      string_vector lst (TOTAL_KEYWORDS);
-
-      for (int i = 0; i < TOTAL_KEYWORDS; i++)
-	lst[i] = wordlist[i].name;
-
-      retval = Cell (lst.sort ());
-    }
-  else if (argc == 2)
-    {
-      retval = is_keyword (argv[1]);
-    }
-  else
-    print_usage ();
-
-  return retval;
-}
-
-void
-prep_lexer_for_script_file (void)
-{
-  BEGIN (SCRIPT_FILE_BEGIN);
-}
-
-void
-prep_lexer_for_function_file (void)
-{
-  BEGIN (FUNCTION_FILE_BEGIN);
-}
-
-static void
-maybe_warn_separator_insert (char sep)
-{
-  std::string nm = curr_fcn_file_full_name;
-
-  if (nm.empty ())
-    warning_with_id ("Octave:separator-insert",
-		     "potential auto-insertion of `%c' near line %d",
-		     sep, input_line_number);
-  else
-    warning_with_id ("Octave:separator-insert",
-		     "potential auto-insertion of `%c' near line %d of file %s",
-		     sep, input_line_number, nm.c_str ());
-}
-
-static void
-gripe_single_quote_string (void)
-{
-  std::string nm = curr_fcn_file_full_name;
-
-  if (nm.empty ())
-    warning_with_id ("Octave:single-quote-string",
-		     "single quote delimited string near line %d",
-		     input_line_number);
-  else
-    warning_with_id ("Octave:single-quote-string",
-		     "single quote delimited string near line %d of file %s",
-		     input_line_number, nm.c_str ());
-}
-
-static void
-gripe_matlab_incompatible (const std::string& msg)
-{
-  std::string nm = curr_fcn_file_full_name;
-
-  if (nm.empty ())
-    warning_with_id ("Octave:matlab-incompatible",
-		     "potential Matlab compatibility problem: %s",
-		     msg.c_str ());
-  else
-    warning_with_id ("Octave:matlab-incompatible",
-		     "potential Matlab compatibility problem: %s near line %d offile %s",
-		     msg.c_str (), input_line_number, nm.c_str ());
-}
-
-static void
-maybe_gripe_matlab_incompatible_comment (char c)
-{
-  if (c == '#')
-    gripe_matlab_incompatible ("# used as comment character");
-}
-
-static void
-gripe_matlab_incompatible_continuation (void)
-{
-  gripe_matlab_incompatible ("\\ used as line continuation marker");
-}
-
-static void
-gripe_matlab_incompatible_operator (const std::string& op)
-{
-  std::string t = op;
-  int n = t.length ();
-  if (t[n-1] == '\n')
-    t.resize (n-1);
-  gripe_matlab_incompatible (t + " used as operator");
-}
-
-static void
-display_token (int tok)
-{
-  switch (tok)
-    {
-    case '=': std::cerr << "'='\n"; break;
-    case ':': std::cerr << "':'\n"; break;
-    case '-': std::cerr << "'-'\n"; break;
-    case '+': std::cerr << "'+'\n"; break;
-    case '*': std::cerr << "'*'\n"; break;
-    case '/': std::cerr << "'/'\n"; break;
-    case ADD_EQ: std::cerr << "ADD_EQ\n"; break;
-    case SUB_EQ: std::cerr << "SUB_EQ\n"; break;
-    case MUL_EQ: std::cerr << "MUL_EQ\n"; break;
-    case DIV_EQ: std::cerr << "DIV_EQ\n"; break;
-    case LEFTDIV_EQ: std::cerr << "LEFTDIV_EQ\n"; break;
-    case POW_EQ: std::cerr << "POW_EQ\n"; break;
-    case EMUL_EQ: std::cerr << "EMUL_EQ\n"; break;
-    case EDIV_EQ: std::cerr << "EDIV_EQ\n"; break;
-    case ELEFTDIV_EQ: std::cerr << "ELEFTDIV_EQ\n"; break;
-    case EPOW_EQ: std::cerr << "EPOW_EQ\n"; break;
-    case AND_EQ: std::cerr << "AND_EQ\n"; break;
-    case OR_EQ: std::cerr << "OR_EQ\n"; break;
-    case LSHIFT_EQ: std::cerr << "LSHIFT_EQ\n"; break;
-    case RSHIFT_EQ: std::cerr << "RSHIFT_EQ\n"; break;
-    case LSHIFT: std::cerr << "LSHIFT\n"; break;
-    case RSHIFT: std::cerr << "RSHIFT\n"; break;
-    case EXPR_AND_AND: std::cerr << "EXPR_AND_AND\n"; break;
-    case EXPR_OR_OR: std::cerr << "EXPR_OR_OR\n"; break;
-    case EXPR_AND: std::cerr << "EXPR_AND\n"; break;
-    case EXPR_OR: std::cerr << "EXPR_OR\n"; break;
-    case EXPR_NOT: std::cerr << "EXPR_NOT\n"; break;
-    case EXPR_LT: std::cerr << "EXPR_LT\n"; break;
-    case EXPR_LE: std::cerr << "EXPR_LE\n"; break;
-    case EXPR_EQ: std::cerr << "EXPR_EQ\n"; break;
-    case EXPR_NE: std::cerr << "EXPR_NE\n"; break;
-    case EXPR_GE: std::cerr << "EXPR_GE\n"; break;
-    case EXPR_GT: std::cerr << "EXPR_GT\n"; break;
-    case LEFTDIV: std::cerr << "LEFTDIV\n"; break;
-    case EMUL: std::cerr << "EMUL\n"; break;
-    case EDIV: std::cerr << "EDIV\n"; break;
-    case ELEFTDIV: std::cerr << "ELEFTDIV\n"; break;
-    case EPLUS: std::cerr << "EPLUS\n"; break;
-    case EMINUS: std::cerr << "EMINUS\n"; break;
-    case QUOTE: std::cerr << "QUOTE\n"; break;
-    case TRANSPOSE: std::cerr << "TRANSPOSE\n"; break;
-    case PLUS_PLUS: std::cerr << "PLUS_PLUS\n"; break;
-    case MINUS_MINUS: std::cerr << "MINUS_MINUS\n"; break;
-    case POW: std::cerr << "POW\n"; break;
-    case EPOW: std::cerr << "EPOW\n"; break;
-    case NUM: std::cerr << "NUM\n"; break;
-    case IMAG_NUM: std::cerr << "IMAG_NUM\n"; break;
-    case STRUCT_ELT: std::cerr << "STRUCT_ELT\n"; break;
-    case NAME: std::cerr << "NAME\n"; break;
-    case END: std::cerr << "END\n"; break;
-    case DQ_STRING: std::cerr << "DQ_STRING\n"; break;
-    case SQ_STRING: std::cerr << "SQ_STRING\n"; break;
-    case FOR: std::cerr << "FOR\n"; break;
-    case WHILE: std::cerr << "WHILE\n"; break;
-    case DO: std::cerr << "DO\n"; break;
-    case UNTIL: std::cerr << "UNTIL\n"; break;
-    case IF: std::cerr << "IF\n"; break;
-    case ELSEIF: std::cerr << "ELSEIF\n"; break;
-    case ELSE: std::cerr << "ELSE\n"; break;
-    case SWITCH: std::cerr << "SWITCH\n"; break;
-    case CASE: std::cerr << "CASE\n"; break;
-    case OTHERWISE: std::cerr << "OTHERWISE\n"; break;
-    case BREAK: std::cerr << "BREAK\n"; break;
-    case CONTINUE: std::cerr << "CONTINUE\n"; break;
-    case FUNC_RET: std::cerr << "FUNC_RET\n"; break;
-    case UNWIND: std::cerr << "UNWIND\n"; break;
-    case CLEANUP: std::cerr << "CLEANUP\n"; break;
-    case TRY: std::cerr << "TRY\n"; break;
-    case CATCH: std::cerr << "CATCH\n"; break;
-    case GLOBAL: std::cerr << "GLOBAL\n"; break;
-    case STATIC: std::cerr << "STATIC\n"; break;
-    case FCN_HANDLE: std::cerr << "FCN_HANDLE\n"; break;
-    case END_OF_INPUT: std::cerr << "END_OF_INPUT\n\n"; break;
-    case LEXICAL_ERROR: std::cerr << "LEXICAL_ERROR\n\n"; break;
-    case FCN: std::cerr << "FCN\n"; break;
-    case CLOSE_BRACE: std::cerr << "CLOSE_BRACE\n"; break;
-    case SCRIPT_FILE: std::cerr << "SCRIPT_FILE\n"; break;
-    case FUNCTION_FILE: std::cerr << "FUNCTION_FILE\n"; break;
-    case SUPERCLASSREF: std::cerr << "SUPERCLASSREF\n"; break;
-    case METAQUERY: std::cerr << "METAQUERY\n"; break;
-    case GET: std::cerr << "GET\n"; break;
-    case SET: std::cerr << "SET\n"; break;
-    case PROPERTIES: std::cerr << "PROPERTIES\n"; break;
-    case METHODS: std::cerr << "METHODS\n"; break;
-    case EVENTS: std::cerr << "EVENTS\n"; break;
-    case CLASSDEF: std::cerr << "CLASSDEF\n"; break;
-    case '\n': std::cerr << "\\n\n"; break;
-    case '\r': std::cerr << "\\r\n"; break;
-    case '\t': std::cerr << "TAB\n"; break;
-    default:
-      {
-        if (tok < 256)
-	  std::cerr << static_cast<char> (tok) << "\n";
-	else
-	  std::cerr << "UNKNOWN(" << tok << ")\n";
-      }
-      break;
-    }
-}
-
-static void
-display_state (void)
-{
-  std::cerr << "S: ";
-
-  switch (YY_START)
-    {
-    case INITIAL:
-      std::cerr << "INITIAL" << std::endl;
-      break;
-
-    case COMMAND_START:
-      std::cerr << "COMMAND_START" << std::endl;
-      break;
-
-    case MATRIX_START:
-      std::cerr << "MATRIX_START" << std::endl;
-      break;
-
-    case SCRIPT_FILE_BEGIN:
-      std::cerr << "SCRIPT_FILE_BEGIN" << std::endl;
-      break;
-
-    case FUNCTION_FILE_BEGIN:
-      std::cerr << "FUNCTION_FILE_BEGIN" << std::endl;
-      break;
-
-    default:
-      std::cerr << "UNKNOWN START STATE!" << std::endl;
-      break;
-    }
-}
-
-static void
-lexer_debug (const char *pattern, const char *text)
-{
-  std::cerr << std::endl;
-
-  display_state ();
-
-  std::cerr << "P: " << pattern << std::endl;
-  std::cerr << "T: " << text << std::endl;
-}
-
-DEFUN (__display_tokens__, args, nargout,
-  "-*- texinfo -*-\n\
-@deftypefn {Built-in Function} {} __display_tokens__ ()\n\
-Query or set the internal variable that determines whether Octave's\n\
-lexer displays tokens as they are read.\n\
-@end deftypefn")
-{
-  return SET_INTERNAL_VARIABLE (display_tokens);
-}
-
-DEFUN (__token_count__, , ,
-  "-*- texinfo -*-\n\
-@deftypefn {Built-in Function} {} __token_count__ ()\n\
-Number of language tokens processed since Octave startup.\n\
-@end deftypefn")
-{
-  return octave_value (Vtoken_count);
-}
-
-DEFUN (__lexer_debug_flag__, args, nargout,
-  "-*- texinfo -*-\n\
-@deftypefn {Built-in Function} {@var{old_val} =} __lexer_debug_flag__ (@var{new_val}))\n\
-Undocumented internal function.\n\
-@end deftypefn")
-{
-  octave_value retval;
-
-  retval = set_internal_variable (lexer_debug_flag, args, nargout,
-           			  "__lexer_debug_flag__");
-
-  return retval;
-}
-
-/*
-;;; Local Variables: ***
-;;; mode: C++ ***
-;;; End: ***
-*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/lex.ll	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,3668 @@
+/*
+
+Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+              2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+              John W. Eaton
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+%option prefix = "octave_"
+
+%s COMMAND_START
+%s MATRIX_START
+
+%x SCRIPT_FILE_BEGIN
+%x FUNCTION_FILE_BEGIN
+
+%{
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <cctype>
+#include <cstring>
+
+#include <iostream>
+#include <set>
+#include <sstream>
+#include <string>
+#include <stack>
+
+#ifdef HAVE_UNISTD_H
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#include <unistd.h>
+#endif
+
+#include "cmd-edit.h"
+#include "quit.h"
+#include "lo-mappers.h"
+
+// These would be alphabetical, but y.tab.h must be included before
+// oct-gperf.h and y.tab.h must be included after token.h and the tree
+// class declarations.  We can't include y.tab.h in oct-gperf.h
+// because it may not be protected to allow it to be included multiple
+// times.
+
+#include "Cell.h"
+#include "comment-list.h"
+#include "defun.h"
+#include "error.h"
+#include "gripes.h"
+#include "input.h"
+#include "lex.h"
+#include "ov.h"
+#include "parse.h"
+#include "pt-all.h"
+#include "symtab.h"
+#include "token.h"
+#include "toplev.h"
+#include "utils.h"
+#include "variables.h"
+#include <oct-parse.h>
+#include <oct-gperf.h>
+
+#if ! (defined (FLEX_SCANNER) \
+       && defined (YY_FLEX_MAJOR_VERSION) && YY_FLEX_MAJOR_VERSION >= 2 \
+       && defined (YY_FLEX_MINOR_VERSION) && YY_FLEX_MINOR_VERSION >= 5)
+#error lex.l requires flex version 2.5.4 or later
+#endif
+
+#define yylval octave_lval
+
+// Arrange to get input via readline.
+
+#ifdef YY_INPUT
+#undef YY_INPUT
+#endif
+#define YY_INPUT(buf, result, max_size) \
+  if ((result = octave_read (buf, max_size)) < 0) \
+    YY_FATAL_ERROR ("octave_read () in flex scanner failed");
+
+// Try to avoid crashing out completely on fatal scanner errors.
+// The call to yy_fatal_error should never happen, but it avoids a
+// `static function defined but not used' warning from gcc.
+
+#ifdef YY_FATAL_ERROR
+#undef YY_FATAL_ERROR
+#endif
+#define YY_FATAL_ERROR(msg) \
+  do \
+    { \
+      error (msg); \
+      OCTAVE_QUIT; \
+      yy_fatal_error (msg); \
+    } \
+  while (0)
+
+#define DISPLAY_TOK_AND_RETURN(tok) \
+  do \
+    { \
+      int tok_val = tok; \
+      if (Vdisplay_tokens) \
+        display_token (tok_val); \
+      if (lexer_debug_flag) \
+        { \
+	  std::cerr << "R: "; \
+          display_token (tok_val); \
+	  std::cerr << std::endl;  \
+	} \
+      return tok_val; \
+    } \
+  while (0)
+
+#define COUNT_TOK_AND_RETURN(tok) \
+  do \
+    { \
+      Vtoken_count++; \
+      DISPLAY_TOK_AND_RETURN (tok); \
+    } \
+  while (0)
+
+#define TOK_RETURN(tok) \
+  do \
+    { \
+      current_input_column += yyleng; \
+      lexer_flags.quote_is_transpose = false; \
+      lexer_flags.convert_spaces_to_comma = true; \
+      COUNT_TOK_AND_RETURN (tok); \
+    } \
+  while (0)
+
+#define TOK_PUSH_AND_RETURN(name, tok) \
+  do \
+    { \
+      yylval.tok_val = new token (name, input_line_number, \
+				  current_input_column); \
+      token_stack.push (yylval.tok_val); \
+      TOK_RETURN (tok); \
+    } \
+  while (0)
+
+#define BIN_OP_RETURN(tok, convert, bos) \
+  do \
+    { \
+      yylval.tok_val = new token (input_line_number, current_input_column); \
+      token_stack.push (yylval.tok_val); \
+      current_input_column += yyleng; \
+      lexer_flags.quote_is_transpose = false; \
+      lexer_flags.convert_spaces_to_comma = convert; \
+      lexer_flags.looking_for_object_index = false; \
+      lexer_flags.at_beginning_of_statement = bos; \
+      COUNT_TOK_AND_RETURN (tok); \
+    } \
+  while (0)
+
+#define XBIN_OP_RETURN(tok, convert, bos) \
+  do \
+    { \
+      gripe_matlab_incompatible_operator (yytext); \
+      BIN_OP_RETURN (tok, convert, bos); \
+    } \
+  while (0)
+
+#define LEXER_DEBUG(pattern) \
+  do \
+    { \
+      if (lexer_debug_flag) \
+        lexer_debug (pattern, yytext); \
+    } \
+  while (0)
+
+// TRUE means that we have encountered EOF on the input stream.
+bool parser_end_of_input = false;
+
+// Flags that need to be shared between the lexer and parser.
+lexical_feedback lexer_flags;
+
+// Stack to hold tokens so that we can delete them when the parser is
+// reset and avoid growing forever just because we are stashing some
+// information.  This has to appear before lex.h is included, because
+// one of the macros defined there uses token_stack.
+//
+// FIXME -- this should really be static, but that causes
+// problems on some systems.
+std::stack <token*> token_stack;
+
+// Did eat_whitespace() eat a space or tab, or a newline, or both?
+
+typedef int yum_yum;
+
+const yum_yum ATE_NOTHING = 0;
+const yum_yum ATE_SPACE_OR_TAB = 1;
+const yum_yum ATE_NEWLINE = 2;
+
+// Is the closest nesting level a square bracket, squiggly brace or a paren?
+
+class bracket_brace_paren_nesting_level
+{
+public:
+
+  bracket_brace_paren_nesting_level (void) : context () { }
+
+  ~bracket_brace_paren_nesting_level (void) { }
+
+  void bracket (void) { context.push (BRACKET); }
+  bool is_bracket (void)
+    { return ! context.empty () && context.top () == BRACKET; }
+
+  void brace (void) {  context.push (BRACE); }
+  bool is_brace (void)
+    { return ! context.empty () && context.top () == BRACE; }
+
+  void paren (void) {  context.push (PAREN); }
+  bool is_paren (void)
+    { return ! context.empty () && context.top () == PAREN; }
+
+  bool is_bracket_or_brace (void)
+    { return (! context.empty ()
+	      && (context.top () == BRACKET || context.top () == BRACE)); }
+
+  bool none (void) { return context.empty (); }
+
+  void remove (void) { if (! context.empty ()) context.pop (); }
+
+  void clear (void) { while (! context.empty ()) context.pop (); }
+
+private:
+
+  std::stack<int> context;
+
+  static const int BRACKET;
+  static const int BRACE;
+  static const int PAREN;
+
+  bracket_brace_paren_nesting_level (const bracket_brace_paren_nesting_level&);
+
+  bracket_brace_paren_nesting_level&
+  operator = (const bracket_brace_paren_nesting_level&);
+};
+
+const int bracket_brace_paren_nesting_level::BRACKET = 1;
+const int bracket_brace_paren_nesting_level::BRACE = 2;
+const int bracket_brace_paren_nesting_level::PAREN = 3;
+
+static bracket_brace_paren_nesting_level nesting_level;
+
+static bool Vdisplay_tokens = false;
+
+static unsigned int Vtoken_count = 0;
+
+// The start state that was in effect when the beginning of a block
+// comment was noticed.
+static int block_comment_nesting_level = 0;
+
+// Internal variable for lexer debugging state.
+static bool lexer_debug_flag = false;
+
+// Forward declarations for functions defined at the bottom of this
+// file.
+
+static int text_yyinput (void);
+static void xunput (char c, char *buf);
+static void fixup_column_count (char *s);
+static void do_comma_insert_check (void);
+static int is_keyword_token (const std::string& s);
+static int process_comment (bool start_in_block, bool& eof);
+static bool match_any (char c, const char *s);
+static bool next_token_is_sep_op (void);
+static bool next_token_is_bin_op (bool spc_prev);
+static bool next_token_is_postfix_unary_op (bool spc_prev);
+static std::string strip_trailing_whitespace (char *s);
+static void handle_number (void);
+static int handle_string (char delim);
+static int handle_close_bracket (bool spc_gobbled, int bracket_type);
+static int handle_superclass_identifier (void);
+static int handle_meta_identifier (void);
+static int handle_identifier (void);
+static bool have_continuation (bool trailing_comments_ok = true);
+static bool have_ellipsis_continuation (bool trailing_comments_ok = true);
+static void scan_for_comments (const char *);
+static yum_yum eat_whitespace (void);
+static yum_yum eat_continuation (void);
+static void maybe_warn_separator_insert (char sep);
+static void gripe_single_quote_string (void);
+static void gripe_matlab_incompatible (const std::string& msg);
+static void maybe_gripe_matlab_incompatible_comment (char c);
+static void gripe_matlab_incompatible_continuation (void);
+static void gripe_matlab_incompatible_operator (const std::string& op);
+static void display_token (int tok);
+static void lexer_debug (const char *pattern, const char *text);
+
+%}
+
+D	[0-9]
+S	[ \t]
+NL	((\n)|(\r)|(\r\n))
+SNL	({S}|{NL})
+EL	(\.\.\.)
+BS	(\\)
+CONT	({EL}|{BS})
+Im	[iIjJ]
+CCHAR	[#%]
+COMMENT	({CCHAR}.*{NL})
+SNLCMT	({SNL}|{COMMENT})
+NOT	((\~)|(\!))
+POW     ((\*\*)|(\^))
+EPOW    (\.{POW})
+IDENT	([_$a-zA-Z][_$a-zA-Z0-9]*)
+EXPON	([DdEe][+-]?{D}+)
+NUMBER	(({D}+\.?{D}*{EXPON}?)|(\.{D}+{EXPON}?)|(0[xX][0-9a-fA-F]+))
+%%
+
+%{
+// Make script and function files start with a bogus token. This makes
+// the parser go down a special path.
+%}
+
+<SCRIPT_FILE_BEGIN>. {
+    LEXER_DEBUG ("<SCRIPT_FILE_BEGIN>.");
+
+    BEGIN (INITIAL);
+    xunput (yytext[0], yytext);
+    COUNT_TOK_AND_RETURN (SCRIPT_FILE);
+  }
+
+<FUNCTION_FILE_BEGIN>. {
+    LEXER_DEBUG ("<FUNCTION_FILE_BEGIN>.");
+
+    BEGIN (INITIAL);
+    xunput (yytext[0], yytext);
+    COUNT_TOK_AND_RETURN (FUNCTION_FILE);
+  }
+
+%{
+// Help and other command-style functions.
+%}
+
+<COMMAND_START>{NL} {
+    LEXER_DEBUG ("<COMMAND_START>{NL}");
+
+    BEGIN (INITIAL);
+    input_line_number++;
+    current_input_column = 1;
+
+    lexer_flags.quote_is_transpose = false;
+    lexer_flags.convert_spaces_to_comma = true;
+    lexer_flags.looking_for_object_index = false;
+    lexer_flags.at_beginning_of_statement = true;
+
+    COUNT_TOK_AND_RETURN ('\n');
+  }
+
+<COMMAND_START>[\;\,] {
+    LEXER_DEBUG ("<COMMAND_START>[\\;\\,]");
+
+    lexer_flags.looking_for_object_index = false;
+    lexer_flags.at_beginning_of_statement = true;
+
+    BEGIN (INITIAL);
+
+    if (strcmp (yytext, ",") == 0)
+      TOK_RETURN (',');
+    else
+      TOK_RETURN (';');
+  }
+
+<COMMAND_START>[\"\'] {
+    LEXER_DEBUG ("<COMMAND_START>[\\\"\\']");
+
+    lexer_flags.at_beginning_of_statement = false;
+
+    current_input_column++;
+    int tok = handle_string (yytext[0]);
+
+    COUNT_TOK_AND_RETURN (tok);
+  }
+
+<COMMAND_START>[^#% \t\r\n\;\,\"\'][^ \t\r\n\;\,]*{S}* {
+    LEXER_DEBUG ("<COMMAND_START>[^#% \\t\\r\\n\\;\\,\\\"\\'][^ \\t\\r\\n\\;\\,]*{S}*");
+
+    std::string tok = strip_trailing_whitespace (yytext);
+
+    lexer_flags.looking_for_object_index = false;
+    lexer_flags.at_beginning_of_statement = false;
+
+    TOK_PUSH_AND_RETURN (tok, SQ_STRING);
+  }
+
+%{
+// For this and the next two rules, we're looking at ']', and we
+// need to know if the next token is `=' or `=='.
+//
+// It would have been so much easier if the delimiters were simply
+// different for the expression on the left hand side of the equals
+// operator.
+//
+// It's also a pain in the ass to decide whether to insert a comma
+// after seeing a ']' character...
+
+// FIXME -- we need to handle block comments here.
+%}
+
+<MATRIX_START>{SNLCMT}*\]{S}* {
+    LEXER_DEBUG ("<MATRIX_START>{SNLCMT}*\\]{S}*");
+
+    scan_for_comments (yytext);
+    fixup_column_count (yytext);
+
+    lexer_flags.looking_at_object_index.pop_front ();
+
+    lexer_flags.looking_for_object_index = true;
+    lexer_flags.at_beginning_of_statement = false;
+
+    int c = yytext[yyleng-1];
+    int cont_is_spc = eat_continuation ();
+    bool spc_gobbled = (cont_is_spc || c == ' ' || c == '\t');
+    int tok_to_return = handle_close_bracket (spc_gobbled, ']');
+
+    if (spc_gobbled)
+      xunput (' ', yytext);
+
+    COUNT_TOK_AND_RETURN (tok_to_return);
+  }
+
+%{
+// FIXME -- we need to handle block comments here.
+%}
+
+<MATRIX_START>{SNLCMT}*\}{S}* {
+    LEXER_DEBUG ("<MATRIX_START>{SNLCMT}*\\}{S}*");
+
+    scan_for_comments (yytext);
+    fixup_column_count (yytext);
+
+    lexer_flags.looking_at_object_index.pop_front ();
+
+    lexer_flags.looking_for_object_index = true;
+    lexer_flags.at_beginning_of_statement = false;
+
+    int c = yytext[yyleng-1];
+    int cont_is_spc = eat_continuation ();
+    bool spc_gobbled = (cont_is_spc || c == ' ' || c == '\t');
+    int tok_to_return = handle_close_bracket (spc_gobbled, '}');
+
+    if (spc_gobbled)
+      xunput (' ', yytext);
+
+    COUNT_TOK_AND_RETURN (tok_to_return);
+  }
+
+%{
+// Commas are element separators in matrix constants.  If we don't
+// check for continuations here we can end up inserting too many
+// commas.
+%}
+
+<MATRIX_START>{S}*\,{S}* {
+    LEXER_DEBUG ("<MATRIX_START>{S}*\\,{S}*");
+
+    current_input_column += yyleng;
+
+    int tmp = eat_continuation ();
+
+    lexer_flags.quote_is_transpose = false;
+    lexer_flags.convert_spaces_to_comma = true;
+    lexer_flags.looking_for_object_index = false;
+    lexer_flags.at_beginning_of_statement = false;
+
+    if (! lexer_flags.looking_at_object_index.front ())
+      {
+	if ((tmp & ATE_NEWLINE) == ATE_NEWLINE)
+	  {
+	    maybe_warn_separator_insert (';');
+
+	    xunput (';', yytext);
+	  }
+      }
+
+    COUNT_TOK_AND_RETURN (',');
+  }
+
+%{
+// In some cases, spaces in matrix constants can turn into commas.
+// If commas are required, spaces are not important in matrix
+// constants so we just eat them.  If we don't check for continuations
+// here we can end up inserting too many commas.
+%}
+
+<MATRIX_START>{S}+ {
+    LEXER_DEBUG ("<MATRIX_START>{S}+");
+
+    current_input_column += yyleng;
+
+    lexer_flags.at_beginning_of_statement = false;
+
+    int tmp = eat_continuation ();
+
+    if (! lexer_flags.looking_at_object_index.front ())
+      {
+	bool bin_op = next_token_is_bin_op (true);
+	bool postfix_un_op = next_token_is_postfix_unary_op (true);
+	bool sep_op = next_token_is_sep_op ();
+
+	if (! (postfix_un_op || bin_op || sep_op)
+	    && nesting_level.is_bracket_or_brace ()
+	    && lexer_flags.convert_spaces_to_comma)
+	  {
+	    if ((tmp & ATE_NEWLINE) == ATE_NEWLINE)
+	      {
+		maybe_warn_separator_insert (';');
+
+		xunput (';', yytext);
+	      }
+
+	    lexer_flags.quote_is_transpose = false;
+	    lexer_flags.convert_spaces_to_comma = true;
+
+	    maybe_warn_separator_insert (',');
+
+	    COUNT_TOK_AND_RETURN (',');
+	  }
+      }
+  }
+
+%{
+// Semicolons are handled as row seprators in matrix constants.  If we
+// don't eat whitespace here we can end up inserting too many
+// semicolons.
+
+// FIXME -- we need to handle block comments here.
+%}
+
+<MATRIX_START>{SNLCMT}*;{SNLCMT}* {
+    LEXER_DEBUG ("<MATRIX_START>{SNLCMT}*;{SNLCMT}*");
+
+    scan_for_comments (yytext);
+    fixup_column_count (yytext);
+    eat_whitespace ();
+
+    lexer_flags.quote_is_transpose = false;
+    lexer_flags.convert_spaces_to_comma = true;
+    lexer_flags.looking_for_object_index = false;
+    lexer_flags.at_beginning_of_statement = false;
+
+    COUNT_TOK_AND_RETURN (';');
+  }
+
+%{
+// In some cases, new lines can also become row separators.  If we
+// don't eat whitespace here we can end up inserting too many
+// semicolons.
+
+// FIXME -- we need to handle block comments here.
+%}
+
+<MATRIX_START>{S}*{COMMENT}{SNLCMT}* |
+<MATRIX_START>{S}*{NL}{SNLCMT}* {
+    LEXER_DEBUG ("<MATRIX_START>{S}*{COMMENT}{SNLCMT}*|<MATRIX_START>{S}*{NL}{SNLCMT}*");
+
+    scan_for_comments (yytext);
+    fixup_column_count (yytext);
+    eat_whitespace ();
+
+    lexer_flags.quote_is_transpose = false;
+    lexer_flags.convert_spaces_to_comma = true;
+    lexer_flags.at_beginning_of_statement = false;
+
+    if (nesting_level.none ())
+      return LEXICAL_ERROR;
+
+    if (! lexer_flags.looking_at_object_index.front ()
+	&& nesting_level.is_bracket_or_brace ())
+      {
+	maybe_warn_separator_insert (';');
+
+	COUNT_TOK_AND_RETURN (';');
+      }
+  }
+
+\[{S}* {
+    LEXER_DEBUG ("\\[{S}*");
+
+    nesting_level.bracket ();
+
+    lexer_flags.looking_at_object_index.push_front (false);
+
+    current_input_column += yyleng;
+    lexer_flags.quote_is_transpose = false;
+    lexer_flags.convert_spaces_to_comma = true;
+    lexer_flags.looking_for_object_index = false;
+    lexer_flags.at_beginning_of_statement = false;
+
+    if (lexer_flags.defining_func && ! lexer_flags.parsed_function_name)
+      lexer_flags.looking_at_return_list = true;
+    else
+      lexer_flags.looking_at_matrix_or_assign_lhs = true;
+
+    promptflag--;
+    eat_whitespace ();
+
+    lexer_flags.bracketflag++;
+    BEGIN (MATRIX_START);
+    COUNT_TOK_AND_RETURN ('[');
+  }
+
+\] {
+    LEXER_DEBUG ("\\]");
+
+    nesting_level.remove ();
+
+    lexer_flags.looking_at_object_index.pop_front ();
+
+    lexer_flags.looking_for_object_index = true;
+    lexer_flags.at_beginning_of_statement = false;
+
+    TOK_RETURN (']');
+  }
+
+%{
+// Imaginary numbers.
+%}
+
+{NUMBER}{Im} {
+    LEXER_DEBUG ("{NUMBER}{Im}");
+
+    handle_number ();
+    COUNT_TOK_AND_RETURN (IMAG_NUM);
+  }
+
+%{
+// Real numbers.  Don't grab the `.' part of a dot operator as part of
+// the constant.
+%}
+
+{D}+/\.[\*/\\^\'] |
+{NUMBER} {
+    LEXER_DEBUG ("{D}+/\\.[\\*/\\^\\']|{NUMBER}");
+    handle_number ();
+    COUNT_TOK_AND_RETURN (NUM);
+  }
+
+%{
+// Eat whitespace.  Whitespace inside matrix constants is handled by
+// the <MATRIX_START> start state code above.
+%}
+
+{S}* {
+    current_input_column += yyleng;
+  }
+
+%{
+// Continuation lines.  Allow comments after continuations.
+%}
+
+{CONT}{S}*{NL} |
+{CONT}{S}*{COMMENT} {
+    LEXER_DEBUG ("{CONT}{S}*{NL}|{CONT}{S}*{COMMENT}");
+
+    if (yytext[0] == '\\')
+      gripe_matlab_incompatible_continuation ();
+    scan_for_comments (yytext);
+    promptflag--;
+    input_line_number++;
+    current_input_column = 1;
+  }
+
+%{
+// End of file.
+%}
+
+<<EOF>> {
+    LEXER_DEBUG ("<<EOF>>");
+
+    if (block_comment_nesting_level != 0)
+      {
+	warning ("block comment open at end of input");
+
+	if ((reading_fcn_file || reading_script_file || reading_classdef_file)
+	    && ! curr_fcn_file_name.empty ())
+	  warning ("near line %d of file `%s.m'",
+		   input_line_number, curr_fcn_file_name.c_str ());
+      }
+
+    TOK_RETURN (END_OF_INPUT);
+  }
+
+%{
+// Identifiers.  Truncate the token at the first space or tab but
+// don't write directly on yytext.
+%}
+
+{IDENT}{S}* {
+    LEXER_DEBUG ("{IDENT}{S}*");
+
+    int id_tok = handle_identifier ();
+
+    if (id_tok >= 0)
+      COUNT_TOK_AND_RETURN (id_tok);
+  }
+
+%{
+// Superclass method identifiers. 
+%}
+
+{IDENT}@{IDENT}{S}* |
+{IDENT}@{IDENT}.{IDENT}{S}* {
+    LEXER_DEBUG ("{IDENT}@{IDENT}{S}*|{IDENT}@{IDENT}.{IDENT}{S}*");
+
+    int id_tok = handle_superclass_identifier ();
+
+    if (id_tok >= 0)
+      {
+        lexer_flags.looking_for_object_index = true;
+
+        COUNT_TOK_AND_RETURN (SUPERCLASSREF);
+      }
+  }
+  
+%{
+// Metaclass query
+%}  
+  
+\?{IDENT}{S}* | 
+\?{IDENT}.{IDENT}{S}* {
+    LEXER_DEBUG ("\?{IDENT}{S}* | \?{IDENT}.{IDENT}{S}*");
+    
+    int id_tok = handle_meta_identifier ();
+
+    if (id_tok >= 0)
+      {
+        lexer_flags.looking_for_object_index = true;
+
+        COUNT_TOK_AND_RETURN (METAQUERY);
+      }
+  }  
+
+%{
+// Function handles and superclass references
+%}
+
+"@" {
+    LEXER_DEBUG ("@");
+
+    current_input_column++;
+
+    lexer_flags.quote_is_transpose = false;
+    lexer_flags.convert_spaces_to_comma = false;
+    lexer_flags.looking_at_function_handle++;
+    lexer_flags.looking_for_object_index = false;
+    lexer_flags.at_beginning_of_statement = false;
+
+    COUNT_TOK_AND_RETURN ('@');
+      
+  }
+
+%{
+// A new line character.  New line characters inside matrix constants
+// are handled by the <MATRIX_START> start state code above.  If closest
+// nesting is inside parentheses, don't return a row separator.
+%}
+
+{NL} {
+    LEXER_DEBUG ("{NL}");
+
+    input_line_number++;
+    current_input_column = 1;
+
+    lexer_flags.quote_is_transpose = false;
+    lexer_flags.convert_spaces_to_comma = true;
+
+    if (nesting_level.none ())
+      {
+	lexer_flags.at_beginning_of_statement = true;
+	COUNT_TOK_AND_RETURN ('\n');
+      }
+    else if (nesting_level.is_paren ())
+      {
+	lexer_flags.at_beginning_of_statement = false;
+	gripe_matlab_incompatible ("bare newline inside parentheses");
+      }
+    else if (nesting_level.is_bracket_or_brace ())
+      return LEXICAL_ERROR;
+  }
+
+%{
+// Single quote can either be the beginning of a string or a transpose
+// operator. 
+%}
+
+"'" {
+    LEXER_DEBUG ("'");
+
+    current_input_column++;
+    lexer_flags.convert_spaces_to_comma = true;
+
+    if (lexer_flags.quote_is_transpose)
+      {
+	do_comma_insert_check ();
+	COUNT_TOK_AND_RETURN (QUOTE);
+      }
+    else
+      {
+	int tok = handle_string ('\'');
+	COUNT_TOK_AND_RETURN (tok);
+      }
+  }
+
+%{
+// Double quotes always begin strings.
+%}
+
+\" {
+    LEXER_DEBUG ("\"");
+
+    current_input_column++;
+    int tok = handle_string ('"');
+
+    COUNT_TOK_AND_RETURN (tok);
+}
+
+%{
+// Gobble comments.
+%} 
+
+{CCHAR} {
+    LEXER_DEBUG ("{CCHAR}");
+
+    lexer_flags.looking_for_object_index = false;
+
+    xunput (yytext[0], yytext);
+
+    bool eof = false;
+    int tok = process_comment (false, eof);
+
+    if (eof)
+      TOK_RETURN (END_OF_INPUT);
+    else if (tok > 0)
+      COUNT_TOK_AND_RETURN (tok);
+  }
+
+%{
+// Block comments.
+%}
+
+^{S}*{CCHAR}\{{S}*{NL} {
+    LEXER_DEBUG ("^{S}*{CCHAR}\\{{S}*{NL}");
+
+    lexer_flags.looking_for_object_index = false;
+
+    input_line_number++;
+    current_input_column = 1;
+    block_comment_nesting_level++;
+    promptflag--;
+
+    bool eof = false;
+    process_comment (true, eof);
+  }
+
+%{
+// Other operators.
+%}
+
+":"     { LEXER_DEBUG (":"); BIN_OP_RETURN (':', false, false); }
+
+".+"	{ LEXER_DEBUG (".+"); XBIN_OP_RETURN (EPLUS, false, false); }
+".-"	{ LEXER_DEBUG (".-"); XBIN_OP_RETURN (EMINUS, false, false); }
+".*"	{ LEXER_DEBUG (".*"); BIN_OP_RETURN (EMUL, false, false); }
+"./"	{ LEXER_DEBUG ("./"); BIN_OP_RETURN (EDIV, false, false); }
+".\\"	{ LEXER_DEBUG (".\\"); BIN_OP_RETURN (ELEFTDIV, false, false); }
+".^"	{ LEXER_DEBUG (".^"); BIN_OP_RETURN (EPOW, false, false); }
+".**"	{ LEXER_DEBUG (".**"); XBIN_OP_RETURN (EPOW, false, false); }
+".'"	{ LEXER_DEBUG (".'"); do_comma_insert_check (); BIN_OP_RETURN (TRANSPOSE, true, false); }
+"++"	{ LEXER_DEBUG ("++"); do_comma_insert_check (); XBIN_OP_RETURN (PLUS_PLUS, true, false); }
+"--"	{ LEXER_DEBUG ("--"); do_comma_insert_check (); XBIN_OP_RETURN (MINUS_MINUS, true, false); }
+"<="	{ LEXER_DEBUG ("<="); BIN_OP_RETURN (EXPR_LE, false, false); }
+"=="	{ LEXER_DEBUG ("=="); BIN_OP_RETURN (EXPR_EQ, false, false); }
+"~="	{ LEXER_DEBUG ("~="); BIN_OP_RETURN (EXPR_NE, false, false); }
+"!="	{ LEXER_DEBUG ("!="); XBIN_OP_RETURN (EXPR_NE, false, false); }
+">="	{ LEXER_DEBUG (">="); BIN_OP_RETURN (EXPR_GE, false, false); }
+"&"	{ LEXER_DEBUG ("&"); BIN_OP_RETURN (EXPR_AND, false, false); }
+"|"	{ LEXER_DEBUG ("|"); BIN_OP_RETURN (EXPR_OR, false, false); }
+"<"	{ LEXER_DEBUG ("<"); BIN_OP_RETURN (EXPR_LT, false, false); }
+">"	{ LEXER_DEBUG (">"); BIN_OP_RETURN (EXPR_GT, false, false); }
+"+"     { LEXER_DEBUG ("+"); BIN_OP_RETURN ('+', false, false); }
+"-"     { LEXER_DEBUG ("-"); BIN_OP_RETURN ('-', false, false); }
+"*"	{ LEXER_DEBUG ("*"); BIN_OP_RETURN ('*', false, false); }
+"/"	{ LEXER_DEBUG ("/"); BIN_OP_RETURN ('/', false, false); }
+"\\"	{ LEXER_DEBUG ("\\"); BIN_OP_RETURN (LEFTDIV, false, false); }
+";"     { LEXER_DEBUG (";"); BIN_OP_RETURN (';', true, true); }
+","     { LEXER_DEBUG (","); BIN_OP_RETURN (',', true, ! lexer_flags.looking_at_object_index.front ()); }
+"^"	{ LEXER_DEBUG ("^"); BIN_OP_RETURN (POW, false, false); }
+"**"	{ LEXER_DEBUG ("**"); XBIN_OP_RETURN (POW, false, false); }
+"="	{ LEXER_DEBUG ("="); BIN_OP_RETURN ('=', true, false); }
+"&&"	{ LEXER_DEBUG ("&&"); BIN_OP_RETURN (EXPR_AND_AND, false, false); }
+"||"	{ LEXER_DEBUG ("||"); BIN_OP_RETURN (EXPR_OR_OR, false, false); }
+"<<"	{ LEXER_DEBUG ("<<"); XBIN_OP_RETURN (LSHIFT, false, false); }
+">>"	{ LEXER_DEBUG (">>"); XBIN_OP_RETURN (RSHIFT, false, false); }
+
+{NOT} {
+    LEXER_DEBUG ("{NOT}");
+
+    if (yytext[0] == '~')
+      BIN_OP_RETURN (EXPR_NOT, false, false);
+    else
+      XBIN_OP_RETURN (EXPR_NOT, false, false);
+  }
+
+"(" {
+    LEXER_DEBUG ("(");
+
+    // If we are looking for an object index, then push TRUE for
+    // looking_at_object_index.  Otherwise, just push whatever state
+    // is current (so that we can pop it off the stack when we find
+    // the matching close paren).
+
+    lexer_flags.looking_at_object_index.push_front
+      (lexer_flags.looking_for_object_index);
+
+    lexer_flags.looking_at_indirect_ref = false;
+    lexer_flags.looking_for_object_index = false;
+    lexer_flags.at_beginning_of_statement = false;
+
+    nesting_level.paren ();
+    promptflag--;
+
+    TOK_RETURN ('(');
+  }
+
+")" {
+    LEXER_DEBUG (")");
+
+    nesting_level.remove ();
+    current_input_column++;
+
+    lexer_flags.looking_at_object_index.pop_front ();
+
+    lexer_flags.quote_is_transpose = true;
+    lexer_flags.convert_spaces_to_comma = nesting_level.is_bracket_or_brace ();
+    lexer_flags.looking_for_object_index = true;
+    lexer_flags.at_beginning_of_statement = false;
+
+    do_comma_insert_check ();
+
+    COUNT_TOK_AND_RETURN (')');
+  }
+
+"." {
+    LEXER_DEBUG (".");
+
+    lexer_flags.looking_for_object_index = false;
+    lexer_flags.at_beginning_of_statement = false;
+
+    TOK_RETURN ('.');
+  }
+
+"+="	{ LEXER_DEBUG ("+="); XBIN_OP_RETURN (ADD_EQ, false, false); }
+"-="	{ LEXER_DEBUG ("-="); XBIN_OP_RETURN (SUB_EQ, false, false); }
+"*="	{ LEXER_DEBUG ("*="); XBIN_OP_RETURN (MUL_EQ, false, false); }
+"/="	{ LEXER_DEBUG ("/="); XBIN_OP_RETURN (DIV_EQ, false, false); }
+"\\="	{ LEXER_DEBUG ("\\="); XBIN_OP_RETURN (LEFTDIV_EQ, false, false); }
+".+="	{ LEXER_DEBUG (".+="); XBIN_OP_RETURN (ADD_EQ, false, false); }
+".-="	{ LEXER_DEBUG (".-="); XBIN_OP_RETURN (SUB_EQ, false, false); }
+".*="	{ LEXER_DEBUG (".*="); XBIN_OP_RETURN (EMUL_EQ, false, false); }
+"./="	{ LEXER_DEBUG ("./="); XBIN_OP_RETURN (EDIV_EQ, false, false); }
+".\\="	{ LEXER_DEBUG (".\\="); XBIN_OP_RETURN (ELEFTDIV_EQ, false, false); }
+{POW}=  { LEXER_DEBUG ("{POW}="); XBIN_OP_RETURN (POW_EQ, false, false); }
+{EPOW}= { LEXER_DEBUG ("{EPOW}="); XBIN_OP_RETURN (EPOW_EQ, false, false); }
+"&="	{ LEXER_DEBUG ("&="); XBIN_OP_RETURN (AND_EQ, false, false); }
+"|="	{ LEXER_DEBUG ("|="); XBIN_OP_RETURN (OR_EQ, false, false); }
+"<<="	{ LEXER_DEBUG ("<<="); XBIN_OP_RETURN (LSHIFT_EQ, false, false); }
+">>="	{ LEXER_DEBUG (">>="); XBIN_OP_RETURN (RSHIFT_EQ, false, false); }
+
+\{{S}* {
+    LEXER_DEBUG ("\\{{S}*");
+
+    nesting_level.brace ();
+
+    lexer_flags.looking_at_object_index.push_front
+      (lexer_flags.looking_for_object_index);
+
+    current_input_column += yyleng;
+    lexer_flags.quote_is_transpose = false;
+    lexer_flags.convert_spaces_to_comma = true;
+    lexer_flags.looking_for_object_index = false;
+    lexer_flags.at_beginning_of_statement = false;
+
+    promptflag--;
+    eat_whitespace ();
+
+    lexer_flags.braceflag++;
+    BEGIN (MATRIX_START);
+    COUNT_TOK_AND_RETURN ('{');
+  }
+
+"}" {
+    LEXER_DEBUG ("}");
+
+    lexer_flags.looking_at_object_index.pop_front ();
+
+    lexer_flags.looking_for_object_index = true;
+    lexer_flags.at_beginning_of_statement = false;
+
+    nesting_level.remove ();
+
+    TOK_RETURN ('}');
+  }
+
+%{
+// Unrecognized input is a lexical error.
+%}
+
+. {
+    LEXER_DEBUG (".");
+
+    xunput (yytext[0], yytext);
+
+    int c = text_yyinput ();
+
+    if (c != EOF)
+      {
+	current_input_column++;
+
+	error ("invalid character `%s' (ASCII %d) near line %d, column %d",
+	       undo_string_escape (static_cast<char> (c)), c,
+	       input_line_number, current_input_column);
+
+	return LEXICAL_ERROR;
+      }
+    else
+      TOK_RETURN (END_OF_INPUT);
+  }
+
+%%
+
+// GAG.
+//
+// If we're reading a matrix and the next character is '[', make sure
+// that we insert a comma ahead of it.
+
+void
+do_comma_insert_check (void)
+{
+  int spc_gobbled = eat_continuation ();
+
+  int c = text_yyinput ();
+
+  xunput (c, yytext);
+
+  if (spc_gobbled)
+    xunput (' ', yytext);
+
+  lexer_flags.do_comma_insert = (! lexer_flags.looking_at_object_index.front ()
+				 && lexer_flags.bracketflag && c == '[');
+}
+
+// Fix things up for errors or interrupts.  The parser is never called
+// recursively, so it is always safe to reinitialize its state before
+// doing any parsing.
+
+void
+reset_parser (void)
+{
+  // Start off on the right foot.
+  BEGIN (INITIAL);
+
+  parser_end_of_input = false;
+
+  while (! symtab_context.empty ())
+    symtab_context.pop ();
+
+  // We do want a prompt by default.
+  promptflag = 1;
+
+  // We are not in a block comment.
+  block_comment_nesting_level = 0;
+
+  // Error may have occurred inside some brackets, braces, or parentheses.
+  nesting_level.clear ();
+
+  // Clear out the stack of token info used to track line and column
+  // numbers.
+  while (! token_stack.empty ())
+    {
+      delete token_stack.top ();
+      token_stack.pop ();
+    }
+
+  // Can be reset by defining a function.
+  if (! (reading_script_file || reading_fcn_file || reading_classdef_file))
+    {
+      current_input_column = 1;
+      input_line_number = command_editor::current_command_number ();
+    }
+
+  // Only ask for input from stdin if we are expecting interactive
+  // input.
+  if ((interactive || forced_interactive)
+      && ! (reading_fcn_file
+        || reading_classdef_file
+	    || reading_script_file
+	    || get_input_from_eval_string
+	    || input_from_startup_file))
+    yyrestart (stdin);
+
+  // Clear the buffer for help text.
+  while (! help_buf.empty ())
+    help_buf.pop ();
+
+  // Reset other flags.
+  lexer_flags.init ();
+}
+
+static void
+display_character (char c)
+{
+  if (isgraph (c))
+    std::cerr << c;
+  else
+    switch (c)
+      {
+      case 0:
+	std::cerr << "NUL";
+	break;
+
+      case 1:
+	std::cerr << "SOH";
+	break;
+
+      case 2:
+	std::cerr << "STX";
+	break;
+
+      case 3:
+	std::cerr << "ETX";
+	break;
+
+      case 4:
+	std::cerr << "EOT";
+	break;
+
+      case 5:
+	std::cerr << "ENQ";
+	break;
+
+      case 6:
+	std::cerr << "ACK";
+	break;
+
+      case 7:
+	std::cerr << "\\a";
+	break;
+
+      case 8:
+	std::cerr << "\\b";
+	break;
+
+      case 9:
+	std::cerr << "\\t";
+	break;
+
+      case 10:
+	std::cerr << "\\n";
+	break;
+
+      case 11:
+	std::cerr << "\\v";
+	break;
+
+      case 12:
+	std::cerr << "\\f";
+	break;
+
+      case 13:
+	std::cerr << "\\r";
+	break;
+
+      case 14:
+	std::cerr << "SO";
+	break;
+
+      case 15:
+	std::cerr << "SI";
+	break;
+
+      case 16:
+	std::cerr << "DLE";
+	break;
+
+      case 17:
+	std::cerr << "DC1";
+	break;
+
+      case 18:
+	std::cerr << "DC2";
+	break;
+
+      case 19:
+	std::cerr << "DC3";
+	break;
+
+      case 20:
+	std::cerr << "DC4";
+	break;
+
+      case 21:
+	std::cerr << "NAK";
+	break;
+
+      case 22:
+	std::cerr << "SYN";
+	break;
+
+      case 23:
+	std::cerr << "ETB";
+	break;
+
+      case 24:
+	std::cerr << "CAN";
+	break;
+
+      case 25:
+	std::cerr << "EM";
+	break;
+
+      case 26:
+	std::cerr << "SUB";
+	break;
+
+      case 27:
+	std::cerr << "ESC";
+	break;
+
+      case 28:
+	std::cerr << "FS";
+	break;
+
+      case 29:
+	std::cerr << "GS";
+	break;
+
+      case 30:
+	std::cerr << "RS";
+	break;
+
+      case 31:
+	std::cerr << "US";
+	break;
+
+      case 32:
+	std::cerr << "SPACE";
+	break;
+
+      case 127:
+	std::cerr << "DEL";
+	break;
+      }
+}
+
+static int
+text_yyinput (void)
+{
+  int c = yyinput ();
+
+  if (lexer_debug_flag)
+    {
+      std::cerr << "I: ";
+      display_character (c);
+      std::cerr << std::endl;
+    }
+
+  // Convert CRLF into just LF and single CR into LF.
+
+  if (c == '\r')
+    {
+      c = yyinput ();
+
+      if (lexer_debug_flag)
+	{
+	  std::cerr << "I: ";
+	  display_character (c);
+	  std::cerr << std::endl;
+	}
+
+      if (c != '\n')
+	{
+	  xunput (c, yytext);
+	  c = '\n';
+	}
+    }
+
+  if (c == '\n')
+    input_line_number++;
+
+  return c;
+}
+
+static void
+xunput (char c, char *buf)
+{
+  if (lexer_debug_flag)
+    {
+      std::cerr << "U: ";
+      display_character (c);
+      std::cerr << std::endl;
+    }
+
+  if (c == '\n')
+    input_line_number--;
+
+  yyunput (c, buf);
+}
+
+// If we read some newlines, we need figure out what column we're
+// really looking at.
+
+static void
+fixup_column_count (char *s)
+{
+  char c;
+  while ((c = *s++) != '\0')
+    {
+      if (c == '\n')
+        {
+          input_line_number++;
+          current_input_column = 1;
+        }
+      else
+	current_input_column++;
+    }
+}
+
+// Include these so that we don't have to link to libfl.a.
+
+int
+yywrap (void)
+{
+  return 1;
+}
+
+// Tell us all what the current buffer is.
+
+YY_BUFFER_STATE
+current_buffer (void)
+{
+  return YY_CURRENT_BUFFER;
+}
+
+// Create a new buffer.
+
+YY_BUFFER_STATE
+create_buffer (FILE *f)
+{
+  return yy_create_buffer (f, YY_BUF_SIZE);
+}
+
+// Start reading a new buffer.
+
+void
+switch_to_buffer (YY_BUFFER_STATE buf)
+{
+  yy_switch_to_buffer (buf);
+}
+
+// Delete a buffer.
+
+void
+delete_buffer (YY_BUFFER_STATE buf)
+{
+  yy_delete_buffer (buf);
+}
+
+// Restore a buffer (for unwind-prot).
+
+void
+restore_input_buffer (void *buf)
+{
+  switch_to_buffer (static_cast<YY_BUFFER_STATE> (buf));
+}
+
+// Delete a buffer (for unwind-prot).
+
+void
+delete_input_buffer (void *buf)
+{
+  delete_buffer (static_cast<YY_BUFFER_STATE> (buf));
+}
+
+static bool
+inside_any_object_index (void)
+{
+  bool retval = false;
+
+  for (std::list<bool>::const_iterator i = lexer_flags.looking_at_object_index.begin ();
+       i != lexer_flags.looking_at_object_index.end (); i++)
+    {
+      if (*i)
+	{
+	  retval = true;
+	  break;
+	}
+    }
+
+  return retval;
+}
+
+// Handle keywords.  Return -1 if the keyword should be ignored.
+
+static int
+is_keyword_token (const std::string& s)
+{
+  int l = input_line_number;
+  int c = current_input_column;
+
+  int len = s.length ();
+
+  const octave_kw *kw = octave_kw_hash::in_word_set (s.c_str (), len);
+
+  if (kw)
+    {
+      yylval.tok_val = 0;
+
+      switch (kw->kw_id)
+	{
+	case break_kw:
+	case catch_kw:
+	case continue_kw:
+	case else_kw:
+	case otherwise_kw:
+	case return_kw:
+	case unwind_protect_cleanup_kw:
+	  lexer_flags.at_beginning_of_statement = true;
+	  break;
+
+	case case_kw:
+	case elseif_kw:
+	case global_kw:
+	case static_kw:
+	case until_kw:
+	  break;
+
+	case end_kw:
+	  if (! reading_classdef_file
+	      && (inside_any_object_index ()
+		  || (lexer_flags.defining_func
+		      && ! (lexer_flags.looking_at_return_list
+			    || lexer_flags.parsed_function_name))))
+	    return 0;
+
+	  yylval.tok_val = new token (token::simple_end, l, c);
+	  lexer_flags.at_beginning_of_statement = true;
+	  break;
+
+	case end_try_catch_kw:
+	  yylval.tok_val = new token (token::try_catch_end, l, c);
+	  lexer_flags.at_beginning_of_statement = true;
+	  break;
+
+	case end_unwind_protect_kw:
+	  yylval.tok_val = new token (token::unwind_protect_end, l, c);
+	  lexer_flags.at_beginning_of_statement = true;
+	  break;
+
+	case endfor_kw:
+	  yylval.tok_val = new token (token::for_end, l, c);
+	  lexer_flags.at_beginning_of_statement = true;
+	  break;
+
+	case endfunction_kw:
+	  yylval.tok_val = new token (token::function_end, l, c);
+	  lexer_flags.at_beginning_of_statement = true;
+	  break;
+
+	case endif_kw:
+	  yylval.tok_val = new token (token::if_end, l, c);
+	  lexer_flags.at_beginning_of_statement = true;
+	  break;
+
+	case endswitch_kw:
+	  yylval.tok_val = new token (token::switch_end, l, c);
+	  lexer_flags.at_beginning_of_statement = true;
+	  break;
+
+	case endwhile_kw:
+	  yylval.tok_val = new token (token::while_end, l, c);
+	  lexer_flags.at_beginning_of_statement = true;
+	  break;
+	  
+	case endclassdef_kw:
+	  yylval.tok_val = new token (token::classdef_end, l, c);
+	  lexer_flags.at_beginning_of_statement = true;
+	  break;
+	  
+	case endevents_kw:
+	  yylval.tok_val = new token (token::events_end, l, c);
+	  lexer_flags.at_beginning_of_statement = true;
+	  break;
+	  
+	case endmethods_kw:
+	  yylval.tok_val = new token (token::methods_end, l, c);
+	  lexer_flags.at_beginning_of_statement = true;
+	  break;
+	  
+	case endproperties_kw:
+	  yylval.tok_val = new token (token::properties_end, l, c);
+	  lexer_flags.at_beginning_of_statement = true;
+	  break;
+
+	case for_kw:
+	case while_kw:
+	  promptflag--;
+	  lexer_flags.looping++;
+	  break;
+
+	case do_kw:
+	  lexer_flags.at_beginning_of_statement = true;
+	  promptflag--;
+	  lexer_flags.looping++;
+	  break;
+
+	case try_kw:
+	case unwind_protect_kw:
+	  lexer_flags.at_beginning_of_statement = true;
+	  promptflag--;
+	  break;
+
+	case if_kw:
+	case switch_kw:
+	  promptflag--;
+	  break;
+
+	case get_kw:
+	case set_kw:  
+	  // 'get' and 'set' are keywords in classdef method
+	  // declarations.
+	  if (! lexer_flags.maybe_classdef_get_set_method)
+	    return 0;
+	  break;
+
+	case properties_kw:
+	case methods_kw:
+	case events_kw:
+	  // 'properties', 'methods' and 'events' are keywords for
+	  // classdef blocks.
+	  if (! lexer_flags.parsing_classdef)
+	    return 0;
+	  // fall through ...
+
+	case classdef_kw:
+	  // 'classdef' is always a keyword.
+	  promptflag--;
+	  break;	  
+
+	case function_kw:
+	  promptflag--;
+
+	  lexer_flags.defining_func = true;
+	  lexer_flags.parsed_function_name = false;
+
+	  if (! (reading_fcn_file || reading_script_file
+		 || reading_classdef_file))
+	    input_line_number = 1;
+	  break;
+
+        case magic_file_kw:
+	  {
+	    if ((reading_fcn_file || reading_script_file
+		 || reading_classdef_file)
+		&& ! curr_fcn_file_full_name.empty ())
+	      yylval.tok_val = new token (curr_fcn_file_full_name, l, c);
+	    else
+	      yylval.tok_val = new token ("stdin", l, c);
+	  }
+	  break;
+
+        case magic_line_kw:
+	  yylval.tok_val = new token (static_cast<double> (l), "", l, c);
+	  break;
+
+	default:
+	  panic_impossible ();
+	}
+
+      if (! yylval.tok_val)
+	yylval.tok_val = new token (l, c);
+
+      token_stack.push (yylval.tok_val);
+
+      return kw->tok;
+    }
+
+  return 0;
+}
+
+static bool
+is_variable (const std::string& name)
+{
+  return (symbol_table::is_variable (name)
+	  || (lexer_flags.pending_local_variables.find (name)
+	      != lexer_flags.pending_local_variables.end ()));
+}
+
+static std::string
+grab_block_comment (stream_reader& reader, bool& eof)
+{
+  std::string buf;
+
+  bool at_bol = true;
+  bool look_for_marker = false;
+
+  bool warned_incompatible = false;
+
+  int c = 0;
+
+  while ((c = reader.getc ()) != EOF)
+    {
+      current_input_column++;
+
+      if (look_for_marker)
+	{
+	  at_bol = false;
+	  look_for_marker = false;
+
+	  if (c == '{' || c == '}')
+	    {
+	      std::string tmp_buf (1, static_cast<char> (c));
+
+	      int type = c;
+
+	      bool done = false;
+
+	      while ((c = reader.getc ()) != EOF && ! done)
+		{
+		  current_input_column++;
+
+		  switch (c)
+		    {
+		    case ' ':
+		    case '\t':
+		      tmp_buf += static_cast<char> (c);
+		      break;
+
+		    case '\n':
+		      {
+			current_input_column = 0;
+			at_bol = true;
+			done = true;
+
+			if (type == '{')
+			  {
+			    block_comment_nesting_level++;
+			    promptflag--;
+			  }
+			else
+			  {
+			    block_comment_nesting_level--;
+			    promptflag++;
+
+			    if (block_comment_nesting_level == 0)
+			      {
+				buf += grab_comment_block (reader, true, eof);
+
+				return buf;
+			      }
+			  }
+		      }
+		      break;
+
+		    default:
+		      at_bol = false;
+		      tmp_buf += static_cast<char> (c);
+		      buf += tmp_buf;
+		      done = true;
+		      break;
+		    }
+		}
+	    }
+	}
+
+      if (at_bol && (c == '%' || c == '#'))
+        {
+          if (c == '#' && ! warned_incompatible)
+	    {
+	      warned_incompatible = true;
+	      maybe_gripe_matlab_incompatible_comment (c);
+	    }
+
+	  at_bol = false;
+	  look_for_marker = true;
+	}
+      else
+	{
+	  buf += static_cast<char> (c);
+
+	  if (c == '\n')
+	    {
+	      current_input_column = 0;
+	      at_bol = true;
+	    }
+	}
+    }
+
+  if (c == EOF)
+    eof = true;
+
+  return buf;
+}
+
+std::string
+grab_comment_block (stream_reader& reader, bool at_bol,
+		    bool& eof)
+{
+  std::string buf;
+
+  // TRUE means we are at the beginning of a comment block.
+  bool begin_comment = false;
+
+  // TRUE means we are currently reading a comment block.
+  bool in_comment = false;
+
+  bool warned_incompatible = false;
+
+  int c = 0;
+
+  while ((c = reader.getc ()) != EOF)
+    {
+      current_input_column++;
+
+      if (begin_comment)
+	{
+	  if (c == '%' || c == '#')
+	    {
+	      at_bol = false;
+	      continue;
+	    }
+	  else if (at_bol && c == '{')
+	    {
+	      std::string tmp_buf (1, static_cast<char> (c));
+
+	      bool done = false;
+
+	      while ((c = reader.getc ()) != EOF && ! done)
+		{
+		  current_input_column++;
+
+		  switch (c)
+		    {
+		    case ' ':
+		    case '\t':
+		      tmp_buf += static_cast<char> (c);
+		      break;
+
+		    case '\n':
+		      {
+			current_input_column = 0;
+			at_bol = true;
+			done = true;
+
+			block_comment_nesting_level++;
+			promptflag--;
+
+			buf += grab_block_comment (reader, eof);
+
+			in_comment = false;
+
+			if (eof)
+			  goto done;
+		      }
+		      break;
+
+		    default:
+		      at_bol = false;
+		      tmp_buf += static_cast<char> (c);
+		      buf += tmp_buf;
+		      done = true;
+		      break;
+		    }
+		}
+	    }
+	  else
+	    {
+	      at_bol = false;
+	      begin_comment = false;
+	    }
+	}	
+
+      if (in_comment)
+	{
+	  buf += static_cast<char> (c);
+
+	  if (c == '\n')
+	    {
+	      at_bol = true;
+	      current_input_column = 0;
+	      in_comment = false;
+
+	      // FIXME -- bailing out here prevents things like
+	      //
+	      //    octave> # comment
+	      //    octave> x = 1
+	      //
+	      // from failing at the command line, while still
+	      // allowing blocks of comments to be grabbed properly
+	      // for function doc strings.  But only the first line of
+	      // a mult-line doc string will be picked up for
+	      // functions defined on the command line.  We need a
+	      // better way of collecting these comments...
+	      if (! (reading_fcn_file || reading_script_file))
+		goto done;
+	    }
+	}
+      else
+	{
+	  switch (c)
+	    {
+	    case ' ':
+	    case '\t':
+	      break;
+
+	    case '#':
+	      if (! warned_incompatible)
+		{
+		  warned_incompatible = true;
+		  maybe_gripe_matlab_incompatible_comment (c);
+		}
+	      // fall through...
+
+	    case '%':
+	      in_comment = true;
+	      begin_comment = true;
+	      break;
+
+	    default:
+	      current_input_column--;
+	      reader.ungetc (c);
+	      goto done;
+	    }
+	}
+    }
+
+ done:
+
+  if (c == EOF)
+    eof = true;
+
+  return buf;
+}
+
+class
+flex_stream_reader : public stream_reader
+{
+public:
+  flex_stream_reader (char *buf_arg) : stream_reader (), buf (buf_arg) { }
+
+  int getc (void) { return ::text_yyinput (); }
+  int ungetc (int c) { ::xunput (c, buf); return 0; }
+  
+private:
+  char *buf;
+};
+
+static int
+process_comment (bool start_in_block, bool& eof)
+{
+  eof = false;
+
+  std::string help_txt;
+
+  if (! help_buf.empty ())
+    help_txt = help_buf.top ();
+
+  flex_stream_reader flex_reader (yytext);
+
+  // process_comment is only supposed to be called when we are not
+  // initially looking at a block comment.
+
+  std::string txt = start_in_block
+    ? grab_block_comment (flex_reader, eof)
+    : grab_comment_block (flex_reader, false, eof);
+
+  if (lexer_debug_flag)
+    std::cerr << "C: " << txt << std::endl;
+
+  if (help_txt.empty () && nesting_level.none ())
+    {
+      if (! help_buf.empty ())
+	help_buf.pop ();
+
+      help_buf.push (txt);
+    }
+
+  octave_comment_buffer::append (txt);
+
+  current_input_column = 1;
+  lexer_flags.quote_is_transpose = false;
+  lexer_flags.convert_spaces_to_comma = true;
+  lexer_flags.at_beginning_of_statement = true;
+
+  if (YY_START == COMMAND_START)
+    BEGIN (INITIAL);
+
+  if (nesting_level.none ())
+    return '\n';
+  else if (nesting_level.is_bracket_or_brace ())
+    return ';';
+  else
+    return 0;
+}
+
+// Return 1 if the given character matches any character in the given
+// string.
+
+static bool
+match_any (char c, const char *s)
+{
+  char tmp;
+  while ((tmp = *s++) != '\0')
+    {
+      if (c == tmp)
+	return true;
+    }
+  return false;
+}
+
+// Given information about the spacing surrounding an operator,
+// return 1 if it looks like it should be treated as a binary
+// operator.  For example,
+//
+//   [ 1 + 2 ]  or  [ 1+ 2]  or  [ 1+2 ]  ==>  binary
+//
+//   [ 1 +2 ]  ==>  unary
+
+static bool
+looks_like_bin_op (bool spc_prev, int next_char)
+{
+  bool spc_next = (next_char == ' ' || next_char == '\t');
+
+  return ((spc_prev && spc_next) || ! spc_prev);
+}
+
+// Recognize separators.  If the separator is a CRLF pair, it is
+// replaced by a single LF.
+
+static bool
+next_token_is_sep_op (void)
+{
+  bool retval = false;
+
+  int c = text_yyinput ();
+
+  retval = match_any (c, ",;\n]");
+
+  xunput (c, yytext);
+
+  return retval;
+}
+
+// Try to determine if the next token should be treated as a postfix
+// unary operator.  This is ugly, but it seems to do the right thing.
+
+static bool
+next_token_is_postfix_unary_op (bool spc_prev)
+{
+  bool un_op = false;
+
+  int c0 = text_yyinput ();
+
+  if (c0 == '\'' && ! spc_prev)
+    {
+      un_op = true;
+    }
+  else if (c0 == '.')
+    {
+      int c1 = text_yyinput ();
+      un_op = (c1 == '\'');
+      xunput (c1, yytext);
+    }
+  else if (c0 == '+')
+    {
+      int c1 = text_yyinput ();
+      un_op = (c1 == '+');
+      xunput (c1, yytext);
+    }
+  else if (c0 == '-')
+    {
+      int c1 = text_yyinput ();
+      un_op = (c1 == '-');
+      xunput (c1, yytext);
+    }
+
+  xunput (c0, yytext);
+
+  return un_op;
+}
+
+// Try to determine if the next token should be treated as a binary
+// operator.
+//
+// This kluge exists because whitespace is not always ignored inside
+// the square brackets that are used to create matrix objects (though
+// spacing only really matters in the cases that can be interpreted
+// either as binary ops or prefix unary ops: currently just +, -).
+//
+// Note that a line continuation directly following a + or - operator
+// (e.g., the characters '[' 'a' ' ' '+' '\' LFD 'b' ']') will be
+// parsed as a binary operator.
+
+static bool
+next_token_is_bin_op (bool spc_prev)
+{
+  bool bin_op = false;
+
+  int c0 = text_yyinput ();
+
+  switch (c0)
+    {
+    case '+':
+    case '-':
+      {
+	int c1 = text_yyinput ();
+
+	switch (c1)
+	  {
+	  case '+':
+	  case '-':
+	    // Unary ops, spacing doesn't matter.
+	    break;
+
+	  case '=':
+	    // Binary ops, spacing doesn't matter.
+	    bin_op = true;
+	    break;
+
+	  default:
+	    // Could be either, spacing matters.
+	    bin_op = looks_like_bin_op (spc_prev, c1);
+	    break;
+	  }
+
+	xunput (c1, yytext);
+      }
+      break;
+
+    case ':':
+    case '/':
+    case '\\':
+    case '^':
+      // Always a binary op (may also include /=, \=, and ^=).
+      bin_op = true;
+      break;
+
+    // .+ .- ./ .\ .^ .* .**
+    case '.':
+      {
+	int c1 = text_yyinput ();
+
+	if (match_any (c1, "+-/\\^*"))
+	  // Always a binary op (may also include .+=, .-=, ./=, ...).
+	  bin_op = true;
+	else if (! isdigit (c1) && c1 != ' ' && c1 != '\t' && c1 != '.')
+	  // A structure element reference is a binary op.
+	  bin_op = true;
+
+	xunput (c1, yytext);
+      }
+      break;
+
+    // = == & && | || * **
+    case '=':
+    case '&':
+    case '|':
+    case '*':
+      // Always a binary op (may also include ==, &&, ||, **).
+      bin_op = true;
+      break;
+
+    // < <= <> > >=
+    case '<':
+    case '>':
+      // Always a binary op (may also include <=, <>, >=).
+      bin_op = true;
+      break;
+
+    // ~= !=
+    case '~':
+    case '!':
+      {
+	int c1 = text_yyinput ();
+
+	// ~ and ! can be unary ops, so require following =.
+	if (c1 == '=')
+	  bin_op = true;
+
+	xunput (c1, yytext);
+      }
+      break;
+
+    default:
+      break;
+    }
+
+  xunput (c0, yytext);
+
+  return bin_op;
+}
+
+// Used to delete trailing white space from tokens.
+
+static std::string
+strip_trailing_whitespace (char *s)
+{
+  std::string retval = s;
+
+  size_t pos = retval.find_first_of (" \t");
+
+  if (pos != std::string::npos)
+    retval.resize (pos);
+
+  return retval;
+}
+
+// FIXME -- we need to handle block comments here.
+
+static void
+scan_for_comments (const char *text)
+{
+  std::string comment_buf;
+
+  bool in_comment = false;
+  bool beginning_of_comment = false;
+
+  int len = strlen (text);
+  int i = 0;
+
+  while (i < len)
+    {
+      char c = text[i++];
+
+      switch (c)
+	{
+	case '%':
+	case '#':
+	  if (in_comment)
+	    {
+	      if (! beginning_of_comment)
+		comment_buf += static_cast<char> (c);
+	    }
+	  else
+	    {
+	      maybe_gripe_matlab_incompatible_comment (c);
+	      in_comment = true;
+	      beginning_of_comment = true;
+	    }
+	  break;
+
+	case '\n':
+	  if (in_comment)
+	    {
+	      comment_buf += static_cast<char> (c);
+	      octave_comment_buffer::append (comment_buf);
+	      comment_buf.resize (0);
+	      in_comment = false;
+	      beginning_of_comment = false;
+	    }
+	  break;
+
+	default:
+	  if (in_comment)
+	    {
+	      comment_buf += static_cast<char> (c);
+	      beginning_of_comment = false;
+	    }
+	  break;
+	}
+    }
+
+  if (! comment_buf.empty ())
+    octave_comment_buffer::append (comment_buf);
+}
+
+// Discard whitespace, including comments and continuations.
+//
+// Return value is logical OR of the following values:
+//
+//  ATE_NOTHING      : no spaces to eat
+//  ATE_SPACE_OR_TAB : space or tab in input
+//  ATE_NEWLINE      : bare new line in input
+
+// FIXME -- we need to handle block comments here.
+
+static yum_yum
+eat_whitespace (void)
+{
+  yum_yum retval = ATE_NOTHING;
+
+  std::string comment_buf;
+
+  bool in_comment = false;
+  bool beginning_of_comment = false;
+
+  int c = 0;
+
+  while ((c = text_yyinput ()) != EOF)
+    {
+      current_input_column++;
+
+      switch (c)
+	{
+	case ' ':
+	case '\t':
+	  if (in_comment)
+	    {
+	      comment_buf += static_cast<char> (c);
+	      beginning_of_comment = false;
+	    }
+	  retval |= ATE_SPACE_OR_TAB;
+	  break;
+
+	case '\n':
+	  retval |= ATE_NEWLINE;
+	  if (in_comment)
+	    {
+	      comment_buf += static_cast<char> (c);
+	      octave_comment_buffer::append (comment_buf);
+	      comment_buf.resize (0);
+	      in_comment = false;
+	      beginning_of_comment = false;
+	    }
+	  current_input_column = 0;
+	  break;
+
+	case '#':
+	case '%':
+	  if (in_comment)
+	    {
+	      if (! beginning_of_comment)
+		comment_buf += static_cast<char> (c);
+	    }
+	  else
+	    {
+	      maybe_gripe_matlab_incompatible_comment (c);
+	      in_comment = true;
+	      beginning_of_comment = true;
+	    }
+	  break;
+
+	case '.':
+	  if (in_comment)
+	    {
+	      comment_buf += static_cast<char> (c);
+	      beginning_of_comment = false;
+	      break;
+	    }
+	  else
+	    {
+	      if (have_ellipsis_continuation ())
+		break;
+	      else
+		goto done;
+	    }
+
+	case '\\':
+	  if (in_comment)
+	    {
+	      comment_buf += static_cast<char> (c);
+	      beginning_of_comment = false;
+	      break;
+	    }
+	  else
+	    {
+	      if (have_continuation ())
+		break;
+	      else
+		goto done;
+	    }
+
+	default:
+	  if (in_comment)
+	    {
+	      comment_buf += static_cast<char> (c);
+	      beginning_of_comment = false;
+	      break;
+	    }
+	  else
+	    goto done;
+	}
+    }
+
+  if (! comment_buf.empty ())
+    octave_comment_buffer::append (comment_buf);
+
+ done:
+  xunput (c, yytext);
+  current_input_column--;
+  return retval;
+}
+
+static inline bool
+looks_like_hex (const char *s, int len)
+{
+  return (len > 2 && s[0] == '0' && (s[1] == 'x' || s[1] == 'X'));
+}
+
+static void
+handle_number (void)
+{
+  double value = 0.0;
+  int nread = 0;
+
+  if (looks_like_hex (yytext, strlen (yytext)))
+    {
+      unsigned long ival;
+
+      nread = sscanf (yytext, "%lx", &ival);
+
+      value = static_cast<double> (ival);
+    }
+  else
+    {
+      char *tmp = strsave (yytext);
+
+      char *idx = strpbrk (tmp, "Dd");
+
+      if (idx)
+	*idx = 'e';
+
+      nread = sscanf (tmp, "%lf", &value);
+
+      delete [] tmp;
+    }
+
+  // If yytext doesn't contain a valid number, we are in deep doo doo.
+
+  assert (nread == 1);
+
+  lexer_flags.quote_is_transpose = true;
+  lexer_flags.convert_spaces_to_comma = true;
+  lexer_flags.looking_for_object_index = true;
+  lexer_flags.at_beginning_of_statement = false;
+
+  yylval.tok_val = new token (value, yytext, input_line_number,
+			      current_input_column);
+
+  token_stack.push (yylval.tok_val);
+
+  current_input_column += yyleng;
+
+  do_comma_insert_check ();
+}
+
+// We have seen a backslash and need to find out if it should be
+// treated as a continuation character.  If so, this eats it, up to
+// and including the new line character.
+//
+// Match whitespace only, followed by a comment character or newline.
+// Once a comment character is found, discard all input until newline.
+// If non-whitespace characters are found before comment
+// characters, return 0.  Otherwise, return 1.
+
+// FIXME -- we need to handle block comments here.
+
+static bool
+have_continuation (bool trailing_comments_ok)
+{
+  std::ostringstream buf;
+
+  std::string comment_buf;
+
+  bool in_comment = false;
+  bool beginning_of_comment = false;
+
+  int c = 0;
+
+  while ((c = text_yyinput ()) != EOF)
+    {
+      buf << static_cast<char> (c);
+
+      switch (c)
+	{
+	case ' ':
+	case '\t':
+	  if (in_comment)
+	    {
+	      comment_buf += static_cast<char> (c);
+	      beginning_of_comment = false;
+	    }
+	  break;
+
+	case '%':
+	case '#':
+	  if (trailing_comments_ok)
+	    {
+	      if (in_comment)
+		{
+		  if (! beginning_of_comment)
+		    comment_buf += static_cast<char> (c);
+		}
+	      else
+		{
+		  maybe_gripe_matlab_incompatible_comment (c);
+		  in_comment = true;
+		  beginning_of_comment = true;
+		}
+	    }
+	  else
+	    goto cleanup;
+	  break;
+
+	case '\n':
+	  if (in_comment)
+	    {
+	      comment_buf += static_cast<char> (c);
+	      octave_comment_buffer::append (comment_buf);
+	    }
+	  current_input_column = 0;
+	  promptflag--;
+	  gripe_matlab_incompatible_continuation ();
+	  return true;
+
+	default:
+	  if (in_comment)
+	    {
+	      comment_buf += static_cast<char> (c);
+	      beginning_of_comment = false;
+	    }
+	  else
+	    goto cleanup;
+	  break;
+	}
+    }
+
+  xunput (c, yytext);
+  return false;
+
+cleanup:
+
+  std::string s = buf.str ();
+
+  int len = s.length ();
+  while (len--)
+    xunput (s[len], yytext);
+
+  return false;
+}
+
+// We have seen a `.' and need to see if it is the start of a
+// continuation.  If so, this eats it, up to and including the new
+// line character.
+
+static bool
+have_ellipsis_continuation (bool trailing_comments_ok)
+{
+  char c1 = text_yyinput ();
+  if (c1 == '.')
+    {
+      char c2 = text_yyinput ();
+      if (c2 == '.' && have_continuation (trailing_comments_ok))
+	return true;
+      else
+	{
+	  xunput (c2, yytext);
+	  xunput (c1, yytext);
+	}
+    }
+  else
+    xunput (c1, yytext);
+
+  return false;
+}
+
+// See if we have a continuation line.  If so, eat it and the leading
+// whitespace on the next line.
+//
+// Return value is the same as described for eat_whitespace().
+
+static yum_yum
+eat_continuation (void)
+{
+  int retval = ATE_NOTHING;
+
+  int c = text_yyinput ();
+
+  if ((c == '.' && have_ellipsis_continuation ())
+      || (c == '\\' && have_continuation ()))
+    retval = eat_whitespace ();
+  else
+    xunput (c, yytext);
+
+  return retval;
+}
+
+static int
+handle_string (char delim)
+{
+  std::ostringstream buf;
+
+  int bos_line = input_line_number;
+  int bos_col = current_input_column;
+
+  int c;
+  int escape_pending = 0;
+
+  while ((c = text_yyinput ()) != EOF)
+    {
+      current_input_column++;
+
+      if (c == '\\')
+	{
+	  if (delim == '\'' || escape_pending)
+	    {
+	      buf << static_cast<char> (c);
+	      escape_pending = 0;
+	    }
+	  else
+	    {
+	      if (have_continuation (false))
+		escape_pending = 0;
+	      else
+		{
+		  buf << static_cast<char> (c);
+		  escape_pending = 1;
+		}
+	    }
+	  continue;
+	}
+      else if (c == '.')
+	{
+	  if (delim == '\'' || ! have_ellipsis_continuation (false))
+	    buf << static_cast<char> (c);
+	}
+      else if (c == '\n')
+	{
+	  error ("unterminated string constant");
+	  break;
+	}
+      else if (c == delim)
+	{
+	  if (escape_pending)
+	    buf << static_cast<char> (c);
+	  else
+	    {
+	      c = text_yyinput ();
+	      if (c == delim)
+		{
+		  buf << static_cast<char> (c);		    
+		}
+	      else
+		{
+		  std::string s;  
+		  xunput (c, yytext);
+
+		  if (delim == '\'')
+		    s = buf.str ();
+		  else
+		    s = do_string_escapes (buf.str ());
+
+		  lexer_flags.quote_is_transpose = true;
+		  lexer_flags.convert_spaces_to_comma = true;
+
+		  yylval.tok_val = new token (s, bos_line, bos_col);
+		  token_stack.push (yylval.tok_val);
+
+		  if (delim == '"')
+		    gripe_matlab_incompatible ("\" used as string delimiter");
+		  else if (delim == '\'')
+		    gripe_single_quote_string ();
+
+                  lexer_flags.looking_for_object_index = true;
+		  lexer_flags.at_beginning_of_statement = false;
+
+		  return delim == '"' ? DQ_STRING : SQ_STRING;
+		}
+	    }
+	}
+      else
+	{
+	  buf << static_cast<char> (c);
+	}
+
+      escape_pending = 0;
+    }
+
+  return LEXICAL_ERROR;
+}
+
+static bool
+next_token_is_assign_op (void)
+{
+  bool retval = false;
+
+  int c0 = text_yyinput ();
+
+  switch (c0)
+    {
+    case '=':
+      {
+	int c1 = text_yyinput ();
+	xunput (c1, yytext);
+	if (c1 != '=')
+	  retval = true;
+      }
+      break;
+
+    case '+':
+    case '-':
+    case '*':
+    case '/':
+    case '\\':
+    case '&':
+    case '|':
+      {
+	int c1 = text_yyinput ();
+	xunput (c1, yytext);
+	if (c1 == '=')
+	  retval = true;
+      }
+      break;
+
+    case '.':
+      {
+	int c1 = text_yyinput ();
+	if (match_any (c1, "+-*/\\"))
+	  {
+	    int c2 = text_yyinput ();
+	    xunput (c2, yytext);
+	    if (c2 == '=')
+	      retval = true;
+	  }
+	xunput (c1, yytext);
+      }
+      break;
+
+    case '>':
+      {
+	int c1 = text_yyinput ();
+	if (c1 == '>')
+	  {
+	    int c2 = text_yyinput ();
+	    xunput (c2, yytext);
+	    if (c2 == '=')
+	      retval = true;
+	  }
+	xunput (c1, yytext);
+      }
+      break;
+
+    case '<':
+      {
+	int c1 = text_yyinput ();
+	if (c1 == '<')
+	  {
+	    int c2 = text_yyinput ();
+	    xunput (c2, yytext);
+	    if (c2 == '=')
+	      retval = true;
+	  }
+	xunput (c1, yytext);
+      }
+      break;
+
+    default:
+      break;
+    }
+
+  xunput (c0, yytext);
+
+  return retval;
+}
+
+static bool
+next_token_is_index_op (void)
+{
+  int c = text_yyinput ();
+  xunput (c, yytext);
+  return c == '(' || c == '{';
+}
+
+static int
+handle_close_bracket (bool spc_gobbled, int bracket_type)
+{
+  int retval = bracket_type;
+
+  if (! nesting_level.none ())
+    {
+      nesting_level.remove ();
+
+      if (bracket_type == ']')
+	lexer_flags.bracketflag--;
+      else if (bracket_type == '}')
+	lexer_flags.braceflag--;
+      else
+	panic_impossible ();
+    }
+
+  if (lexer_flags.bracketflag == 0 && lexer_flags.braceflag == 0)
+    BEGIN (INITIAL);
+
+  if (bracket_type == ']'
+      && next_token_is_assign_op ()
+      && ! lexer_flags.looking_at_return_list)
+    {
+      retval = CLOSE_BRACE;
+    }
+  else if ((lexer_flags.bracketflag || lexer_flags.braceflag)
+	   && lexer_flags.convert_spaces_to_comma
+	   && (nesting_level.is_bracket ()
+	       || (nesting_level.is_brace ()
+		   && ! lexer_flags.looking_at_object_index.front ())))
+    {
+      bool index_op = next_token_is_index_op ();
+
+      // Don't insert comma if we are looking at something like
+      //
+      //   [x{i}{j}] or [x{i}(j)]
+      //
+      // but do if we are looking at
+      //
+      //   [x{i} {j}] or [x{i} (j)]
+
+      if (spc_gobbled || ! (bracket_type == '}' && index_op))
+	{
+	  bool bin_op = next_token_is_bin_op (spc_gobbled);
+
+	  bool postfix_un_op = next_token_is_postfix_unary_op (spc_gobbled);
+
+	  bool sep_op = next_token_is_sep_op ();
+
+	  if (! (postfix_un_op || bin_op || sep_op))
+	    {
+	      maybe_warn_separator_insert (',');
+
+	      xunput (',', yytext);
+	      return retval;
+	    }
+	}
+    }
+
+  lexer_flags.quote_is_transpose = true;
+  lexer_flags.convert_spaces_to_comma = true;
+
+  return retval;
+}
+
+static void
+maybe_unput_comma (int spc_gobbled)
+{
+  if (nesting_level.is_bracket ()
+      || (nesting_level.is_brace ()
+	  && ! lexer_flags.looking_at_object_index.front ()))
+    {
+      int bin_op = next_token_is_bin_op (spc_gobbled);
+
+      int postfix_un_op = next_token_is_postfix_unary_op (spc_gobbled);
+
+      int c1 = text_yyinput ();
+      int c2 = text_yyinput ();
+
+      xunput (c2, yytext);
+      xunput (c1, yytext);
+
+      int sep_op = next_token_is_sep_op ();
+
+      int dot_op = (c1 == '.'
+		    && (isalpha (c2) || isspace (c2) || c2 == '_'));
+
+      if (postfix_un_op || bin_op || sep_op || dot_op)
+	return;
+
+      int index_op = (c1 == '(' || c1 == '{');
+
+      // If there is no space before the indexing op, we don't insert
+      // a comma.
+
+      if (index_op && ! spc_gobbled)
+	return;
+
+      maybe_warn_separator_insert (',');
+
+      xunput (',', yytext);
+    }
+}
+
+static bool
+next_token_can_follow_bin_op (void)
+{
+  std::stack<char> buf;
+
+  int c = EOF;
+
+  // Skip whitespace in current statement on current line
+  while (true)
+    {
+      c = text_yyinput ();
+
+      buf.push (c);
+
+      if (match_any (c, ",;\n") || (c != ' ' && c != '\t'))
+	break;
+    }
+
+  // Restore input.
+  while (! buf.empty ())
+    {
+      xunput (buf.top (), yytext);
+
+      buf.pop ();
+    }
+
+  return (isalnum (c) || match_any (c, "!\"'(-[_{~"));
+}
+
+static bool
+looks_like_command_arg (void)
+{
+  bool retval = true;
+
+  int c0 = text_yyinput ();
+
+  switch (c0)
+    {
+    // = ==
+    case '=':
+      {
+	int c1 = text_yyinput ();
+
+	if (c1 == '=')
+	  {
+	    int c2 = text_yyinput ();
+
+	    if (! match_any (c2, ",;\n") && (c2 == ' ' || c2 == '\t')
+		&& next_token_can_follow_bin_op ())
+	      retval = false;
+
+	    xunput (c2, yytext);
+	  }
+	else
+	  retval = false;
+
+	xunput (c1, yytext);
+      }
+      break;
+
+    case '(':
+    case '{':
+      // Indexing.
+      retval = false;
+      break;
+
+    case '\n':
+      // EOL.
+      break;
+
+    case '\'':
+    case '"':
+      // Beginning of a character string.
+      break;
+
+    // + - ++ -- += -=
+    case '+':
+    case '-':
+      {
+	int c1 = text_yyinput ();
+
+	switch (c1)
+	  {
+	  case '\n':
+	    // EOL.
+	  case '+':
+	  case '-':
+	    // Unary ops, spacing doesn't matter.
+	    break;
+
+	  case '\t':
+	  case ' ':
+	    {
+	      if (next_token_can_follow_bin_op ())
+		retval = false;
+	    }
+	    break;
+
+	  case '=':
+	    {
+	      int c2 = text_yyinput ();
+
+	      if (! match_any (c2, ",;\n") && (c2 == ' ' || c2 == '\t')
+		  && next_token_can_follow_bin_op ())
+		retval = false;
+
+	      xunput (c2, yytext);
+	    }
+	    break;
+	  }
+
+	xunput (c1, yytext);
+      }
+      break;
+
+    case ':':
+    case '/':
+    case '\\':
+    case '^':
+      {
+	int c1 = text_yyinput ();
+
+	if (! match_any (c1, ",;\n") && (c1 == ' ' || c1 == '\t')
+	    && next_token_can_follow_bin_op ())
+	  retval = false;
+
+	xunput (c1, yytext);
+      }
+      break;
+
+    // .+ .- ./ .\ .^ .* .**
+    case '.':
+      {
+	int c1 = text_yyinput ();
+
+	if (match_any (c1, "+-/\\^*"))
+	  {
+	    int c2 = text_yyinput ();
+
+	    if (c2 == '=')
+	      {
+		int c3 = text_yyinput ();
+
+		if (! match_any (c3, ",;\n") && (c3 == ' ' || c3 == '\t')
+		    && next_token_can_follow_bin_op ())
+		  retval = false;
+
+		xunput (c3, yytext);
+	      }
+	    else if (! match_any (c2, ",;\n") && (c2 == ' ' || c2 == '\t')
+		     && next_token_can_follow_bin_op ())
+	      retval = false;
+
+	    xunput (c2, yytext);
+	  }
+	else if (! match_any (c1, ",;\n")
+		 && (! isdigit (c1) && c1 != ' ' && c1 != '\t'
+		     && c1 != '.'))
+	  {
+	    // Structure reference.  FIXME -- is this a complete check?
+
+	    retval = false;
+	  }
+
+	xunput (c1, yytext);
+      }
+      break;
+
+    // & && | || * **
+    case '&':
+    case '|':
+    case '*':
+      {
+	int c1 = text_yyinput ();
+
+	if (c1 == c0)
+	  {
+	    int c2 = text_yyinput ();
+
+	    if (! match_any (c2, ",;\n") && (c2 == ' ' || c2 == '\t')
+		&& next_token_can_follow_bin_op ())
+	      retval = false;
+
+	    xunput (c2, yytext);
+	  }
+	else if (! match_any (c1, ",;\n") && (c1 == ' ' || c1 == '\t')
+		 && next_token_can_follow_bin_op ())
+	  retval = false;
+
+	xunput (c1, yytext);
+      }
+      break;
+
+    // < <= > >=
+    case '<':
+    case '>':
+      {
+	int c1 = text_yyinput ();
+
+	if (c1 == '=')
+	  {
+	    int c2 = text_yyinput ();
+
+	    if (! match_any (c2, ",;\n") && (c2 == ' ' || c2 == '\t')
+		&& next_token_can_follow_bin_op ())
+	      retval = false;
+
+	    xunput (c2, yytext);
+	  }
+	else if (! match_any (c1, ",;\n") && (c1 == ' ' || c1 == '\t')
+		 && next_token_can_follow_bin_op ())
+	  retval = false;
+
+	xunput (c1, yytext);
+      }
+      break;
+
+    // ~= !=
+    case '~':
+    case '!':
+      {
+	int c1 = text_yyinput ();
+
+	// ~ and ! can be unary ops, so require following =.
+	if (c1 == '=')
+	  {
+	    int c2 = text_yyinput ();
+
+	    if (! match_any (c2, ",;\n") && (c2 == ' ' || c2 == '\t')
+		&& next_token_can_follow_bin_op ())
+	      retval = false;
+
+	    xunput (c2, yytext);
+	  }
+	else if (! match_any (c1, ",;\n") && (c1 == ' ' || c1 == '\t')
+		 && next_token_can_follow_bin_op ())
+	  retval = false;
+
+	xunput (c1, yytext);
+      }
+      break;
+
+    default:
+      break;
+    }
+
+  xunput (c0, yytext);
+
+  return retval;
+}
+
+static int
+handle_superclass_identifier (void)
+{
+  eat_continuation ();
+
+  std::string pkg;  
+  std::string meth = strip_trailing_whitespace (yytext); 
+  size_t pos = meth.find ("@");
+  std::string cls = meth.substr (pos).substr (1);
+  meth = meth.substr (0, pos - 1);  
+  
+  pos = cls.find (".");
+  if (pos != std::string::npos)
+    {	 
+      pkg = cls.substr (pos).substr (1);
+      cls = cls.substr (0, pos - 1);
+    }
+    
+  int kw_token = (is_keyword_token (meth) || is_keyword_token (cls)
+		  || is_keyword_token (pkg));
+  if (kw_token)
+    {
+      error ("method, class and package names may not be keywords");
+      return LEXICAL_ERROR;
+    }
+ 
+  yylval.tok_val
+    = new token (meth.empty () ? 0 : &(symbol_table::insert (meth)),
+                 cls.empty () ? 0 : &(symbol_table::insert (cls)),
+                 pkg.empty () ? 0 : &(symbol_table::insert (pkg)),
+		 input_line_number, current_input_column);				   
+  token_stack.push (yylval.tok_val);
+  
+  lexer_flags.convert_spaces_to_comma = true;
+  current_input_column += yyleng;
+  
+  return SUPERCLASSREF;
+}
+
+static int
+handle_meta_identifier (void)
+{
+  eat_continuation ();
+
+  std::string pkg;
+  std::string cls = strip_trailing_whitespace (yytext).substr (1);
+  size_t pos = cls.find (".");
+  
+  if (pos != std::string::npos)
+    {	 
+      pkg = cls.substr (pos).substr (1);
+      cls = cls.substr (0, pos - 1);
+    }
+  
+  int kw_token = is_keyword_token (cls) || is_keyword_token (pkg);
+  if (kw_token)
+    {
+       error ("class and package names may not be keywords");
+      return LEXICAL_ERROR;
+    }
+  
+  yylval.tok_val
+    = new token (cls.empty () ? 0 : &(symbol_table::insert (cls)),
+		 pkg.empty () ? 0 : &(symbol_table::insert (pkg)),
+		 input_line_number, current_input_column);
+
+  token_stack.push (yylval.tok_val);
+                   
+  lexer_flags.convert_spaces_to_comma = true;
+  current_input_column += yyleng;
+  
+  return METAQUERY;
+}
+
+// Figure out exactly what kind of token to return when we have seen
+// an identifier.  Handles keywords.  Return -1 if the identifier
+// should be ignored.
+
+static int
+handle_identifier (void)
+{
+  bool at_bos = lexer_flags.at_beginning_of_statement;
+
+  std::string tok = strip_trailing_whitespace (yytext);
+
+  int c = yytext[yyleng-1];
+
+  int cont_is_spc = eat_continuation ();
+
+  int spc_gobbled = (cont_is_spc || c == ' ' || c == '\t');
+
+  // If we are expecting a structure element, avoid recognizing
+  // keywords and other special names and return STRUCT_ELT, which is
+  // a string that is also a valid identifier.  But first, we have to
+  // decide whether to insert a comma.
+
+  if (lexer_flags.looking_at_indirect_ref)
+    {
+      do_comma_insert_check ();
+
+      maybe_unput_comma (spc_gobbled);
+
+      yylval.tok_val = new token (tok, input_line_number,
+				  current_input_column);
+
+      token_stack.push (yylval.tok_val);
+
+      lexer_flags.quote_is_transpose = true;
+      lexer_flags.convert_spaces_to_comma = true;
+      lexer_flags.looking_for_object_index = true;
+
+      current_input_column += yyleng;
+
+      return STRUCT_ELT;
+    }
+
+  lexer_flags.at_beginning_of_statement = false;
+
+  // The is_keyword_token may reset
+  // lexer_flags.at_beginning_of_statement.  For example, if it sees
+  // an else token, then the next token is at the beginning of a
+  // statement.
+
+  int kw_token = is_keyword_token (tok);
+
+  // If we found a keyword token, then the beginning_of_statement flag
+  // is already set.  Otherwise, we won't be at the beginning of a
+  // statement.
+
+  if (lexer_flags.looking_at_function_handle)
+    {
+      if (kw_token)
+	{
+	  error ("function handles may not refer to keywords");
+
+	  return LEXICAL_ERROR;
+	}
+      else
+	{
+	  yylval.tok_val = new token (tok, input_line_number,
+				      current_input_column);
+
+	  token_stack.push (yylval.tok_val);
+
+	  current_input_column += yyleng;
+	  lexer_flags.quote_is_transpose = false;
+	  lexer_flags.convert_spaces_to_comma = true;
+	  lexer_flags.looking_for_object_index = true;
+
+	  return FCN_HANDLE;
+	}
+    }
+
+  // If we have a regular keyword, return it.
+  // Keywords can be followed by identifiers.
+
+  if (kw_token)
+    {
+      if (kw_token >= 0)
+	{
+	  current_input_column += yyleng;
+	  lexer_flags.quote_is_transpose = false;
+	  lexer_flags.convert_spaces_to_comma = true;
+	  lexer_flags.looking_for_object_index = false;
+	}
+
+      return kw_token;
+    }
+
+  // See if we have a plot keyword (title, using, with, or clear).
+
+  int c1 = text_yyinput ();
+
+  bool next_tok_is_eq = false;
+  if (c1 == '=')
+    {
+      int c2 = text_yyinput ();
+      xunput (c2, yytext);
+
+      if (c2 != '=')
+	next_tok_is_eq = true;
+    }
+
+  xunput (c1, yytext);
+
+  // Kluge alert.
+  //
+  // If we are looking at a text style function, set up to gobble its
+  // arguments.
+  //
+  // If the following token is `=', or if we are parsing a function
+  // return list or function parameter list, or if we are looking at
+  // something like [ab,cd] = foo (), force the symbol to be inserted
+  // as a variable in the current symbol table.
+
+  if (! is_variable (tok))
+    {
+      if (at_bos && spc_gobbled && looks_like_command_arg ())
+	{
+	  BEGIN (COMMAND_START);
+	}
+      else if (next_tok_is_eq
+	       || lexer_flags.looking_at_decl_list
+	       || lexer_flags.looking_at_return_list
+	       || (lexer_flags.looking_at_parameter_list
+		   && ! lexer_flags.looking_at_initializer_expression))
+	{
+	  symbol_table::force_variable (tok);
+	}
+      else if (lexer_flags.looking_at_matrix_or_assign_lhs)
+	{
+	  lexer_flags.pending_local_variables.insert (tok);
+	}
+    }
+
+  // Find the token in the symbol table.  Beware the magic
+  // transformation of the end keyword...
+
+  if (tok == "end")
+    tok = "__end__";    
+
+  yylval.tok_val = new token (&(symbol_table::insert (tok)),
+			      input_line_number, current_input_column);
+
+  token_stack.push (yylval.tok_val);
+
+  // After seeing an identifer, it is ok to convert spaces to a comma
+  // (if needed).
+
+  lexer_flags.convert_spaces_to_comma = true;
+
+  if (! (next_tok_is_eq || YY_START == COMMAND_START))
+    {
+      lexer_flags.quote_is_transpose = true;
+
+      do_comma_insert_check ();
+
+      maybe_unput_comma (spc_gobbled);
+    }
+
+  current_input_column += yyleng;
+
+  if (tok != "__end__")
+    lexer_flags.looking_for_object_index = true;
+
+  return NAME;
+}
+
+void
+lexical_feedback::init (void)
+{
+  // Not initially defining a matrix list.
+  bracketflag = 0;
+
+  // Not initially defining a cell array list.
+  braceflag = 0;
+
+  // Not initially inside a loop or if statement.
+  looping = 0;
+
+  // Not initially defining a function.
+  defining_func = false;
+  parsed_function_name = false;
+  parsing_class_method = false;
+  
+  // Not initially defining a class with classdef.
+  maybe_classdef_get_set_method = false;
+  parsing_classdef = false;
+
+  // Not initiallly looking at a function handle.
+  looking_at_function_handle = 0;
+
+  // Not parsing a function return, parameter, or declaration list.
+  looking_at_return_list = false;
+  looking_at_parameter_list = false;
+  looking_at_decl_list = false;
+
+  // Not looking at an argument list initializer expression.
+  looking_at_initializer_expression = false;
+
+  // Not parsing a matrix or the left hand side of multi-value
+  // assignment statement.
+  looking_at_matrix_or_assign_lhs = false;
+
+  // Not parsing an object index.
+  while (! looking_at_object_index.empty ())
+    looking_at_object_index.pop_front ();
+
+  looking_at_object_index.push_front (false);
+
+  // Object index not possible until we've seen something.
+  looking_for_object_index = false;
+
+  // Yes, we are at the beginning of a statement.
+  at_beginning_of_statement = true;
+
+  // No need to do comma insert or convert spaces to comma at
+  // beginning of input. 
+  convert_spaces_to_comma = true;
+  do_comma_insert = false;
+
+  // Not initially looking at indirect references.
+  looking_at_indirect_ref = false;
+
+  // Quote marks strings intially.
+  quote_is_transpose = false;
+
+  // Set of identifiers that might be local variable names is empty.
+  pending_local_variables.clear ();
+}
+
+bool
+is_keyword (const std::string& s)
+{
+  return octave_kw_hash::in_word_set (s.c_str (), s.length ()) != 0;
+}
+
+DEFUN (iskeyword, args, ,
+  "-*- texinfo -*-\n\
+@deftypefn {Built-in Function} {} iskeyword (@var{name})\n\
+Return true if @var{name} is an Octave keyword.  If @var{name}\n\
+is omitted, return a list of keywords.\n\
+@end deftypefn")
+{
+  octave_value retval;
+
+  int argc = args.length () + 1;
+
+  string_vector argv = args.make_argv ("iskeyword");
+
+  if (error_state)
+    return retval;
+
+  if (argc == 1)
+    {
+      string_vector lst (TOTAL_KEYWORDS);
+
+      for (int i = 0; i < TOTAL_KEYWORDS; i++)
+	lst[i] = wordlist[i].name;
+
+      retval = Cell (lst.sort ());
+    }
+  else if (argc == 2)
+    {
+      retval = is_keyword (argv[1]);
+    }
+  else
+    print_usage ();
+
+  return retval;
+}
+
+void
+prep_lexer_for_script_file (void)
+{
+  BEGIN (SCRIPT_FILE_BEGIN);
+}
+
+void
+prep_lexer_for_function_file (void)
+{
+  BEGIN (FUNCTION_FILE_BEGIN);
+}
+
+static void
+maybe_warn_separator_insert (char sep)
+{
+  std::string nm = curr_fcn_file_full_name;
+
+  if (nm.empty ())
+    warning_with_id ("Octave:separator-insert",
+		     "potential auto-insertion of `%c' near line %d",
+		     sep, input_line_number);
+  else
+    warning_with_id ("Octave:separator-insert",
+		     "potential auto-insertion of `%c' near line %d of file %s",
+		     sep, input_line_number, nm.c_str ());
+}
+
+static void
+gripe_single_quote_string (void)
+{
+  std::string nm = curr_fcn_file_full_name;
+
+  if (nm.empty ())
+    warning_with_id ("Octave:single-quote-string",
+		     "single quote delimited string near line %d",
+		     input_line_number);
+  else
+    warning_with_id ("Octave:single-quote-string",
+		     "single quote delimited string near line %d of file %s",
+		     input_line_number, nm.c_str ());
+}
+
+static void
+gripe_matlab_incompatible (const std::string& msg)
+{
+  std::string nm = curr_fcn_file_full_name;
+
+  if (nm.empty ())
+    warning_with_id ("Octave:matlab-incompatible",
+		     "potential Matlab compatibility problem: %s",
+		     msg.c_str ());
+  else
+    warning_with_id ("Octave:matlab-incompatible",
+		     "potential Matlab compatibility problem: %s near line %d offile %s",
+		     msg.c_str (), input_line_number, nm.c_str ());
+}
+
+static void
+maybe_gripe_matlab_incompatible_comment (char c)
+{
+  if (c == '#')
+    gripe_matlab_incompatible ("# used as comment character");
+}
+
+static void
+gripe_matlab_incompatible_continuation (void)
+{
+  gripe_matlab_incompatible ("\\ used as line continuation marker");
+}
+
+static void
+gripe_matlab_incompatible_operator (const std::string& op)
+{
+  std::string t = op;
+  int n = t.length ();
+  if (t[n-1] == '\n')
+    t.resize (n-1);
+  gripe_matlab_incompatible (t + " used as operator");
+}
+
+static void
+display_token (int tok)
+{
+  switch (tok)
+    {
+    case '=': std::cerr << "'='\n"; break;
+    case ':': std::cerr << "':'\n"; break;
+    case '-': std::cerr << "'-'\n"; break;
+    case '+': std::cerr << "'+'\n"; break;
+    case '*': std::cerr << "'*'\n"; break;
+    case '/': std::cerr << "'/'\n"; break;
+    case ADD_EQ: std::cerr << "ADD_EQ\n"; break;
+    case SUB_EQ: std::cerr << "SUB_EQ\n"; break;
+    case MUL_EQ: std::cerr << "MUL_EQ\n"; break;
+    case DIV_EQ: std::cerr << "DIV_EQ\n"; break;
+    case LEFTDIV_EQ: std::cerr << "LEFTDIV_EQ\n"; break;
+    case POW_EQ: std::cerr << "POW_EQ\n"; break;
+    case EMUL_EQ: std::cerr << "EMUL_EQ\n"; break;
+    case EDIV_EQ: std::cerr << "EDIV_EQ\n"; break;
+    case ELEFTDIV_EQ: std::cerr << "ELEFTDIV_EQ\n"; break;
+    case EPOW_EQ: std::cerr << "EPOW_EQ\n"; break;
+    case AND_EQ: std::cerr << "AND_EQ\n"; break;
+    case OR_EQ: std::cerr << "OR_EQ\n"; break;
+    case LSHIFT_EQ: std::cerr << "LSHIFT_EQ\n"; break;
+    case RSHIFT_EQ: std::cerr << "RSHIFT_EQ\n"; break;
+    case LSHIFT: std::cerr << "LSHIFT\n"; break;
+    case RSHIFT: std::cerr << "RSHIFT\n"; break;
+    case EXPR_AND_AND: std::cerr << "EXPR_AND_AND\n"; break;
+    case EXPR_OR_OR: std::cerr << "EXPR_OR_OR\n"; break;
+    case EXPR_AND: std::cerr << "EXPR_AND\n"; break;
+    case EXPR_OR: std::cerr << "EXPR_OR\n"; break;
+    case EXPR_NOT: std::cerr << "EXPR_NOT\n"; break;
+    case EXPR_LT: std::cerr << "EXPR_LT\n"; break;
+    case EXPR_LE: std::cerr << "EXPR_LE\n"; break;
+    case EXPR_EQ: std::cerr << "EXPR_EQ\n"; break;
+    case EXPR_NE: std::cerr << "EXPR_NE\n"; break;
+    case EXPR_GE: std::cerr << "EXPR_GE\n"; break;
+    case EXPR_GT: std::cerr << "EXPR_GT\n"; break;
+    case LEFTDIV: std::cerr << "LEFTDIV\n"; break;
+    case EMUL: std::cerr << "EMUL\n"; break;
+    case EDIV: std::cerr << "EDIV\n"; break;
+    case ELEFTDIV: std::cerr << "ELEFTDIV\n"; break;
+    case EPLUS: std::cerr << "EPLUS\n"; break;
+    case EMINUS: std::cerr << "EMINUS\n"; break;
+    case QUOTE: std::cerr << "QUOTE\n"; break;
+    case TRANSPOSE: std::cerr << "TRANSPOSE\n"; break;
+    case PLUS_PLUS: std::cerr << "PLUS_PLUS\n"; break;
+    case MINUS_MINUS: std::cerr << "MINUS_MINUS\n"; break;
+    case POW: std::cerr << "POW\n"; break;
+    case EPOW: std::cerr << "EPOW\n"; break;
+    case NUM: std::cerr << "NUM\n"; break;
+    case IMAG_NUM: std::cerr << "IMAG_NUM\n"; break;
+    case STRUCT_ELT: std::cerr << "STRUCT_ELT\n"; break;
+    case NAME: std::cerr << "NAME\n"; break;
+    case END: std::cerr << "END\n"; break;
+    case DQ_STRING: std::cerr << "DQ_STRING\n"; break;
+    case SQ_STRING: std::cerr << "SQ_STRING\n"; break;
+    case FOR: std::cerr << "FOR\n"; break;
+    case WHILE: std::cerr << "WHILE\n"; break;
+    case DO: std::cerr << "DO\n"; break;
+    case UNTIL: std::cerr << "UNTIL\n"; break;
+    case IF: std::cerr << "IF\n"; break;
+    case ELSEIF: std::cerr << "ELSEIF\n"; break;
+    case ELSE: std::cerr << "ELSE\n"; break;
+    case SWITCH: std::cerr << "SWITCH\n"; break;
+    case CASE: std::cerr << "CASE\n"; break;
+    case OTHERWISE: std::cerr << "OTHERWISE\n"; break;
+    case BREAK: std::cerr << "BREAK\n"; break;
+    case CONTINUE: std::cerr << "CONTINUE\n"; break;
+    case FUNC_RET: std::cerr << "FUNC_RET\n"; break;
+    case UNWIND: std::cerr << "UNWIND\n"; break;
+    case CLEANUP: std::cerr << "CLEANUP\n"; break;
+    case TRY: std::cerr << "TRY\n"; break;
+    case CATCH: std::cerr << "CATCH\n"; break;
+    case GLOBAL: std::cerr << "GLOBAL\n"; break;
+    case STATIC: std::cerr << "STATIC\n"; break;
+    case FCN_HANDLE: std::cerr << "FCN_HANDLE\n"; break;
+    case END_OF_INPUT: std::cerr << "END_OF_INPUT\n\n"; break;
+    case LEXICAL_ERROR: std::cerr << "LEXICAL_ERROR\n\n"; break;
+    case FCN: std::cerr << "FCN\n"; break;
+    case CLOSE_BRACE: std::cerr << "CLOSE_BRACE\n"; break;
+    case SCRIPT_FILE: std::cerr << "SCRIPT_FILE\n"; break;
+    case FUNCTION_FILE: std::cerr << "FUNCTION_FILE\n"; break;
+    case SUPERCLASSREF: std::cerr << "SUPERCLASSREF\n"; break;
+    case METAQUERY: std::cerr << "METAQUERY\n"; break;
+    case GET: std::cerr << "GET\n"; break;
+    case SET: std::cerr << "SET\n"; break;
+    case PROPERTIES: std::cerr << "PROPERTIES\n"; break;
+    case METHODS: std::cerr << "METHODS\n"; break;
+    case EVENTS: std::cerr << "EVENTS\n"; break;
+    case CLASSDEF: std::cerr << "CLASSDEF\n"; break;
+    case '\n': std::cerr << "\\n\n"; break;
+    case '\r': std::cerr << "\\r\n"; break;
+    case '\t': std::cerr << "TAB\n"; break;
+    default:
+      {
+        if (tok < 256)
+	  std::cerr << static_cast<char> (tok) << "\n";
+	else
+	  std::cerr << "UNKNOWN(" << tok << ")\n";
+      }
+      break;
+    }
+}
+
+static void
+display_state (void)
+{
+  std::cerr << "S: ";
+
+  switch (YY_START)
+    {
+    case INITIAL:
+      std::cerr << "INITIAL" << std::endl;
+      break;
+
+    case COMMAND_START:
+      std::cerr << "COMMAND_START" << std::endl;
+      break;
+
+    case MATRIX_START:
+      std::cerr << "MATRIX_START" << std::endl;
+      break;
+
+    case SCRIPT_FILE_BEGIN:
+      std::cerr << "SCRIPT_FILE_BEGIN" << std::endl;
+      break;
+
+    case FUNCTION_FILE_BEGIN:
+      std::cerr << "FUNCTION_FILE_BEGIN" << std::endl;
+      break;
+
+    default:
+      std::cerr << "UNKNOWN START STATE!" << std::endl;
+      break;
+    }
+}
+
+static void
+lexer_debug (const char *pattern, const char *text)
+{
+  std::cerr << std::endl;
+
+  display_state ();
+
+  std::cerr << "P: " << pattern << std::endl;
+  std::cerr << "T: " << text << std::endl;
+}
+
+DEFUN (__display_tokens__, args, nargout,
+  "-*- texinfo -*-\n\
+@deftypefn {Built-in Function} {} __display_tokens__ ()\n\
+Query or set the internal variable that determines whether Octave's\n\
+lexer displays tokens as they are read.\n\
+@end deftypefn")
+{
+  return SET_INTERNAL_VARIABLE (display_tokens);
+}
+
+DEFUN (__token_count__, , ,
+  "-*- texinfo -*-\n\
+@deftypefn {Built-in Function} {} __token_count__ ()\n\
+Number of language tokens processed since Octave startup.\n\
+@end deftypefn")
+{
+  return octave_value (Vtoken_count);
+}
+
+DEFUN (__lexer_debug_flag__, args, nargout,
+  "-*- texinfo -*-\n\
+@deftypefn {Built-in Function} {@var{old_val} =} __lexer_debug_flag__ (@var{new_val}))\n\
+Undocumented internal function.\n\
+@end deftypefn")
+{
+  octave_value retval;
+
+  retval = set_internal_variable (lexer_debug_flag, args, nargout,
+           			  "__lexer_debug_flag__");
+
+  return retval;
+}
+
+/*
+;;; Local Variables: ***
+;;; mode: C++ ***
+;;; End: ***
+*/
--- a/src/mkbuiltins	Tue Nov 10 13:25:57 2009 -0500
+++ b/src/mkbuiltins	Tue Nov 10 15:02:25 2009 -0500
@@ -87,7 +87,7 @@
 EOF
 
 for file in $DEF_FILES; do
-  fcn=`echo $file | $SED 's,^\./,,; s/\.df//; s/-/_/g'`
+  fcn=`echo $file | $SED 's,.*/,,; s/\.df//; s/-/_/g;'`
   echo "static void"
   echo "install_${fcn}_fcns (void)"
   echo "{"
@@ -104,7 +104,7 @@
 EOF
 
 for file in $DEF_FILES; do
-  fcn=`echo $file | $SED 's,^\./,,; s/\.df//; s/-/_/g'`
+  fcn=`echo $file | $SED 's,.*/,,; s/\.df//; s/-/_/g;'`
   echo "  install_${fcn}_fcns ();"
 done
 
--- a/src/mkgendoc	Tue Nov 10 13:25:57 2009 -0500
+++ b/src/mkgendoc	Tue Nov 10 15:02:25 2009 -0500
@@ -89,7 +89,7 @@
 EOF
 
 for file in $DOC_FILES; do
-  fcn=`echo $file | $SED 's,^\./,,; s/\.df//; s/-/_/g'`
+  fcn=`echo $file | $SED 's,.*/,,; s/\.df//; s/-/_/g;'`
   echo "static void"
   echo "print_${fcn}_doc_strings (void)"
   echo "{"
@@ -113,7 +113,7 @@
 EOF
 
 for file in $DOC_FILES; do
-  fcn=`echo $file | $SED 's,^\./,,; s/\.df//; s/-/_/g'`
+  fcn=`echo $file | $SED 's,.*/,,; s/\.df//; s/-/_/g;'`
   echo "  print_${fcn}_doc_strings ();"
 done
 
--- a/src/oct-conf.h.in	Tue Nov 10 13:25:57 2009 -0500
+++ b/src/oct-conf.h.in	Tue Nov 10 15:02:25 2009 -0500
@@ -309,6 +309,10 @@
 #define OCTAVE_CONF_INCLUDEDIR %OCTAVE_CONF_INCLUDEDIR%
 #endif
 
+#ifndef OCTAVE_CONF_LAPACK_LIBS
+#define OCTAVE_CONF_LAPACK_LIBS %OCTAVE_CONF_LAPACK_LIBS%
+#endif
+
 #ifndef OCTAVE_CONF_LDFLAGS
 #define OCTAVE_CONF_LDFLAGS %OCTAVE_CONF_LDFLAGS%
 #endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/oct-parse.yy	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,4620 @@
+/*
+
+Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+              2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009  John W. Eaton
+Copyright (C) 2009 David Grundberg
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+// Parser for Octave.
+
+// C decarations.
+
+%{
+#define YYDEBUG 1
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <cassert>
+#include <cstdio>
+
+#ifdef YYBYACC
+#include <cstdlib>
+#endif
+
+#include <iostream>
+#include <map>
+#include <sstream>
+
+#include "Cell.h"
+#include "Matrix.h"
+#include "cmd-edit.h"
+#include "cmd-hist.h"
+#include "file-ops.h"
+#include "file-stat.h"
+#include "oct-env.h"
+#include "oct-time.h"
+#include "quit.h"
+
+#include "comment-list.h"
+#include "defaults.h"
+#include "defun.h"
+#include "dirfns.h"
+#include "dynamic-ld.h"
+#include "error.h"
+#include "input.h"
+#include "lex.h"
+#include "load-path.h"
+#include "oct-hist.h"
+#include "oct-map.h"
+#include "ov-fcn-handle.h"
+#include "ov-usr-fcn.h"
+#include "ov-null-mat.h"
+#include "toplev.h"
+#include "pager.h"
+#include "parse.h"
+#include "pt-all.h"
+#include "pt-eval.h"
+#include "symtab.h"
+#include "token.h"
+#include "unwind-prot.h"
+#include "utils.h"
+#include "variables.h"
+
+// The current input line number.
+int input_line_number = 1;
+
+// The column of the current token.
+int current_input_column = 1;
+
+// Buffer for help text snagged from function files.
+std::stack<std::string> help_buf;
+
+// Buffer for comments appearing before a function statement.
+static std::string fcn_comment_header;
+
+// TRUE means we are using readline.
+// (--no-line-editing)
+bool line_editing = true;
+
+// TRUE means we printed messages about reading startup files.
+bool reading_startup_message_printed = false;
+
+// TRUE means input is coming from startup file.
+bool input_from_startup_file = false;
+
+// = 0 currently outside any function.
+// = 1 inside the primary function or a subfunction.
+// > 1 means we are looking at a function definition that seems to be
+//     inside a function. Note that the function still might not be a
+//     nested function.
+static int current_function_depth = 0;
+
+// Maximum function depth detected. Just here to determine whether
+// we have nested functions or just implicitly ended subfunctions.
+static int max_function_depth = 0;
+
+// FALSE if we are still at the primary function. Subfunctions can
+// only be declared inside function files.
+static int parsing_subfunctions = false;
+
+// Have we found an explicit end to a function?
+static bool endfunction_found = false;
+
+// Keep track of symbol table information when parsing functions.
+std::stack<symbol_table::scope_id> symtab_context;
+
+// Name of the current class when we are parsing class methods or
+// constructors.
+std::string current_class_name;
+
+// TRUE means we are in the process of autoloading a function.
+static bool autoloading = false;
+
+// TRUE means the current function file was found in a relative path
+// element.
+static bool fcn_file_from_relative_lookup = false;
+
+// Pointer to the primary user function or user script function.
+static octave_function *primary_fcn_ptr = 0;
+
+// Scope where we install all subfunctions and nested functions. Only
+// used while reading function files.
+static symbol_table::scope_id primary_fcn_scope;
+
+// List of autoloads (function -> file mapping).
+static std::map<std::string, std::string> autoload_map;
+
+// Forward declarations for some functions defined at the bottom of
+// the file.
+
+// Generic error messages.
+static void
+yyerror (const char *s);
+
+// Error mesages for mismatched end tokens.
+static void
+end_error (const char *type, token::end_tok_type ettype, int l, int c);
+
+// Check to see that end tokens are properly matched.
+static bool
+end_token_ok (token *tok, token::end_tok_type expected);
+
+// Maybe print a warning if an assignment expression is used as the
+// test in a logical expression.
+static void
+maybe_warn_assign_as_truth_value (tree_expression *expr);
+
+// Maybe print a warning about switch labels that aren't constants.
+static void
+maybe_warn_variable_switch_label (tree_expression *expr);
+
+// Finish building a range.
+static tree_expression *
+finish_colon_expression (tree_colon_expression *e);
+
+// Build a constant.
+static tree_constant *
+make_constant (int op, token *tok_val);
+
+// Build a function handle.
+static tree_fcn_handle *
+make_fcn_handle (token *tok_val);
+
+// Build an anonymous function handle.
+static tree_anon_fcn_handle *
+make_anon_fcn_handle (tree_parameter_list *param_list, tree_statement *stmt);
+
+// Build a binary expression.
+static tree_expression *
+make_binary_op (int op, tree_expression *op1, token *tok_val,
+		tree_expression *op2);
+
+// Build a boolean expression.
+static tree_expression *
+make_boolean_op (int op, tree_expression *op1, token *tok_val,
+		 tree_expression *op2);
+
+// Build a prefix expression.
+static tree_expression *
+make_prefix_op (int op, tree_expression *op1, token *tok_val);
+
+// Build a postfix expression.
+static tree_expression *
+make_postfix_op (int op, tree_expression *op1, token *tok_val);
+
+// Build an unwind-protect command.
+static tree_command *
+make_unwind_command (token *unwind_tok, tree_statement_list *body,
+		     tree_statement_list *cleanup, token *end_tok,
+		     octave_comment_list *lc, octave_comment_list *mc);
+
+// Build a try-catch command.
+static tree_command *
+make_try_command (token *try_tok, tree_statement_list *body,
+		  tree_statement_list *cleanup, token *end_tok,
+		  octave_comment_list *lc, octave_comment_list *mc);
+
+// Build a while command.
+static tree_command *
+make_while_command (token *while_tok, tree_expression *expr,
+		    tree_statement_list *body, token *end_tok,
+		    octave_comment_list *lc);
+
+// Build a do-until command.
+static tree_command *
+make_do_until_command (token *until_tok, tree_statement_list *body,
+		       tree_expression *expr, octave_comment_list *lc);
+
+// Build a for command.
+static tree_command *
+make_for_command (token *for_tok, tree_argument_list *lhs,
+		  tree_expression *expr, tree_statement_list *body,
+		  token *end_tok, octave_comment_list *lc);
+
+// Build a break command.
+static tree_command *
+make_break_command (token *break_tok);
+
+// Build a continue command.
+static tree_command *
+make_continue_command (token *continue_tok);
+
+// Build a return command.
+static tree_command *
+make_return_command (token *return_tok);
+
+// Start an if command.
+static tree_if_command_list *
+start_if_command (tree_expression *expr, tree_statement_list *list);
+
+// Finish an if command.
+static tree_if_command *
+finish_if_command (token *if_tok, tree_if_command_list *list,
+		   token *end_tok, octave_comment_list *lc);
+
+// Build an elseif clause.
+static tree_if_clause *
+make_elseif_clause (token *elseif_tok, tree_expression *expr,
+		    tree_statement_list *list, octave_comment_list *lc);
+
+// Finish a switch command.
+static tree_switch_command *
+finish_switch_command (token *switch_tok, tree_expression *expr,
+		       tree_switch_case_list *list, token *end_tok,
+		       octave_comment_list *lc);
+
+// Build a switch case.
+static tree_switch_case *
+make_switch_case (token *case_tok, tree_expression *expr,
+		  tree_statement_list *list, octave_comment_list *lc);
+
+// Build an assignment to a variable.
+static tree_expression *
+make_assign_op (int op, tree_argument_list *lhs, token *eq_tok,
+		tree_expression *rhs);
+
+// Define a script.
+static void
+make_script (tree_statement_list *cmds, tree_statement *end_script);
+
+// Begin defining a function.
+static octave_user_function *
+start_function (tree_parameter_list *param_list, tree_statement_list *body,
+		tree_statement *end_function);
+
+// Create a no-op statement for end_function.
+static tree_statement *
+make_end (const std::string& type, int l, int c);
+
+// Do most of the work for defining a function.
+static octave_user_function *
+frob_function (const std::string& fname, octave_user_function *fcn);
+
+// Finish defining a function.
+static tree_function_def *
+finish_function (tree_parameter_list *ret_list,
+		 octave_user_function *fcn, octave_comment_list *lc);
+
+// Reset state after parsing function.
+static void
+recover_from_parsing_function (void);
+
+// Make an index expression.
+static tree_index_expression *
+make_index_expression (tree_expression *expr,
+		       tree_argument_list *args, char type);
+
+// Make an indirect reference expression.
+static tree_index_expression *
+make_indirect_ref (tree_expression *expr, const std::string&);
+
+// Make an indirect reference expression with dynamic field name.
+static tree_index_expression *
+make_indirect_ref (tree_expression *expr, tree_expression *field);
+
+// Make a declaration command.
+static tree_decl_command *
+make_decl_command (int tok, token *tok_val, tree_decl_init_list *lst);
+
+// Finish building a matrix list.
+static tree_expression *
+finish_matrix (tree_matrix *m);
+
+// Finish building a cell list.
+static tree_expression *
+finish_cell (tree_cell *c);
+
+// Maybe print a warning.  Duh.
+static void
+maybe_warn_missing_semi (tree_statement_list *);
+
+// Set the print flag for a statement based on the separator type.
+static tree_statement_list *
+set_stmt_print_flag (tree_statement_list *, char, bool);
+
+// Create a statement list.
+static tree_statement_list *make_statement_list (tree_statement *stmt);
+
+// Append a statement to an existing statement list.
+static tree_statement_list *
+append_statement_list (tree_statement_list *list, char sep,
+		       tree_statement *stmt, bool warn_missing_semi);
+
+// Finish building a statement.
+template <class T>
+static tree_statement *
+make_statement (T *arg)
+{
+  octave_comment_list *comment = octave_comment_buffer::get_comment ();
+
+  return new tree_statement (arg, comment);
+}
+
+#define ABORT_PARSE \
+  do \
+    { \
+      global_command = 0; \
+      yyerrok; \
+      if (! symtab_context.empty ()) \
+        { \
+	  symbol_table::set_scope (symtab_context.top ()); \
+	  symtab_context.pop (); \
+        } \
+      if (interactive || forced_interactive) \
+	YYACCEPT; \
+      else \
+	YYABORT; \
+    } \
+  while (0)
+
+%}
+
+// Bison declarations.
+
+// Don't add spaces around the = here; it causes some versions of
+// bison to fail to properly recognize the directive.
+
+%name-prefix="octave_"
+
+%union
+{
+  // The type of the basic tokens returned by the lexer.
+  token *tok_val;
+
+  // Comment strings that we need to deal with mid-rule.
+  octave_comment_list *comment_type;
+
+  // Types for the nonterminals we generate.
+  char sep_type;
+  tree *tree_type;
+  tree_matrix *tree_matrix_type;
+  tree_cell *tree_cell_type;
+  tree_expression *tree_expression_type;
+  tree_constant *tree_constant_type;
+  tree_fcn_handle *tree_fcn_handle_type;
+  tree_anon_fcn_handle *tree_anon_fcn_handle_type;
+  tree_identifier *tree_identifier_type;
+  tree_index_expression *tree_index_expression_type;
+  tree_colon_expression *tree_colon_expression_type;
+  tree_argument_list *tree_argument_list_type;
+  tree_parameter_list *tree_parameter_list_type;
+  tree_command *tree_command_type;
+  tree_if_command *tree_if_command_type;
+  tree_if_clause *tree_if_clause_type;
+  tree_if_command_list *tree_if_command_list_type;
+  tree_switch_command *tree_switch_command_type;
+  tree_switch_case *tree_switch_case_type;
+  tree_switch_case_list *tree_switch_case_list_type;
+  tree_decl_elt *tree_decl_elt_type;
+  tree_decl_init_list *tree_decl_init_list_type;
+  tree_decl_command *tree_decl_command_type;
+  tree_statement *tree_statement_type;
+  tree_statement_list *tree_statement_list_type;
+  octave_user_function *octave_user_function_type;
+  void *dummy_type;
+}
+
+// Tokens with line and column information.
+%token <tok_val> '=' ':' '-' '+' '*' '/'
+%token <tok_val> ADD_EQ SUB_EQ MUL_EQ DIV_EQ LEFTDIV_EQ POW_EQ
+%token <tok_val> EMUL_EQ EDIV_EQ ELEFTDIV_EQ EPOW_EQ AND_EQ OR_EQ
+%token <tok_val> LSHIFT_EQ RSHIFT_EQ LSHIFT RSHIFT
+%token <tok_val> EXPR_AND_AND EXPR_OR_OR
+%token <tok_val> EXPR_AND EXPR_OR EXPR_NOT
+%token <tok_val> EXPR_LT EXPR_LE EXPR_EQ EXPR_NE EXPR_GE EXPR_GT
+%token <tok_val> LEFTDIV EMUL EDIV ELEFTDIV EPLUS EMINUS
+%token <tok_val> QUOTE TRANSPOSE
+%token <tok_val> PLUS_PLUS MINUS_MINUS POW EPOW
+%token <tok_val> NUM IMAG_NUM
+%token <tok_val> STRUCT_ELT
+%token <tok_val> NAME
+%token <tok_val> END
+%token <tok_val> DQ_STRING SQ_STRING
+%token <tok_val> FOR WHILE DO UNTIL
+%token <tok_val> IF ELSEIF ELSE
+%token <tok_val> SWITCH CASE OTHERWISE
+%token <tok_val> BREAK CONTINUE FUNC_RET
+%token <tok_val> UNWIND CLEANUP
+%token <tok_val> TRY CATCH
+%token <tok_val> GLOBAL STATIC
+%token <tok_val> FCN_HANDLE
+%token <tok_val> PROPERTIES
+%token <tok_val> METHODS
+%token <tok_val> EVENTS
+%token <tok_val> METAQUERY
+%token <tok_val> SUPERCLASSREF
+%token <tok_val> GET SET
+
+// Other tokens.
+%token END_OF_INPUT LEXICAL_ERROR
+%token FCN SCRIPT_FILE FUNCTION_FILE CLASSDEF
+// %token VARARGIN VARARGOUT
+%token CLOSE_BRACE
+
+// Nonterminals we construct.
+%type <comment_type> stash_comment function_beg classdef_beg
+%type <comment_type> properties_beg methods_beg events_beg
+%type <sep_type> sep_no_nl opt_sep_no_nl sep opt_sep
+%type <tree_type> input
+%type <tree_constant_type> string constant magic_colon
+%type <tree_anon_fcn_handle_type> anon_fcn_handle
+%type <tree_fcn_handle_type> fcn_handle
+%type <tree_matrix_type> matrix_rows matrix_rows1
+%type <tree_cell_type> cell_rows cell_rows1
+%type <tree_expression_type> matrix cell
+%type <tree_expression_type> primary_expr postfix_expr prefix_expr binary_expr
+%type <tree_expression_type> simple_expr colon_expr assign_expr expression
+%type <tree_identifier_type> identifier fcn_name
+%type <tree_identifier_type> superclass_identifier meta_identifier
+%type <octave_user_function_type> function1 function2 classdef1
+%type <tree_index_expression_type> word_list_cmd
+%type <tree_colon_expression_type> colon_expr1
+%type <tree_argument_list_type> arg_list word_list assign_lhs
+%type <tree_argument_list_type> cell_or_matrix_row
+%type <tree_parameter_list_type> param_list param_list1 param_list2
+%type <tree_parameter_list_type> return_list return_list1
+%type <tree_parameter_list_type> superclasses opt_superclasses
+%type <tree_command_type> command select_command loop_command
+%type <tree_command_type> jump_command except_command function
+%type <tree_command_type> script_file classdef
+%type <tree_command_type> function_file function_list
+%type <tree_if_command_type> if_command
+%type <tree_if_clause_type> elseif_clause else_clause
+%type <tree_if_command_list_type> if_cmd_list1 if_cmd_list
+%type <tree_switch_command_type> switch_command
+%type <tree_switch_case_type> switch_case default_case
+%type <tree_switch_case_list_type> case_list1 case_list
+%type <tree_decl_elt_type> decl2
+%type <tree_decl_init_list_type> decl1
+%type <tree_decl_command_type> declaration
+%type <tree_statement_type> statement function_end classdef_end
+%type <tree_statement_list_type> simple_list simple_list1 list list1
+%type <tree_statement_list_type> opt_list input1
+// These types need to be specified.
+%type <dummy_type> attr
+%type <dummy_type> class_event
+%type <dummy_type> class_property
+%type <dummy_type> properties_list
+%type <dummy_type> properties_block
+%type <dummy_type> methods_list
+%type <dummy_type> methods_block
+%type <dummy_type> opt_attr_list
+%type <dummy_type> attr_list
+%type <dummy_type> events_list
+%type <dummy_type> events_block
+%type <dummy_type> class_body
+
+// Precedence and associativity.
+%left ';' ',' '\n'
+%right '=' ADD_EQ SUB_EQ MUL_EQ DIV_EQ LEFTDIV_EQ POW_EQ EMUL_EQ EDIV_EQ ELEFTDIV_EQ EPOW_EQ OR_EQ AND_EQ LSHIFT_EQ RSHIFT_EQ
+%left EXPR_OR_OR
+%left EXPR_AND_AND
+%left EXPR_OR
+%left EXPR_AND
+%left EXPR_LT EXPR_LE EXPR_EQ EXPR_NE EXPR_GE EXPR_GT
+%left LSHIFT RSHIFT
+%left ':'
+%left '-' '+' EPLUS EMINUS
+%left '*' '/' LEFTDIV EMUL EDIV ELEFTDIV
+%left UNARY PLUS_PLUS MINUS_MINUS EXPR_NOT
+%left POW EPOW QUOTE TRANSPOSE
+%left '(' '.' '{'
+
+// Where to start.
+%start input
+
+%%
+
+// ==============================
+// Statements and statement lists
+// ==============================
+
+input		: input1
+		  {
+		    global_command = $1;
+		    promptflag = 1;
+		    YYACCEPT;
+		  }
+		| function_file
+		  {
+		    YYACCEPT;
+		  }
+		| simple_list parse_error
+		  { ABORT_PARSE; }
+		| parse_error
+		  { ABORT_PARSE; }
+		;
+
+input1		: '\n'
+		  { $$ = 0; }
+		| END_OF_INPUT
+		  {
+		    parser_end_of_input = 1;
+		    $$ = 0;
+		  }
+		| simple_list
+		  { $$ = $1; }
+		| simple_list '\n'
+		  { $$ = $1; }
+		| simple_list END_OF_INPUT
+		  { $$ = $1; }
+		;
+
+simple_list	: simple_list1 opt_sep_no_nl
+		  { $$ = set_stmt_print_flag ($1, $2, false); }
+		;
+
+simple_list1	: statement
+		  { $$ = make_statement_list ($1); }
+		| simple_list1 sep_no_nl statement
+		  { $$ = append_statement_list ($1, $2, $3, false); }
+		;
+
+opt_list	: // empty
+		  { $$ = new tree_statement_list (); }
+		| list
+		  { $$ = $1; }
+		;
+
+list		: list1 opt_sep
+		  { $$ = set_stmt_print_flag ($1, $2, true); }
+		;
+
+list1		: statement
+		  { $$ = make_statement_list ($1); }
+		| list1 sep statement
+		  { $$ = append_statement_list ($1, $2, $3, true); }
+		;
+
+statement	: expression
+		  { $$ = make_statement ($1); }
+		| command
+		  { $$ = make_statement ($1); }
+		| word_list_cmd
+		  { $$ = make_statement ($1); }
+		;
+
+// =================
+// Word-list command
+// =================
+
+// These are not really like expressions since they can't appear on
+// the RHS of an assignment.  But they are also not like commands (IF,
+// WHILE, etc.
+
+word_list_cmd	: identifier word_list
+		  { $$ = make_index_expression ($1, $2, '('); }
+		;
+
+word_list	: string
+		  { $$ = new tree_argument_list ($1); }
+		| word_list string
+		  {
+		    $1->append ($2);
+		    $$ = $1;
+		  }
+		;
+
+// ===========
+// Expressions
+// ===========
+
+identifier	: NAME
+		  {
+		    symbol_table::symbol_record *sr = $1->sym_rec ();
+		    $$ = new tree_identifier (*sr, $1->line (), $1->column ());
+		  }
+		;
+
+superclass_identifier
+		: SUPERCLASSREF
+		  { $$ = new tree_identifier ($1->line (), $1->column ()); }
+		;
+	    
+meta_identifier	: METAQUERY
+		  { $$ = new tree_identifier ($1->line (), $1->column ()); }
+		;	    
+
+string		: DQ_STRING
+		  { $$ = make_constant (DQ_STRING, $1); }
+		| SQ_STRING
+		  { $$ = make_constant (SQ_STRING, $1); }
+		;
+
+constant	: NUM
+		  { $$ = make_constant (NUM, $1); }
+		| IMAG_NUM
+		  { $$ = make_constant (IMAG_NUM, $1); }
+		| string
+		  { $$ = $1; }
+		;
+
+matrix		: '[' ']'
+		  {
+		    $$ = new tree_constant (octave_null_matrix::instance);
+		    lexer_flags.looking_at_matrix_or_assign_lhs = false;
+		    lexer_flags.pending_local_variables.clear ();
+		  }
+		| '[' ';' ']'
+		  {
+		    $$ = new tree_constant (octave_null_matrix::instance);
+		    lexer_flags.looking_at_matrix_or_assign_lhs = false;
+		    lexer_flags.pending_local_variables.clear ();
+		  }
+		| '[' ',' ']'
+		  {
+		    $$ = new tree_constant (octave_null_matrix::instance);
+		    lexer_flags.looking_at_matrix_or_assign_lhs = false;
+		    lexer_flags.pending_local_variables.clear ();
+		  }
+		| '[' matrix_rows ']'
+		  {
+		    $$ = finish_matrix ($2);
+		    lexer_flags.looking_at_matrix_or_assign_lhs = false;
+		    lexer_flags.pending_local_variables.clear ();
+		  }
+		;
+
+matrix_rows	: matrix_rows1
+		  { $$ = $1; }
+		| matrix_rows1 ';'	// Ignore trailing semicolon.
+		  { $$ = $1; }
+		;
+
+matrix_rows1	: cell_or_matrix_row
+		  { $$ = new tree_matrix ($1); }
+		| matrix_rows1 ';' cell_or_matrix_row
+		  {
+		    $1->append ($3);
+		    $$ = $1;
+		  }
+		;
+
+cell		: '{' '}'
+		  { $$ = new tree_constant (octave_value (Cell ())); }
+		| '{' ';' '}'
+		  { $$ = new tree_constant (octave_value (Cell ())); }
+		| '{' cell_rows '}'
+		  { $$ = finish_cell ($2); }
+		;
+
+cell_rows	: cell_rows1
+		  { $$ = $1; }
+		| cell_rows1 ';'	// Ignore trailing semicolon.
+		  { $$ = $1; }
+		;
+
+cell_rows1	: cell_or_matrix_row
+		  { $$ = new tree_cell ($1); }
+		| cell_rows1 ';' cell_or_matrix_row
+		  {
+		    $1->append ($3);
+		    $$ = $1;
+		  }
+		;
+
+cell_or_matrix_row
+		: arg_list
+		  { $$ = $1; }
+		| arg_list ','	// Ignore trailing comma.
+		  { $$ = $1; }
+		;
+
+fcn_handle	: '@' FCN_HANDLE
+		  {
+		    $$ = make_fcn_handle ($2);
+		    lexer_flags.looking_at_function_handle--;
+		  }
+		;
+
+anon_fcn_handle	: '@' param_list statement
+		  { $$ = make_anon_fcn_handle ($2, $3); }
+		;
+	
+primary_expr	: identifier
+		  { $$ = $1; }
+		| constant
+		  { $$ = $1; }
+		| fcn_handle
+		  { $$ = $1; }
+		| matrix
+		  { $$ = $1; }
+		| cell
+		  { $$ = $1; }
+		| meta_identifier
+		  { $$ = $1; }
+		| superclass_identifier
+		  { $$ = $1; }
+		| '(' expression ')'
+		  { $$ = $2->mark_in_parens (); }
+		;
+
+magic_colon	: ':'
+		  {
+		    octave_value tmp (octave_value::magic_colon_t);
+		    $$ = new tree_constant (tmp);
+		  }
+		;
+
+arg_list	: expression
+		  { $$ = new tree_argument_list ($1); }
+		| magic_colon
+		  { $$ = new tree_argument_list ($1); }
+		| arg_list ',' magic_colon
+		  {
+		    $1->append ($3);
+		    $$ = $1;
+		  }
+		| arg_list ',' expression
+		  {
+		    $1->append ($3);
+		    $$ = $1;
+		  }
+		;
+
+indirect_ref_op	: '.'
+		  { lexer_flags.looking_at_indirect_ref = true; }
+		;
+
+postfix_expr	: primary_expr
+		  { $$ = $1; }
+		| postfix_expr '(' ')'
+		  { $$ = make_index_expression ($1, 0, '('); }
+		| postfix_expr '(' arg_list ')'
+		  { $$ = make_index_expression ($1, $3, '('); }
+		| postfix_expr '{' '}'
+		  { $$ = make_index_expression ($1, 0, '{'); }
+		| postfix_expr '{' arg_list '}'
+		  { $$ = make_index_expression ($1, $3, '{'); }
+		| postfix_expr PLUS_PLUS
+		  { $$ = make_postfix_op (PLUS_PLUS, $1, $2); }
+		| postfix_expr MINUS_MINUS
+		  { $$ = make_postfix_op (MINUS_MINUS, $1, $2); }
+		| postfix_expr QUOTE
+		  { $$ = make_postfix_op (QUOTE, $1, $2); }
+		| postfix_expr TRANSPOSE
+		  { $$ = make_postfix_op (TRANSPOSE, $1, $2); }
+		| postfix_expr indirect_ref_op STRUCT_ELT
+		  { $$ = make_indirect_ref ($1, $3->text ()); }
+		| postfix_expr indirect_ref_op '(' expression ')'
+		  { $$ = make_indirect_ref ($1, $4); }
+		;
+
+prefix_expr	: postfix_expr
+		  { $$ = $1; }
+		| binary_expr
+		  { $$ = $1; }
+		| PLUS_PLUS prefix_expr %prec UNARY
+		  { $$ = make_prefix_op (PLUS_PLUS, $2, $1); }
+		| MINUS_MINUS prefix_expr %prec UNARY
+		  { $$ = make_prefix_op (MINUS_MINUS, $2, $1); }
+		| EXPR_NOT prefix_expr %prec UNARY
+		  { $$ = make_prefix_op (EXPR_NOT, $2, $1); }
+		| '+' prefix_expr %prec UNARY
+		  { $$ = make_prefix_op ('+', $2, $1); }
+		| '-' prefix_expr %prec UNARY
+		  { $$ = make_prefix_op ('-', $2, $1); }
+		;
+
+binary_expr	: prefix_expr POW prefix_expr
+		  { $$ = make_binary_op (POW, $1, $2, $3); }
+		| prefix_expr EPOW prefix_expr
+		  { $$ = make_binary_op (EPOW, $1, $2, $3); }
+		| prefix_expr '+' prefix_expr
+		  { $$ = make_binary_op ('+', $1, $2, $3); }
+		| prefix_expr '-' prefix_expr
+		  { $$ = make_binary_op ('-', $1, $2, $3); }
+		| prefix_expr '*' prefix_expr
+		  { $$ = make_binary_op ('*', $1, $2, $3); }
+		| prefix_expr '/' prefix_expr
+		  { $$ = make_binary_op ('/', $1, $2, $3); }
+		| prefix_expr EPLUS prefix_expr
+		  { $$ = make_binary_op ('+', $1, $2, $3); }
+		| prefix_expr EMINUS prefix_expr
+		  { $$ = make_binary_op ('-', $1, $2, $3); }
+		| prefix_expr EMUL prefix_expr
+		  { $$ = make_binary_op (EMUL, $1, $2, $3); }
+		| prefix_expr EDIV prefix_expr
+		  { $$ = make_binary_op (EDIV, $1, $2, $3); }
+		| prefix_expr LEFTDIV prefix_expr
+		  { $$ = make_binary_op (LEFTDIV, $1, $2, $3); }
+		| prefix_expr ELEFTDIV prefix_expr
+		  { $$ = make_binary_op (ELEFTDIV, $1, $2, $3); }
+		;
+
+colon_expr	: colon_expr1
+		  { $$ = finish_colon_expression ($1); }
+		;
+
+colon_expr1	: prefix_expr
+		  { $$ = new tree_colon_expression ($1); }
+		| colon_expr1 ':' prefix_expr
+		  {
+		    if (! ($$ = $1->append ($3)))
+		      ABORT_PARSE;
+		  }
+		;
+
+simple_expr	: colon_expr
+		  { $$ = $1; }
+		| simple_expr LSHIFT simple_expr
+		  { $$ = make_binary_op (LSHIFT, $1, $2, $3); }
+		| simple_expr RSHIFT simple_expr
+		  { $$ = make_binary_op (RSHIFT, $1, $2, $3); }
+		| simple_expr EXPR_LT simple_expr
+		  { $$ = make_binary_op (EXPR_LT, $1, $2, $3); }
+		| simple_expr EXPR_LE simple_expr
+		  { $$ = make_binary_op (EXPR_LE, $1, $2, $3); }
+		| simple_expr EXPR_EQ simple_expr
+		  { $$ = make_binary_op (EXPR_EQ, $1, $2, $3); }
+		| simple_expr EXPR_GE simple_expr
+		  { $$ = make_binary_op (EXPR_GE, $1, $2, $3); }
+		| simple_expr EXPR_GT simple_expr
+		  { $$ = make_binary_op (EXPR_GT, $1, $2, $3); }
+		| simple_expr EXPR_NE simple_expr
+		  { $$ = make_binary_op (EXPR_NE, $1, $2, $3); }
+		| simple_expr EXPR_AND simple_expr
+		  { $$ = make_binary_op (EXPR_AND, $1, $2, $3); }
+		| simple_expr EXPR_OR simple_expr
+		  { $$ = make_binary_op (EXPR_OR, $1, $2, $3); }
+		| simple_expr EXPR_AND_AND simple_expr
+		  { $$ = make_boolean_op (EXPR_AND_AND, $1, $2, $3); }
+		| simple_expr EXPR_OR_OR simple_expr
+		  { $$ = make_boolean_op (EXPR_OR_OR, $1, $2, $3); }
+		;
+
+// Arrange for the lexer to return CLOSE_BRACE for `]' by looking ahead
+// one token for an assignment op.
+
+assign_lhs	: simple_expr
+		  {
+		    $$ = new tree_argument_list ($1);
+		    $$->mark_as_simple_assign_lhs ();
+		  }
+		| '[' arg_list CLOSE_BRACE
+		  {
+		    $$ = $2;
+		    lexer_flags.looking_at_matrix_or_assign_lhs = false;
+		    for (std::set<std::string>::const_iterator p = lexer_flags.pending_local_variables.begin ();
+			 p != lexer_flags.pending_local_variables.end ();
+			 p++)
+		      {
+			symbol_table::force_variable (*p);
+		      }
+		    lexer_flags.pending_local_variables.clear ();
+		  }
+		;
+
+assign_expr	: assign_lhs '=' expression
+		  { $$ = make_assign_op ('=', $1, $2, $3); }
+		| assign_lhs ADD_EQ expression
+		  { $$ = make_assign_op (ADD_EQ, $1, $2, $3); }
+		| assign_lhs SUB_EQ expression
+		  { $$ = make_assign_op (SUB_EQ, $1, $2, $3); }
+		| assign_lhs MUL_EQ expression
+		  { $$ = make_assign_op (MUL_EQ, $1, $2, $3); }
+		| assign_lhs DIV_EQ expression
+		  { $$ = make_assign_op (DIV_EQ, $1, $2, $3); }
+		| assign_lhs LEFTDIV_EQ expression
+		  { $$ = make_assign_op (LEFTDIV_EQ, $1, $2, $3); }
+		| assign_lhs POW_EQ expression
+		  { $$ = make_assign_op (POW_EQ, $1, $2, $3); }
+		| assign_lhs LSHIFT_EQ expression
+		  { $$ = make_assign_op (LSHIFT_EQ, $1, $2, $3); }
+		| assign_lhs RSHIFT_EQ expression
+		  { $$ = make_assign_op (RSHIFT_EQ, $1, $2, $3); }
+		| assign_lhs EMUL_EQ expression
+		  { $$ = make_assign_op (EMUL_EQ, $1, $2, $3); }
+		| assign_lhs EDIV_EQ expression
+		  { $$ = make_assign_op (EDIV_EQ, $1, $2, $3); }
+		| assign_lhs ELEFTDIV_EQ expression
+		  { $$ = make_assign_op (ELEFTDIV_EQ, $1, $2, $3); }
+		| assign_lhs EPOW_EQ expression
+		  { $$ = make_assign_op (EPOW_EQ, $1, $2, $3); }
+		| assign_lhs AND_EQ expression
+		  { $$ = make_assign_op (AND_EQ, $1, $2, $3); }
+		| assign_lhs OR_EQ expression
+		  { $$ = make_assign_op (OR_EQ, $1, $2, $3); }
+		;
+
+expression	: simple_expr
+		  { $$ = $1; }
+		| assign_expr
+		  { $$ = $1; }
+		| anon_fcn_handle
+		  { $$ = $1; }
+		;
+
+// ================================================
+// Commands, declarations, and function definitions
+// ================================================
+
+command		: declaration
+		  { $$ = $1; }
+		| select_command
+		  { $$ = $1; }
+		| loop_command
+		  { $$ = $1; }
+		| jump_command
+		  { $$ = $1; }
+		| except_command
+		  { $$ = $1; }
+		| function
+		  { $$ = $1; }
+		| script_file
+		  { $$ = $1; }
+		| classdef
+		  { $$ = $1; }
+		;
+
+// =====================
+// Declaration statemnts
+// =====================
+
+parsing_decl_list
+		: // empty
+		  { lexer_flags.looking_at_decl_list = true; }
+
+declaration	: GLOBAL parsing_decl_list decl1
+		  {
+		    $$ = make_decl_command (GLOBAL, $1, $3);
+		    lexer_flags.looking_at_decl_list = false;
+		  }
+		| STATIC parsing_decl_list decl1
+		  {
+		    $$ = make_decl_command (STATIC, $1, $3);
+		    lexer_flags.looking_at_decl_list = false;
+		  }
+		;
+
+decl1		: decl2
+		  { $$ = new tree_decl_init_list ($1); }
+		| decl1 decl2
+		  {
+		    $1->append ($2);
+		    $$ = $1;
+		  }
+		;
+
+decl_param_init : // empty
+		{ lexer_flags.looking_at_initializer_expression = true; }
+
+decl2		: identifier
+		  { $$ = new tree_decl_elt ($1); }
+		| identifier '=' decl_param_init expression
+		  {
+		    lexer_flags.looking_at_initializer_expression = false;
+		    $$ = new tree_decl_elt ($1, $4);
+		  }
+		;
+
+// ====================
+// Selection statements
+// ====================
+
+select_command	: if_command
+		  { $$ = $1; }
+		| switch_command
+		  { $$ = $1; }
+		;
+
+// ============
+// If statement
+// ============
+
+if_command	: IF stash_comment if_cmd_list END
+		  {
+		    if (! ($$ = finish_if_command ($1, $3, $4, $2)))
+		      ABORT_PARSE;
+		  }
+		;
+
+if_cmd_list	: if_cmd_list1
+		  { $$ = $1; }
+		| if_cmd_list1 else_clause
+		  {
+		    $1->append ($2);
+		    $$ = $1;
+		  }
+		;
+
+if_cmd_list1	: expression opt_sep opt_list
+		  { $$ = start_if_command ($1, $3); }
+		| if_cmd_list1 elseif_clause
+		  {
+		    $1->append ($2);
+		    $$ = $1;
+		  }
+		;
+
+elseif_clause	: ELSEIF stash_comment opt_sep expression opt_sep opt_list
+		  { $$ = make_elseif_clause ($1, $4, $6, $2); }
+		;
+
+else_clause	: ELSE stash_comment opt_sep opt_list
+		  { $$ = new tree_if_clause ($4, $2); }
+		;
+
+// ================
+// Switch statement
+// ================
+
+switch_command	: SWITCH stash_comment expression opt_sep case_list END
+		  {
+		    if (! ($$ = finish_switch_command ($1, $3, $5, $6, $2)))
+		      ABORT_PARSE;
+		  }
+		;
+
+case_list	: // empty
+		  { $$ = new tree_switch_case_list (); }
+		| case_list1
+		  { $$ = $1; }
+		| case_list1 default_case
+		  {
+		    $1->append ($2);
+		    $$ = $1;
+		  }		
+		;
+
+case_list1	: switch_case
+		  { $$ = new tree_switch_case_list ($1); }
+		| case_list1 switch_case
+		  {
+		    $1->append ($2);
+		    $$ = $1;
+		  }
+		;
+
+switch_case	: CASE stash_comment opt_sep expression opt_sep opt_list
+		  { $$ = make_switch_case ($1, $4, $6, $2); }
+		;
+
+default_case	: OTHERWISE stash_comment opt_sep opt_list
+		  {
+		    $$ = new tree_switch_case ($4, $2);
+		  }
+		;
+
+// =======
+// Looping
+// =======
+
+loop_command	: WHILE stash_comment expression opt_sep opt_list END
+		  {
+		    if (! ($$ = make_while_command ($1, $3, $5, $6, $2)))
+		      ABORT_PARSE;
+		  }
+		| DO stash_comment opt_sep opt_list UNTIL expression
+		  {
+		    if (! ($$ = make_do_until_command ($5, $4, $6, $2)))
+		      ABORT_PARSE;
+		  }
+		| FOR stash_comment assign_lhs '=' expression opt_sep opt_list END
+		  {
+		    if (! ($$ = make_for_command ($1, $3, $5, $7, $8, $2)))
+		      ABORT_PARSE;
+		  }
+		| FOR stash_comment '(' assign_lhs '=' expression ')' opt_sep opt_list END
+		  {
+		    if (! ($$ = make_for_command ($1, $4, $6, $9, $10, $2)))
+		      ABORT_PARSE;
+		  }
+		;
+
+// =======
+// Jumping
+// =======
+
+jump_command	: BREAK
+		  {
+		    if (! ($$ = make_break_command ($1)))
+		      ABORT_PARSE;
+		  }
+		| CONTINUE
+		  {
+		    if (! ($$ = make_continue_command ($1)))
+		      ABORT_PARSE;
+		  }
+		| FUNC_RET
+		  {
+		    if (! ($$ = make_return_command ($1)))
+		      ABORT_PARSE;
+		  }
+		;
+
+// ==========
+// Exceptions
+// ==========
+
+except_command	: UNWIND stash_comment opt_sep opt_list CLEANUP
+		  stash_comment opt_sep opt_list END
+		  {
+		    if (! ($$ = make_unwind_command ($1, $4, $8, $9, $2, $6)))
+		      ABORT_PARSE;
+		  }
+		| TRY stash_comment opt_sep opt_list CATCH
+		  stash_comment opt_sep opt_list END
+		  {
+		    if (! ($$ = make_try_command ($1, $4, $8, $9, $2, $6)))
+		      ABORT_PARSE;
+		  }
+		| TRY stash_comment opt_sep opt_list END
+		  {
+		    if (! ($$ = make_try_command ($1, $4, 0, $5, $2, 0)))
+		      ABORT_PARSE;
+		  }
+		;
+
+// ===========================================
+// Some `subroutines' for function definitions
+// ===========================================
+
+push_fcn_symtab	: // empty
+		  {
+		    current_function_depth++;
+
+		    if (max_function_depth < current_function_depth)
+		      max_function_depth = current_function_depth;
+
+		    symtab_context.push (symbol_table::current_scope ());
+		    symbol_table::set_scope (symbol_table::alloc_scope ());
+
+		    if (! reading_script_file && current_function_depth == 1
+			&& ! parsing_subfunctions)
+		      primary_fcn_scope = symbol_table::current_scope ();
+
+		    if (reading_script_file && current_function_depth > 1)
+		      yyerror ("nested functions not implemented in this context");
+		  }
+		;
+
+// ===========================
+// List of function parameters
+// ===========================
+
+param_list_beg	: '('
+		  {
+		    lexer_flags.looking_at_parameter_list = true;
+
+		    if (lexer_flags.looking_at_function_handle)
+		      {
+		        symtab_context.push (symbol_table::current_scope ());
+			symbol_table::set_scope (symbol_table::alloc_scope ());
+			lexer_flags.looking_at_function_handle--;
+		      }
+		  }
+		;
+
+param_list_end	: ')'
+		  {
+		    lexer_flags.looking_at_parameter_list = false;
+		    lexer_flags.looking_for_object_index = false;
+		  }
+		;
+
+param_list	: param_list_beg param_list1 param_list_end
+		  {
+		    lexer_flags.quote_is_transpose = false;
+		    $$ = $2;
+		  }
+		| param_list_beg error
+		  {
+		    yyerror ("invalid parameter list");
+		    $$ = 0;
+		    ABORT_PARSE;
+		  }
+		;
+
+param_list1	: // empty
+		  { $$ = 0; }
+		| param_list2
+		  {
+		    $1->mark_as_formal_parameters ();
+		    if ($1->validate (tree_parameter_list::in))
+		      $$ = $1;
+		    else
+		      ABORT_PARSE;
+		  }
+		;
+
+param_list2	: decl2
+		  { $$ = new tree_parameter_list ($1); }
+		| param_list2 ',' decl2
+		  {
+		    $1->append ($3);
+		    $$ = $1;
+		  }
+		;
+
+// ===================================
+// List of function return value names
+// ===================================
+
+return_list	: '[' ']'
+		  {
+		    lexer_flags.looking_at_return_list = false;
+		    $$ = new tree_parameter_list ();
+		  }
+		| return_list1
+		  {
+		    lexer_flags.looking_at_return_list = false;
+		    if ($1->validate (tree_parameter_list::out))
+		      $$ = $1;
+		    else
+		      ABORT_PARSE;
+		  }
+		| '[' return_list1 ']'
+		  {
+		    lexer_flags.looking_at_return_list = false;
+		    if ($2->validate (tree_parameter_list::out))
+		      $$ = $2;
+		    else
+		      ABORT_PARSE;
+		  }
+		;
+
+return_list1	: identifier
+		  { $$ = new tree_parameter_list (new tree_decl_elt ($1)); }
+		| return_list1 ',' identifier
+		  {
+		    $1->append (new tree_decl_elt ($3));
+		    $$ = $1;
+		  }
+		;
+
+// ===========
+// Script file
+// ===========
+
+script_file	: SCRIPT_FILE opt_list END_OF_INPUT
+		  {
+		    tree_statement *end_of_script
+		      = make_end ("endscript", input_line_number,
+				  current_input_column);
+
+		    make_script ($2, end_of_script);
+
+		    $$ = 0;
+		  }
+		;
+
+// =============
+// Function file
+// =============
+
+function_file   : FUNCTION_FILE function_list opt_sep END_OF_INPUT
+		  { $$ = 0; }
+		;
+
+function_list   : function
+		| function_list sep function
+		;
+
+// ===================
+// Function definition
+// ===================
+
+function_beg	: push_fcn_symtab FCN stash_comment
+		  {
+		    $$ = $3;
+
+		    if (reading_classdef_file || lexer_flags.parsing_classdef) 
+		      lexer_flags.maybe_classdef_get_set_method = true; 
+		  }
+		;
+
+function	: function_beg function1
+		  {
+		    $$ = finish_function (0, $2, $1);
+		    recover_from_parsing_function ();
+		  }
+		| function_beg return_list '=' function1
+		  {
+		    $$ = finish_function ($2, $4, $1);
+		    recover_from_parsing_function ();
+		  }
+		;
+
+fcn_name	: identifier
+		  {
+		    std::string id_name = $1->name ();
+
+		    lexer_flags.parsed_function_name = true;
+		    lexer_flags.defining_func = false;
+		    lexer_flags.maybe_classdef_get_set_method = false;
+            
+		    $$ = $1;
+		  }
+		| GET '.' identifier
+		  {
+		    lexer_flags.maybe_classdef_get_set_method = false;
+		    $$ = $3;
+		  }
+		| SET '.' identifier
+		  {
+		    lexer_flags.maybe_classdef_get_set_method = false;
+		    $$ = $3;
+		  }
+		;
+
+function1	: fcn_name function2
+		  {
+		    std::string fname = $1->name ();
+
+		    delete $1;
+
+		    if (! ($$ = frob_function (fname, $2)))
+		      ABORT_PARSE;
+		  }
+		;
+
+function2	: param_list opt_sep opt_list function_end
+		  { $$ = start_function ($1, $3, $4); }
+		| opt_sep opt_list function_end
+		  { $$ = start_function (0, $2, $3); }
+		;
+
+function_end	: END
+		  {
+		    endfunction_found = true;
+		    if (end_token_ok ($1, token::function_end))
+		      $$ = make_end ("endfunction", $1->line (), $1->column ());
+		    else
+		      ABORT_PARSE;
+		  }
+		| END_OF_INPUT
+		  {
+// A lot of tests are based on the assumption that this is OK
+// 		    if (reading_script_file)
+// 		      {
+// 			yyerror ("function body open at end of script");
+// 			YYABORT;
+// 		      }
+
+		    if (endfunction_found)
+		      {
+			yyerror ("inconsistent function endings -- "
+				 "if one function is explicitly ended, "
+				 "so must all the others");
+			YYABORT;
+		      }
+
+		    if (! reading_fcn_file && ! reading_script_file)
+		      {
+			yyerror ("function body open at end of input");
+			YYABORT;
+		      }
+
+		    if (reading_classdef_file)
+		      {
+		        yyerror ("classdef body open at end of input");
+		        YYABORT;
+		      }
+
+		    $$ = make_end ("endfunction", input_line_number,
+				   current_input_column);
+		  }
+		;
+
+// ========
+// Classdef
+// ========
+
+classdef_beg	: CLASSDEF stash_comment
+		  {
+		    $$ = 0;
+		    lexer_flags.parsing_classdef = true;
+		  }
+		;
+
+classdef_end	: END
+		  {
+		    lexer_flags.parsing_classdef = false;
+
+		    if (end_token_ok ($1, token::classdef_end))
+		      $$ = make_end ("endclassdef", $1->line (), $1->column ());
+		    else
+		      ABORT_PARSE;
+		  }
+		;
+
+classdef1	: classdef_beg opt_attr_list identifier opt_superclasses
+		  { $$ = 0; }
+		;
+
+classdef	: classdef1 '\n' class_body '\n' stash_comment classdef_end
+		  { $$ = 0; }
+		;
+
+opt_attr_list	: // empty
+		  { $$ = 0; }
+		| '(' attr_list ')'
+		  { $$ = 0; }
+		;
+
+attr_list	: attr
+		  { $$ = 0; }
+		| attr_list ',' attr
+		  { $$ = 0; }
+		;
+
+attr		: identifier
+		  { $$ = 0; }
+		| identifier '=' decl_param_init expression
+		  { $$ = 0; }
+		| EXPR_NOT identifier
+		  { $$ = 0; }
+		;
+
+opt_superclasses
+		: // empty
+		  { $$ = 0; }
+		| superclasses
+		  { $$ = 0; }
+		;
+
+superclasses	: EXPR_LT identifier '.' identifier
+		  { $$ = 0; }
+		| EXPR_LT identifier
+		  { $$ = 0; }
+		| superclasses EXPR_AND identifier '.' identifier
+		  { $$ = 0; }
+		| superclasses EXPR_AND identifier
+		  { $$ = 0; }
+		;
+
+class_body	: properties_block
+		  { $$ = 0; }
+		| methods_block
+		  { $$ = 0; }
+		| events_block
+		  { $$ = 0; }
+		| class_body '\n' properties_block
+		  { $$ = 0; }
+		| class_body '\n' methods_block
+		  { $$ = 0; }
+		| class_body '\n' events_block
+		  { $$ = 0; }
+		;
+
+properties_beg	: PROPERTIES stash_comment
+		  { $$ = 0; }
+		;
+
+properties_block
+		: properties_beg opt_attr_list '\n' properties_list '\n' END
+		  { $$ = 0; }
+		;
+
+properties_list
+		: class_property
+		  { $$ = 0; }
+		| properties_list '\n' class_property
+		  { $$ = 0; }
+		;
+
+class_property	: identifier
+		  { $$ = 0; }
+		| identifier '=' decl_param_init expression ';'
+		  { $$ = 0; }
+		;
+
+methods_beg	: METHODS stash_comment
+		  { $$ = 0; }
+		;
+
+methods_block	: methods_beg opt_attr_list '\n' methods_list '\n' END
+		  { $$ = 0; }
+		;
+
+methods_list	: function
+		  { $$ = 0; }
+		| methods_list '\n' function
+		  { $$ = 0; }
+		;
+
+events_beg	: EVENTS stash_comment
+		  { $$ = 0; }
+		;
+
+events_block	: events_beg opt_attr_list '\n' events_list '\n' END
+		  { $$ = 0; }
+		;
+
+events_list	: class_event
+		  { $$ = 0; }
+		| events_list '\n' class_event
+		  { $$ = 0; }
+		;
+
+class_event	: identifier
+		  { $$ = 0; }
+		;
+ 
+// =============
+// Miscellaneous
+// =============
+
+stash_comment	: // empty
+		  { $$ = octave_comment_buffer::get_comment (); }
+		;
+
+parse_error	: LEXICAL_ERROR
+		  { yyerror ("parse error"); }
+		| error
+		;
+
+sep_no_nl	: ','
+		  { $$ = ','; }
+		| ';'
+		  { $$ = ';'; }
+		| sep_no_nl ','
+		  { $$ = $1; }
+		| sep_no_nl ';'
+		  { $$ = $1; }
+		;
+
+opt_sep_no_nl	: // empty
+		  { $$ = 0; }
+		| sep_no_nl
+		  { $$ = $1; }
+		;
+
+sep		: ','
+		  { $$ = ','; }
+		| ';'
+		  { $$ = ';'; }
+		| '\n'
+		  { $$ = '\n'; }
+		| sep ','
+		  { $$ = $1; }
+		| sep ';'
+		  { $$ = $1; }
+		| sep '\n'
+		  { $$ = $1; }
+		;
+
+opt_sep		: // empty
+		  { $$ = 0; }
+		| sep
+		  { $$ = $1; }
+		;
+
+%%
+
+// Generic error messages.
+
+static void
+yyerror (const char *s)
+{
+  int err_col = current_input_column - 1;
+
+  std::ostringstream output_buf;
+
+  if (reading_fcn_file || reading_script_file || reading_classdef_file)
+    output_buf << "parse error near line " << input_line_number
+	       << " of file " << curr_fcn_file_full_name;
+  else
+    output_buf << "parse error:";
+
+  if (s && strcmp (s, "parse error") != 0)
+    output_buf << "\n\n  " << s;
+
+  output_buf << "\n\n";
+
+  if (! current_input_line.empty ())
+    {
+      size_t len = current_input_line.length ();
+
+      if (current_input_line[len-1] == '\n')
+        current_input_line.resize (len-1);
+
+      // Print the line, maybe with a pointer near the error token.
+
+      output_buf << ">>> " << current_input_line << "\n";
+
+      if (err_col == 0)
+	err_col = len;
+
+      for (int i = 0; i < err_col + 3; i++)
+	output_buf << " ";
+
+      output_buf << "^";
+    }
+
+  output_buf << "\n";
+
+  std::string msg = output_buf.str ();
+
+  parse_error ("%s", msg.c_str ());
+}
+
+// Error mesages for mismatched end tokens.
+
+static void
+end_error (const char *type, token::end_tok_type ettype, int l, int c)
+{
+  static const char *fmt
+    = "`%s' command matched by `%s' near line %d column %d";
+
+  switch (ettype)
+    {
+    case token::simple_end:
+      error (fmt, type, "end", l, c);
+      break;
+
+    case token::for_end:
+      error (fmt, type, "endfor", l, c);
+      break;
+
+    case token::function_end:
+      error (fmt, type, "endfunction", l, c);
+      break;
+
+    case token::classdef_end:
+      error (fmt, type, "endclassdef", l, c);
+      break;
+
+    case token::if_end:
+      error (fmt, type, "endif", l, c);
+      break;
+
+    case token::switch_end:
+      error (fmt, type, "endswitch", l, c); 
+      break;
+
+    case token::while_end:
+      error (fmt, type, "endwhile", l, c); 
+      break;
+
+    case token::try_catch_end:
+      error (fmt, type, "end_try_catch", l, c); 
+      break;
+
+    case token::unwind_protect_end:
+      error (fmt, type, "end_unwind_protect", l, c); 
+      break;
+
+    default:
+      panic_impossible ();
+      break;
+    }
+}
+
+// Check to see that end tokens are properly matched.
+
+static bool
+end_token_ok (token *tok, token::end_tok_type expected)
+{
+  bool retval = true;
+
+  token::end_tok_type ettype = tok->ettype ();
+
+  if (ettype != expected && ettype != token::simple_end)
+    {
+      retval = false;
+
+      yyerror ("parse error");
+
+      int l = tok->line ();
+      int c = tok->column ();
+
+      switch (expected)
+	{
+	case token::classdef_end:
+	  end_error ("classdef", ettype, l, c);
+	  break;
+
+	case token::for_end:
+	  end_error ("for", ettype, l, c);
+	  break;
+
+	case token::function_end:
+	  end_error ("function", ettype, l, c);
+	  break;
+
+	case token::if_end:
+	  end_error ("if", ettype, l, c);
+	  break;
+
+	case token::try_catch_end:
+	  end_error ("try", ettype, l, c);
+	  break;
+
+	case token::switch_end:
+	  end_error ("switch", ettype, l, c);
+	  break;
+
+	case token::unwind_protect_end:
+	  end_error ("unwind_protect", ettype, l, c);
+	  break;
+
+	case token::while_end:
+	  end_error ("while", ettype, l, c);
+	  break;
+
+	default:
+	  panic_impossible ();
+	  break;
+	}
+    }
+
+  return retval;
+}
+
+// Maybe print a warning if an assignment expression is used as the
+// test in a logical expression.
+
+static void
+maybe_warn_assign_as_truth_value (tree_expression *expr)
+{
+  if (expr->is_assignment_expression ()
+      && expr->paren_count () < 2)
+    {
+      if (curr_fcn_file_full_name.empty ())
+	warning_with_id
+	  ("Octave:assign-as-truth-value",
+	   "suggest parenthesis around assignment used as truth value");
+      else
+	warning_with_id
+	  ("Octave:assign-as-truth-value",
+	   "suggest parenthesis around assignment used as truth value near line %d, column %d in file `%s'",
+	   expr->line (), expr->column (), curr_fcn_file_full_name.c_str ());
+    }
+}
+
+// Maybe print a warning about switch labels that aren't constants.
+
+static void
+maybe_warn_variable_switch_label (tree_expression *expr)
+{
+  if (! expr->is_constant ())
+    {
+      if (curr_fcn_file_full_name.empty ())
+	warning_with_id ("Octave:variable-switch-label",
+			 "variable switch label");
+      else
+	warning_with_id
+	  ("Octave:variable-switch-label",
+	   "variable switch label near line %d, column %d in file `%s'",
+	   expr->line (), expr->column (), curr_fcn_file_full_name.c_str ());
+    }
+}
+
+static tree_expression *
+fold (tree_binary_expression *e)
+{
+  tree_expression *retval = e;
+
+  unwind_protect::frame_id_t uwp_frame = unwind_protect::begin_frame ();
+
+  unwind_protect::protect_var (error_state);
+  unwind_protect::protect_var (warning_state);
+
+  unwind_protect::protect_var (discard_error_messages);
+  unwind_protect::protect_var (discard_warning_messages);
+
+  discard_error_messages = true;
+  discard_warning_messages = true;
+
+  tree_expression *op1 = e->lhs ();
+  tree_expression *op2 = e->rhs ();
+
+  octave_value::binary_op op_type = e->op_type ();
+
+  if (op1->is_constant () && op2->is_constant ()
+      && (! ((warning_enabled ("Octave:associativity-change")
+	      && (op_type == POW || op_type == EPOW))
+	     || (warning_enabled ("Octave:precedence-change")
+		 && (op_type == EXPR_OR || op_type == EXPR_OR_OR)))))
+    {
+      octave_value tmp = e->rvalue1 ();
+
+      if (! (error_state || warning_state))
+	{
+	  tree_constant *tc_retval
+	    = new tree_constant (tmp, op1->line (), op1->column ());
+
+	  std::ostringstream buf;
+
+	  tree_print_code tpc (buf);
+
+	  e->accept (tpc);
+
+	  tc_retval->stash_original_text (buf.str ());
+
+	  delete e;
+
+	  retval = tc_retval;
+	}
+    }
+
+  unwind_protect::run_frame (uwp_frame);
+
+  return retval;
+}
+
+static tree_expression *
+fold (tree_unary_expression *e)
+{
+  tree_expression *retval = e;
+
+  unwind_protect::frame_id_t uwp_frame = unwind_protect::begin_frame ();
+
+  unwind_protect::protect_var (error_state);
+  unwind_protect::protect_var (warning_state);
+
+  unwind_protect::protect_var (discard_error_messages);
+  unwind_protect::protect_var (discard_warning_messages);
+
+  discard_error_messages = true;
+  discard_warning_messages = true;
+
+  tree_expression *op = e->operand ();
+
+  if (op->is_constant ())
+    {
+      octave_value tmp = e->rvalue1 ();
+
+      if (! (error_state || warning_state))
+	{
+	  tree_constant *tc_retval
+	    = new tree_constant (tmp, op->line (), op->column ());
+
+	  std::ostringstream buf;
+
+	  tree_print_code tpc (buf);
+
+	  e->accept (tpc);
+
+	  tc_retval->stash_original_text (buf.str ());
+
+	  delete e;
+
+	  retval = tc_retval;
+	}
+    }
+
+  unwind_protect::run_frame (uwp_frame);
+
+  return retval;
+}
+
+// Finish building a range.
+
+static tree_expression *
+finish_colon_expression (tree_colon_expression *e)
+{
+  tree_expression *retval = e;
+
+  unwind_protect::frame_id_t uwp_frame = unwind_protect::begin_frame ();
+
+  unwind_protect::protect_var (error_state);
+  unwind_protect::protect_var (warning_state);
+
+  unwind_protect::protect_var (discard_error_messages);
+  unwind_protect::protect_var (discard_warning_messages);
+
+  discard_error_messages = true;
+  discard_warning_messages = true;
+
+  tree_expression *base = e->base ();
+  tree_expression *limit = e->limit ();
+  tree_expression *incr = e->increment ();
+
+  if (base)
+    {
+      if (limit)
+	{
+	  if (base->is_constant () && limit->is_constant ()
+	      && (! incr || (incr && incr->is_constant ())))
+	    {
+	      octave_value tmp = e->rvalue1 ();
+
+	      if (! (error_state || warning_state))
+		{
+		  tree_constant *tc_retval
+		    = new tree_constant (tmp, base->line (), base->column ());
+
+		  std::ostringstream buf;
+
+		  tree_print_code tpc (buf);
+
+		  e->accept (tpc);
+
+		  tc_retval->stash_original_text (buf.str ());
+
+		  delete e;
+
+		  retval = tc_retval;
+		}
+	    }
+	}
+      else
+	{
+	  e->preserve_base ();
+	  delete e;
+
+	  // FIXME -- need to attempt constant folding here
+	  // too (we need a generic way to do that).
+	  retval = base;
+	}
+    }
+
+  unwind_protect::run_frame (uwp_frame);
+
+  return retval;
+}
+
+// Make a constant.
+
+static tree_constant *
+make_constant (int op, token *tok_val)
+{
+  int l = tok_val->line ();
+  int c = tok_val->column ();
+
+  tree_constant *retval = 0;
+
+  switch (op)
+    {
+    case NUM:
+      {
+	octave_value tmp (tok_val->number ());
+	retval = new tree_constant (tmp, l, c);
+	retval->stash_original_text (tok_val->text_rep ());
+      }
+      break;
+
+    case IMAG_NUM:
+      {
+	octave_value tmp (Complex (0.0, tok_val->number ()));
+	retval = new tree_constant (tmp, l, c);
+	retval->stash_original_text (tok_val->text_rep ());
+      }
+      break;
+
+    case DQ_STRING:
+    case SQ_STRING:
+      {
+	std::string txt = tok_val->text ();
+
+        char delim = op == DQ_STRING ? '"' : '\'';
+        octave_value tmp (txt, delim);
+
+        if (txt.empty ())
+          {
+            if (op == DQ_STRING)
+              tmp = octave_null_str::instance;
+            else
+              tmp = octave_null_sq_str::instance;
+          }
+
+	retval = new tree_constant (tmp, l, c);
+
+	if (op == DQ_STRING)
+	  txt = undo_string_escapes (txt);
+
+	// FIXME -- maybe this should also be handled by
+	// tok_val->text_rep () for character strings?
+	retval->stash_original_text (delim + txt + delim);
+      }
+      break;
+
+    default:
+      panic_impossible ();
+      break;
+    }
+
+  return retval;
+}
+
+// Make a function handle.
+
+static tree_fcn_handle *
+make_fcn_handle (token *tok_val)
+{
+  int l = tok_val->line ();
+  int c = tok_val->column ();
+
+  tree_fcn_handle *retval = new tree_fcn_handle (tok_val->text (), l, c);
+
+  return retval;
+}
+
+// Make an anonymous function handle.
+
+static tree_anon_fcn_handle *
+make_anon_fcn_handle (tree_parameter_list *param_list, tree_statement *stmt)
+{
+  // FIXME -- need to get these from the location of the @ symbol.
+
+  int l = -1;
+  int c = -1;
+
+  tree_parameter_list *ret_list = 0;
+
+  symbol_table::scope_id fcn_scope = symbol_table::current_scope ();
+
+  if (symtab_context.empty ())
+    panic_impossible ();
+
+  symbol_table::set_scope (symtab_context.top ());
+
+  symtab_context.pop ();
+
+  stmt->set_print_flag (false);
+
+  tree_statement_list *body = new tree_statement_list (stmt);
+
+  body->mark_as_anon_function_body ();
+
+  tree_anon_fcn_handle *retval
+    = new tree_anon_fcn_handle (param_list, ret_list, body, fcn_scope, l, c);
+
+  return retval;
+}
+
+static void
+maybe_warn_associativity_change (tree_expression *op)
+{
+  if (op->paren_count () == 0 && op->is_binary_expression ())
+    {
+      tree_binary_expression *e
+	= dynamic_cast<tree_binary_expression *> (op);
+
+      octave_value::binary_op op_type = e->op_type ();
+
+      if (op_type == octave_value::op_pow
+	  || op_type == octave_value::op_el_pow)
+	{
+	  std::string op_str = octave_value::binary_op_as_string (op_type);
+
+	  if (curr_fcn_file_full_name.empty ())
+	    warning_with_id
+	      ("Octave:associativity-change",
+	       "meaning may have changed due to change in associativity for %s operator",
+	       op_str.c_str ());
+	  else
+	    warning_with_id
+	      ("Octave:associativity-change",
+	       "meaning may have changed due to change in associativity for %s operator near line %d, column %d in file `%s'",
+	       op_str.c_str (), op->line (), op->column (),
+	       curr_fcn_file_full_name.c_str ());
+	}
+    }
+}
+
+// Build a binary expression.
+
+static tree_expression *
+make_binary_op (int op, tree_expression *op1, token *tok_val,
+		tree_expression *op2)
+{
+  octave_value::binary_op t = octave_value::unknown_binary_op;
+
+  switch (op)
+    {
+    case POW:
+      t = octave_value::op_pow;
+      maybe_warn_associativity_change (op1);
+      break;
+
+    case EPOW:
+      t = octave_value::op_el_pow;
+      maybe_warn_associativity_change (op1);
+      break;
+
+    case '+':
+      t = octave_value::op_add;
+      break;
+
+    case '-':
+      t = octave_value::op_sub;
+      break;
+
+    case '*':
+      t = octave_value::op_mul;
+      break;
+
+    case '/':
+      t = octave_value::op_div;
+      break;
+
+    case EMUL:
+      t = octave_value::op_el_mul;
+      break;
+
+    case EDIV:
+      t = octave_value::op_el_div;
+      break;
+
+    case LEFTDIV:
+      t = octave_value::op_ldiv;
+      break;
+
+    case ELEFTDIV:
+      t = octave_value::op_el_ldiv;
+      break;
+
+    case LSHIFT:
+      t = octave_value::op_lshift;
+      break;
+
+    case RSHIFT:
+      t = octave_value::op_rshift;
+      break;
+
+    case EXPR_LT:
+      t = octave_value::op_lt;
+      break;
+
+    case EXPR_LE:
+      t = octave_value::op_le;
+      break;
+
+    case EXPR_EQ:
+      t = octave_value::op_eq;
+      break;
+
+    case EXPR_GE:
+      t = octave_value::op_ge;
+      break;
+
+    case EXPR_GT:
+      t = octave_value::op_gt;
+      break;
+
+    case EXPR_NE:
+      t = octave_value::op_ne;
+      break;
+
+    case EXPR_AND:
+      t = octave_value::op_el_and;
+      break;
+
+    case EXPR_OR:
+      t = octave_value::op_el_or;
+      if (op2->paren_count () == 0 && op2->is_binary_expression ())
+        {
+	  tree_binary_expression *e
+	    = dynamic_cast<tree_binary_expression *> (op2);
+
+	  if (e->op_type () == octave_value::op_el_and)
+	    {
+	      if (curr_fcn_file_full_name.empty ())
+		warning_with_id
+		  ("Octave:precedence-change",
+		   "meaning may have changed due to change in precedence for & and | operators");
+	      else
+		warning_with_id
+		  ("Octave:precedence-change",
+		   "meaning may have changed due to change in precedence for & and | operators near line %d, column %d in file `%s'",
+		   op2->line (), op2->column (),
+		   curr_fcn_file_full_name.c_str ());
+	    }
+        }
+      break;
+
+    default:
+      panic_impossible ();
+      break;
+    }
+
+  int l = tok_val->line ();
+  int c = tok_val->column ();
+
+  tree_binary_expression *e
+    = maybe_compound_binary_expression (op1, op2, l, c, t);
+
+  return fold (e);
+}
+
+// Build a boolean expression.
+
+static tree_expression *
+make_boolean_op (int op, tree_expression *op1, token *tok_val,
+		 tree_expression *op2)
+{
+  tree_boolean_expression::type t;
+
+  switch (op)
+    {
+    case EXPR_AND_AND:
+      t = tree_boolean_expression::bool_and;
+      break;
+
+    case EXPR_OR_OR:
+      t = tree_boolean_expression::bool_or;
+      if (op2->paren_count () == 0 && op2->is_boolean_expression ())
+        {
+	  tree_boolean_expression *e
+	    = dynamic_cast<tree_boolean_expression *> (op2);
+
+	  if (e->op_type () == tree_boolean_expression::bool_and)
+	    warning_with_id
+	      ("Octave:precedence-change",
+	       "meaning may have changed due to change in precedence for && and || operators");
+        }
+      break;
+
+    default:
+      panic_impossible ();
+      break;
+    }
+
+  int l = tok_val->line ();
+  int c = tok_val->column ();
+
+  tree_boolean_expression *e
+    = new tree_boolean_expression (op1, op2, l, c, t);
+
+  return fold (e);
+}
+
+// Build a prefix expression.
+
+static tree_expression *
+make_prefix_op (int op, tree_expression *op1, token *tok_val)
+{
+  octave_value::unary_op t = octave_value::unknown_unary_op;
+
+  switch (op)
+    {
+    case EXPR_NOT:
+      t = octave_value::op_not;
+      break;
+
+    case '+':
+      t = octave_value::op_uplus;
+      break;
+
+    case '-':
+      t = octave_value::op_uminus;
+      break;
+
+    case PLUS_PLUS:
+      t = octave_value::op_incr;
+      break;
+
+    case MINUS_MINUS:
+      t = octave_value::op_decr;
+      break;
+
+    default:
+      panic_impossible ();
+      break;
+    }
+
+  int l = tok_val->line ();
+  int c = tok_val->column ();
+
+  tree_prefix_expression *e
+    = new tree_prefix_expression (op1, l, c, t);
+
+  return fold (e);
+}
+
+// Build a postfix expression.
+
+static tree_expression *
+make_postfix_op (int op, tree_expression *op1, token *tok_val)
+{
+  octave_value::unary_op t = octave_value::unknown_unary_op;
+
+  switch (op)
+    {
+    case QUOTE:
+      t = octave_value::op_hermitian;
+      break;
+
+    case TRANSPOSE:
+      t = octave_value::op_transpose;
+      break;
+
+    case PLUS_PLUS:
+      t = octave_value::op_incr;
+      break;
+
+    case MINUS_MINUS:
+      t = octave_value::op_decr;
+      break;
+
+    default:
+      panic_impossible ();
+      break;
+    }
+
+  int l = tok_val->line ();
+  int c = tok_val->column ();
+
+  tree_postfix_expression *e
+    = new tree_postfix_expression (op1, l, c, t);
+
+  return fold (e);
+}
+
+// Build an unwind-protect command.
+
+static tree_command *
+make_unwind_command (token *unwind_tok, tree_statement_list *body,
+		     tree_statement_list *cleanup, token *end_tok,
+		     octave_comment_list *lc, octave_comment_list *mc)
+{
+  tree_command *retval = 0;
+
+  if (end_token_ok (end_tok, token::unwind_protect_end))
+    {
+      octave_comment_list *tc = octave_comment_buffer::get_comment ();
+
+      int l = unwind_tok->line ();
+      int c = unwind_tok->column ();
+
+      retval = new tree_unwind_protect_command (body, cleanup,
+						lc, mc, tc, l, c);
+    }
+
+  return retval;
+}
+
+// Build a try-catch command.
+
+static tree_command *
+make_try_command (token *try_tok, tree_statement_list *body,
+		  tree_statement_list *cleanup, token *end_tok,
+		  octave_comment_list *lc, octave_comment_list *mc)
+{
+  tree_command *retval = 0;
+
+  if (end_token_ok (end_tok, token::try_catch_end))
+    {
+      octave_comment_list *tc = octave_comment_buffer::get_comment ();
+
+      int l = try_tok->line ();
+      int c = try_tok->column ();
+
+      retval = new tree_try_catch_command (body, cleanup,
+					   lc, mc, tc, l, c);
+    }
+
+  return retval;
+}
+
+// Build a while command.
+
+static tree_command *
+make_while_command (token *while_tok, tree_expression *expr,
+		    tree_statement_list *body, token *end_tok,
+		    octave_comment_list *lc)
+{
+  tree_command *retval = 0;
+
+  maybe_warn_assign_as_truth_value (expr);
+
+  if (end_token_ok (end_tok, token::while_end))
+    {
+      octave_comment_list *tc = octave_comment_buffer::get_comment ();
+
+      lexer_flags.looping--;
+
+      int l = while_tok->line ();
+      int c = while_tok->column ();
+
+      retval = new tree_while_command (expr, body, lc, tc, l, c);
+    }
+
+  return retval;
+}
+
+// Build a do-until command.
+
+static tree_command *
+make_do_until_command (token *until_tok, tree_statement_list *body,
+		       tree_expression *expr, octave_comment_list *lc)
+{
+  tree_command *retval = 0;
+
+  maybe_warn_assign_as_truth_value (expr);
+
+  octave_comment_list *tc = octave_comment_buffer::get_comment ();
+
+  lexer_flags.looping--;
+
+  int l = until_tok->line ();
+  int c = until_tok->column ();
+
+  retval = new tree_do_until_command (expr, body, lc, tc, l, c);
+
+  return retval;
+}
+
+// Build a for command.
+
+static tree_command *
+make_for_command (token *for_tok, tree_argument_list *lhs,
+		  tree_expression *expr, tree_statement_list *body,
+		  token *end_tok, octave_comment_list *lc)
+{
+  tree_command *retval = 0;
+
+  if (end_token_ok (end_tok, token::for_end))
+    {
+      octave_comment_list *tc = octave_comment_buffer::get_comment ();
+
+      lexer_flags.looping--;
+
+      int l = for_tok->line ();
+      int c = for_tok->column ();
+
+      if (lhs->length () == 1)
+	{
+	  tree_expression *tmp = lhs->remove_front ();
+
+	  retval = new tree_simple_for_command (tmp, expr, body,
+						lc, tc, l, c);
+
+	  delete lhs;
+	}
+      else
+	retval = new tree_complex_for_command (lhs, expr, body,
+					       lc, tc, l, c);
+    }
+
+  return retval;
+}
+
+// Build a break command.
+
+static tree_command *
+make_break_command (token *break_tok)
+{
+  tree_command *retval = 0;
+
+  int l = break_tok->line ();
+  int c = break_tok->column ();
+
+  // We check to see if we are evaluating a function, script, or loop
+  // so that we don't turn eval ("break;") inside a function, script,
+  // or loop into a no-op command.
+
+  if (lexer_flags.looping || current_function_depth > 0
+      || reading_script_file || tree_evaluator::in_fcn_or_script_body
+      || tree_evaluator::in_loop_command)
+    retval = new tree_break_command (l, c);
+  else
+    retval = new tree_no_op_command ("break", l, c);
+
+  return retval;
+}
+
+// Build a continue command.
+
+static tree_command *
+make_continue_command (token *continue_tok)
+{
+  tree_command *retval = 0;
+
+  int l = continue_tok->line ();
+  int c = continue_tok->column ();
+
+  // We check to see if we are evaluating a loop so that we don't turn
+  // eval ("continue;") into a no-op command inside a loop.
+
+  if (lexer_flags.looping || tree_evaluator::in_loop_command)
+    retval = new tree_continue_command (l, c);
+  else
+    retval = new tree_no_op_command ("continue", l, c);
+
+  return retval;
+}
+
+// Build a return command.
+
+static tree_command *
+make_return_command (token *return_tok)
+{
+  tree_command *retval = 0;
+
+  int l = return_tok->line ();
+  int c = return_tok->column ();
+
+  if (Vdebugging)
+    {
+      Vdebugging = false;
+
+      retval = new tree_no_op_command ("return", l, c);
+    }
+  else
+    {
+      // We check to see if we are evaluating a function or script so
+      // that we don't turn eval ("return;") inside a function, script,
+      // or loop into a no-op command.
+
+      if (current_function_depth > 0 || reading_script_file
+          || tree_evaluator::in_fcn_or_script_body)
+        retval = new tree_return_command (l, c);
+      else
+        retval = new tree_no_op_command ("return", l, c);
+    }
+
+  return retval;
+}
+
+// Start an if command.
+
+static tree_if_command_list *
+start_if_command (tree_expression *expr, tree_statement_list *list)
+{
+  maybe_warn_assign_as_truth_value (expr);
+
+  tree_if_clause *t = new tree_if_clause (expr, list);
+
+  return new tree_if_command_list (t);
+}
+
+// Finish an if command.
+
+static tree_if_command *
+finish_if_command (token *if_tok, tree_if_command_list *list,
+		   token *end_tok, octave_comment_list *lc)
+{
+  tree_if_command *retval = 0;
+
+  if (end_token_ok (end_tok, token::if_end))
+    {
+      octave_comment_list *tc = octave_comment_buffer::get_comment ();
+
+      int l = if_tok->line ();
+      int c = if_tok->column ();
+
+      if (list && ! list->empty ())
+	{
+	  tree_if_clause *elt = list->front ();
+
+	  if (elt)
+	    {
+	      elt->line (l);
+	      elt->column (c);
+	    }
+	}
+
+      retval = new tree_if_command (list, lc, tc, l, c);
+    }
+
+  return retval;
+}
+
+// Build an elseif clause.
+
+static tree_if_clause *
+make_elseif_clause (token *elseif_tok, tree_expression *expr,
+		    tree_statement_list *list, octave_comment_list *lc)
+{
+  maybe_warn_assign_as_truth_value (expr);
+
+  int l = elseif_tok->line ();
+  int c = elseif_tok->column ();
+
+  return new tree_if_clause (expr, list, lc, l, c);
+}
+
+// Finish a switch command.
+
+static tree_switch_command *
+finish_switch_command (token *switch_tok, tree_expression *expr,
+		       tree_switch_case_list *list, token *end_tok,
+		       octave_comment_list *lc)
+{
+  tree_switch_command *retval = 0;
+
+  if (end_token_ok (end_tok, token::switch_end))
+    {
+      octave_comment_list *tc = octave_comment_buffer::get_comment ();
+
+      int l = switch_tok->line ();
+      int c = switch_tok->column ();
+
+      if (list && ! list->empty ())
+	{
+	  tree_switch_case *elt = list->front ();
+
+	  if (elt)
+	    {
+	      elt->line (l);
+	      elt->column (c);
+	    }
+	}
+
+      retval = new tree_switch_command (expr, list, lc, tc, l, c);
+    }
+
+  return retval;
+}
+
+// Build a switch case.
+
+static tree_switch_case *
+make_switch_case (token *case_tok, tree_expression *expr,
+		  tree_statement_list *list, octave_comment_list *lc)
+{
+  maybe_warn_variable_switch_label (expr);
+
+  int l = case_tok->line ();
+  int c = case_tok->column ();
+
+  return new tree_switch_case (expr, list, lc, l, c);
+}
+
+// Build an assignment to a variable.
+
+static tree_expression *
+make_assign_op (int op, tree_argument_list *lhs, token *eq_tok,
+		tree_expression *rhs)
+{
+  tree_expression *retval = 0;
+
+  octave_value::assign_op t = octave_value::unknown_assign_op;
+
+  switch (op)
+    {
+    case '=':
+      t = octave_value::op_asn_eq;
+      break;
+
+    case ADD_EQ:
+      t = octave_value::op_add_eq;
+      break;
+
+    case SUB_EQ:
+      t = octave_value::op_sub_eq;
+      break;
+
+    case MUL_EQ:
+      t = octave_value::op_mul_eq;
+      break;
+
+    case DIV_EQ:
+      t = octave_value::op_div_eq;
+      break;
+
+    case LEFTDIV_EQ:
+      t = octave_value::op_ldiv_eq;
+      break;
+
+    case POW_EQ:
+      t = octave_value::op_pow_eq;
+      break;
+
+    case LSHIFT_EQ:
+      t = octave_value::op_lshift_eq;
+      break;
+
+    case RSHIFT_EQ:
+      t = octave_value::op_rshift_eq;
+      break;
+
+    case EMUL_EQ:
+      t = octave_value::op_el_mul_eq;
+      break;
+
+    case EDIV_EQ:
+      t = octave_value::op_el_div_eq;
+      break;
+
+    case ELEFTDIV_EQ:
+      t = octave_value::op_el_ldiv_eq;
+      break;
+
+    case EPOW_EQ:
+      t = octave_value::op_el_pow_eq;
+      break;
+
+    case AND_EQ:
+      t = octave_value::op_el_and_eq;
+      break;
+
+    case OR_EQ:
+      t = octave_value::op_el_or_eq;
+      break;
+
+    default:
+      panic_impossible ();
+      break;
+    }
+
+  int l = eq_tok->line ();
+  int c = eq_tok->column ();
+
+  if (lhs->is_simple_assign_lhs ())
+    {
+      tree_expression *tmp = lhs->remove_front ();
+
+      retval = new tree_simple_assignment (tmp, rhs, false, l, c, t);
+
+      delete lhs;
+    }
+  else
+    return new tree_multi_assignment (lhs, rhs, false, l, c, t);
+
+  return retval;
+}
+
+// Define a script.
+
+static void
+make_script (tree_statement_list *cmds, tree_statement *end_script)
+{
+  std::string doc_string;
+
+  if (! help_buf.empty ())
+    {
+      doc_string = help_buf.top ();
+      help_buf.pop ();
+    }
+
+  if (! cmds)
+    cmds = new tree_statement_list ();
+
+  cmds->append (end_script);
+
+  octave_user_script *script
+    = new octave_user_script (curr_fcn_file_full_name, curr_fcn_file_name,
+			      cmds, doc_string);
+
+  octave_time now;
+
+  script->stash_fcn_file_time (now);
+
+  primary_fcn_ptr = script;
+
+  // Unmark any symbols that may have been tagged as local variables
+  // while parsing (for example, by force_local_variable in lex.l).
+
+  symbol_table::unmark_forced_variables ();
+}
+
+// Begin defining a function.
+
+static octave_user_function *
+start_function (tree_parameter_list *param_list, tree_statement_list *body,
+		tree_statement *end_fcn_stmt)
+{
+  // We'll fill in the return list later.
+
+  if (! body)
+    body = new tree_statement_list ();
+
+  body->append (end_fcn_stmt);
+
+  octave_user_function *fcn
+    = new octave_user_function (symbol_table::current_scope (),
+				param_list, 0, body);
+
+  if (fcn)
+    {
+      octave_comment_list *tc = octave_comment_buffer::get_comment ();
+
+      fcn->stash_trailing_comment (tc);
+    }
+
+  return fcn;
+}
+
+static tree_statement *
+make_end (const std::string& type, int l, int c)
+{
+  return make_statement (new tree_no_op_command (type, l, c));
+}
+
+// Do most of the work for defining a function.
+
+static octave_user_function *
+frob_function (const std::string& fname, octave_user_function *fcn)
+{
+  std::string id_name = fname;
+
+  // If input is coming from a file, issue a warning if the name of
+  // the file does not match the name of the function stated in the
+  // file.  Matlab doesn't provide a diagnostic (it ignores the stated
+  // name).
+  if (! autoloading && reading_fcn_file
+      && (current_function_depth == 1
+	  && ! (parsing_subfunctions || lexer_flags.parsing_class_method)))
+  {
+    // FIXME -- should curr_fcn_file_name already be
+    // preprocessed when we get here?  It seems to only be a
+    // problem with relative file names.
+
+    std::string nm = curr_fcn_file_name;
+
+    size_t pos = nm.find_last_of (file_ops::dir_sep_chars ());
+
+    if (pos != std::string::npos)
+      nm = curr_fcn_file_name.substr (pos+1);
+
+    if (nm != id_name)
+      {
+	warning_with_id
+	  ("Octave:function-name-clash",
+	   "function name `%s' does not agree with function file name `%s'",
+	   id_name.c_str (), curr_fcn_file_full_name.c_str ());
+
+	id_name = nm;
+      }
+  }
+
+  if (reading_fcn_file || reading_classdef_file || autoloading)
+    {
+      octave_time now;
+
+      fcn->stash_fcn_file_name (curr_fcn_file_full_name);
+      fcn->stash_fcn_file_time (now);
+      fcn->mark_as_system_fcn_file ();
+
+      if (fcn_file_from_relative_lookup)
+	fcn->mark_relative ();
+
+      if (current_function_depth > 1 || parsing_subfunctions)
+        {
+	  fcn->stash_parent_fcn_name (curr_fcn_file_name);
+	  fcn->stash_parent_fcn_scope (primary_fcn_scope);
+        }
+
+      if (lexer_flags.parsing_class_method)
+	{
+	  if (current_class_name == id_name)
+	    fcn->mark_as_class_constructor ();
+	  else
+	    fcn->mark_as_class_method ();
+
+	  fcn->stash_dispatch_class (current_class_name);
+	}
+
+      std::string nm = fcn->fcn_file_name ();
+
+      file_stat fs (nm);
+
+      if (fs && fs.is_newer (now))
+        warning_with_id ("Octave:future-time-stamp",
+			 "time stamp for `%s' is in the future", nm.c_str ());
+    }
+  else if (! (input_from_tmp_history_file || input_from_startup_file)
+	   && reading_script_file
+	   && curr_fcn_file_name == id_name)
+    {
+      warning ("function `%s' defined within script file `%s'",
+	       id_name.c_str (), curr_fcn_file_full_name.c_str ());
+    }
+
+  fcn->stash_function_name (id_name);
+
+  if (! help_buf.empty () && current_function_depth == 1
+      && ! parsing_subfunctions)
+    {
+      fcn->document (help_buf.top ());
+
+      help_buf.pop ();
+    }
+
+  if (reading_fcn_file && current_function_depth == 1
+      && ! parsing_subfunctions)
+    primary_fcn_ptr = fcn;
+  
+  return fcn;
+}
+
+static tree_function_def *
+finish_function (tree_parameter_list *ret_list,
+		 octave_user_function *fcn, octave_comment_list *lc)
+{
+  tree_function_def *retval = 0;
+
+  if (ret_list)
+    ret_list->mark_as_formal_parameters ();
+
+  if (fcn)
+    {
+      std::string nm = fcn->name ();
+      std::string file = fcn->fcn_file_name ();
+
+      std::string tmp = nm;
+      if (! file.empty ())
+	tmp += ": " + file;
+
+      symbol_table::cache_name (fcn->scope (), tmp);
+
+      if (lc)
+	fcn->stash_leading_comment (lc);
+
+      fcn->define_ret_list (ret_list);
+
+      if (current_function_depth > 1 || parsing_subfunctions)
+        {
+          // FIXME -- is this flag used to determine if the function is a
+          // _subfunction_ somewhere?
+	  fcn->mark_as_nested_function ();
+
+	  symbol_table::install_subfunction (nm, octave_value (fcn),
+					     primary_fcn_scope);
+	}
+
+      if (! reading_fcn_file)
+	{
+	  // We are either reading a script file or defining a function
+	  // at the command line, so this definition creates a
+	  // tree_function object that is placed in the parse tree.
+	  // Otherwise, it is just inserted in the symbol table,
+	  // either as a subfunction (see above), or as the primary
+	  // function for the file, via primary_fcn_ptr (see also
+	  // load_fcn_from_file,, parse_fcn_file, and
+	  // symbol_table::fcn_info::fcn_info_rep::find_user_function).
+
+          retval = new tree_function_def (fcn);
+	}
+
+      // Unmark any symbols that may have been tagged as local
+      // variables while parsing (for example, by force_local_variable
+      // in lex.l).
+
+      symbol_table::unmark_forced_variables (fcn->scope ());
+    }
+
+  return retval;
+}
+
+static void
+recover_from_parsing_function (void)
+{
+  if (symtab_context.empty ())
+    panic_impossible ();
+
+  symbol_table::set_scope (symtab_context.top ());
+  symtab_context.pop ();
+
+  if (reading_fcn_file && current_function_depth == 1
+      && ! parsing_subfunctions)
+    parsing_subfunctions = true;
+
+  current_function_depth--;
+
+  lexer_flags.parsed_function_name = false;
+  lexer_flags.looking_at_return_list = false;
+  lexer_flags.looking_at_parameter_list = false;
+}
+
+// Make an index expression.
+
+static tree_index_expression *
+make_index_expression (tree_expression *expr, tree_argument_list *args,
+		       char type)
+{
+  tree_index_expression *retval = 0;
+
+  int l = expr->line ();
+  int c = expr->column ();
+
+  expr->mark_postfix_indexed ();
+
+  if (expr->is_index_expression ())
+    {
+      tree_index_expression *tmp = static_cast<tree_index_expression *> (expr);
+
+      tmp->append (args, type);
+
+      retval = tmp;
+    }
+  else
+    retval = new tree_index_expression (expr, args, l, c, type);
+
+  return retval;
+}
+
+// Make an indirect reference expression.
+
+static tree_index_expression *
+make_indirect_ref (tree_expression *expr, const std::string& elt)
+{
+  tree_index_expression *retval = 0;
+
+  int l = expr->line ();
+  int c = expr->column ();
+
+  if (expr->is_index_expression ())
+    {
+      tree_index_expression *tmp = static_cast<tree_index_expression *> (expr);
+
+      tmp->append (elt);
+
+      retval = tmp;
+    }
+  else
+    retval = new tree_index_expression (expr, elt, l, c);
+
+  lexer_flags.looking_at_indirect_ref = false;
+
+  return retval;
+}
+
+// Make an indirect reference expression with dynamic field name.
+
+static tree_index_expression *
+make_indirect_ref (tree_expression *expr, tree_expression *elt)
+{
+  tree_index_expression *retval = 0;
+
+  int l = expr->line ();
+  int c = expr->column ();
+
+  if (expr->is_index_expression ())
+    {
+      tree_index_expression *tmp = static_cast<tree_index_expression *> (expr);
+
+      tmp->append (elt);
+
+      retval = tmp;
+    }
+  else
+    retval = new tree_index_expression (expr, elt, l, c);
+
+  lexer_flags.looking_at_indirect_ref = false;
+
+  return retval;
+}
+
+// Make a declaration command.
+
+static tree_decl_command *
+make_decl_command (int tok, token *tok_val, tree_decl_init_list *lst)
+{
+  tree_decl_command *retval = 0;
+
+  int l = tok_val->line ();
+  int c = tok_val->column ();
+
+  switch (tok)
+    {
+    case GLOBAL:
+      retval = new tree_global_command (lst, l, c);
+      break;
+
+    case STATIC:
+      if (current_function_depth > 0)
+	retval = new tree_static_command (lst, l, c);
+      else
+	{
+	  if (reading_script_file)
+	    warning ("ignoring persistent declaration near line %d of file `%s'",
+		     l, curr_fcn_file_full_name.c_str ());
+	  else
+	    warning ("ignoring persistent declaration near line %d", l);
+	}
+      break;
+
+    default:
+      panic_impossible ();
+      break;
+    }
+
+  return retval;
+}
+
+// Finish building a matrix list.
+
+static tree_expression *
+finish_matrix (tree_matrix *m)
+{
+  tree_expression *retval = m;
+
+  unwind_protect::frame_id_t uwp_frame = unwind_protect::begin_frame ();
+
+  unwind_protect::protect_var (error_state);
+  unwind_protect::protect_var (warning_state);
+
+  unwind_protect::protect_var (discard_error_messages);
+  unwind_protect::protect_var (discard_warning_messages);
+
+  discard_error_messages = true;
+  discard_warning_messages = true;
+
+  if (m->all_elements_are_constant ())
+    {
+      octave_value tmp = m->rvalue1 ();
+
+      if (! (error_state || warning_state))
+	{
+	  tree_constant *tc_retval
+	    = new tree_constant (tmp, m->line (), m->column ());
+
+	  std::ostringstream buf;
+
+	  tree_print_code tpc (buf);
+
+	  m->accept (tpc);
+
+	  tc_retval->stash_original_text (buf.str ());
+
+	  delete m;
+
+	  retval = tc_retval;
+	}
+    }
+
+  unwind_protect::run_frame (uwp_frame);
+
+  return retval;
+}
+
+// Finish building a cell list.
+
+static tree_expression *
+finish_cell (tree_cell *c)
+{
+  return finish_matrix (c);
+}
+
+static void
+maybe_warn_missing_semi (tree_statement_list *t)
+{
+  if (current_function_depth > 0)
+    {
+      tree_statement *tmp = t->back();
+
+      if (tmp->is_expression ())
+	warning_with_id
+	  ("Octave:missing-semicolon",
+	   "missing semicolon near line %d, column %d in file `%s'",
+	    tmp->line (), tmp->column (), curr_fcn_file_full_name.c_str ());
+    }
+}
+
+static tree_statement_list *
+set_stmt_print_flag (tree_statement_list *list, char sep,
+		     bool warn_missing_semi)
+{
+  tree_statement *tmp = list->back ();
+
+  switch (sep)
+    {
+    case ';':
+      tmp->set_print_flag (false);
+      break;
+
+    case 0:
+    case ',':
+    case '\n':
+      tmp->set_print_flag (true);
+      if (warn_missing_semi)
+	maybe_warn_missing_semi (list);
+      break;
+
+    default:
+      warning ("unrecognized separator type!");
+      break;
+    }
+
+  // Even if a statement is null, we add it to the list then remove it
+  // here so that the print flag is applied to the correct statement.
+
+  if (tmp->is_null_statement ())
+    {
+      list->pop_back ();
+      delete tmp;
+    }
+
+  return list;
+}
+
+static tree_statement_list *
+make_statement_list (tree_statement *stmt)
+{
+  return new tree_statement_list (stmt);
+}
+
+static tree_statement_list *
+append_statement_list (tree_statement_list *list, char sep,
+		       tree_statement *stmt, bool warn_missing_semi)
+{
+  set_stmt_print_flag (list, sep, warn_missing_semi);
+
+  list->append (stmt);
+
+  return list;
+}
+
+static void
+safe_fclose (void *f)
+{
+  // FIXME -- comments at the end of an input file are
+  // discarded (otherwise, they would be appended to the next
+  // statement, possibly from the command line or another file, which
+  // can be quite confusing).
+
+  octave_comment_list *tc = octave_comment_buffer::get_comment ();
+
+  delete tc;
+
+  if (f)
+    fclose (static_cast<FILE *> (f));
+}
+
+static bool
+looks_like_copyright (const std::string& s)
+{
+  bool retval = false;
+
+  if (! s.empty ())
+    {
+      size_t offset = s.find_first_not_of (" \t");
+  
+      retval = (s.substr (offset, 9) == "Copyright");
+    }
+
+  return retval;
+}
+
+static int
+text_getc (FILE *f)
+{
+  int c = getc (f);
+
+  // Convert CRLF into just LF and single CR into LF.
+
+  if (c == '\r')
+    {
+      c = getc (f);
+
+      if (c != '\n')
+	{
+	  ungetc (c, f);
+	  c = '\n';
+	}
+    }
+
+  if (c == '\n')
+    input_line_number++;
+
+  return c;
+}
+
+class
+stdio_stream_reader : public stream_reader
+{
+public:
+  stdio_stream_reader (FILE *f_arg) : stream_reader (), f (f_arg) { }
+
+  int getc (void) { return ::text_getc (f); }
+  int ungetc (int c)
+  {
+    if (c == '\n')
+      input_line_number--;
+
+    return ::ungetc (c, f);
+  }
+  
+private:
+  FILE *f;
+};
+
+static bool
+skip_white_space (stream_reader& reader)
+{
+  int c = 0;
+
+  while ((c = reader.getc ()) != EOF)
+    {
+      switch (c)
+	{
+	case ' ':
+	case '\t':
+	  current_input_column++;
+	  break;
+
+	case '\n':
+	  current_input_column = 0;
+	  break;
+
+	default:
+	  current_input_column--;
+	  reader.ungetc (c);
+	  goto done;
+	}
+    }
+
+ done:
+
+  return (c == EOF);
+}
+
+static bool
+looking_at_classdef_keyword (FILE *ffile)
+{
+  bool status = false;
+
+  long pos = ftell (ffile);
+
+  char buf [10];
+  fgets (buf, 10, ffile);
+  size_t len = strlen (buf);
+  if (len > 8 && strncmp (buf, "classdef", 8) == 0
+      && ! (isalnum (buf[8]) || buf[8] == '_'))
+    status = true;
+
+  fseek (ffile, pos, SEEK_SET);
+
+  return status;
+ }
+
+static std::string
+gobble_leading_white_space (FILE *ffile, bool& eof)
+{
+  std::string help_txt;
+
+  eof = false;
+
+  // TRUE means we have already cached the help text.
+  bool have_help_text = false;
+
+  std::string txt;
+
+  stdio_stream_reader stdio_reader (ffile);
+
+  while (true)
+    {
+      eof = skip_white_space (stdio_reader);
+
+      if (eof)
+	break;
+
+      txt = grab_comment_block (stdio_reader, true, eof);
+
+      if (txt.empty ())
+	break;
+
+      if (! (have_help_text || looks_like_copyright (txt)))
+	{
+	  help_txt = txt;
+	  have_help_text = true;
+	}
+
+      octave_comment_buffer::append (txt);
+
+      if (eof)
+	break;
+    }
+
+  return help_txt;
+}
+
+static bool
+looking_at_function_keyword (FILE *ffile)
+{
+  bool status = false;
+
+  long pos = ftell (ffile);
+
+  char buf [10];
+  fgets (buf, 10, ffile);
+  size_t len = strlen (buf);
+  if (len > 8 && strncmp (buf, "function", 8) == 0
+      && ! (isalnum (buf[8]) || buf[8] == '_'))
+    status = true;
+
+  fseek (ffile, pos, SEEK_SET);
+
+  return status;
+}
+
+static octave_function *
+parse_fcn_file (const std::string& ff, const std::string& dispatch_type,
+		bool force_script = false, bool require_file = true,
+		const std::string& warn_for = std::string ())
+{
+  unwind_protect::frame_id_t uwp_frame = unwind_protect::begin_frame ();
+
+  octave_function *fcn_ptr = 0;
+
+  // Open function file and parse.
+
+  FILE *in_stream = command_editor::get_input_stream ();
+
+  unwind_protect::add_fcn (command_editor::set_input_stream,
+                           in_stream);
+
+  unwind_protect::protect_var (ff_instream);
+
+  unwind_protect::protect_var (input_line_number);
+  unwind_protect::protect_var (current_input_column);
+  unwind_protect::protect_var (reading_fcn_file);
+  unwind_protect::protect_var (line_editing);
+  unwind_protect::protect_var (current_class_name);
+  unwind_protect::protect_var (current_function_depth);
+  unwind_protect::protect_var (max_function_depth);
+  unwind_protect::protect_var (parsing_subfunctions);
+  unwind_protect::protect_var (endfunction_found);
+
+  input_line_number = 1;
+  current_input_column = 1;
+  reading_fcn_file = true;
+  line_editing = false;
+  current_class_name = dispatch_type;
+  current_function_depth = 0;
+  max_function_depth = 0;
+  parsing_subfunctions = false;
+  endfunction_found = false;
+
+  // The next four lines must be in this order.
+  unwind_protect::add_fcn (command_history::ignore_entries, ! Vsaving_history);
+
+  // FIXME -- we shouldn't need both the
+  // command_history object and the
+  // Vsaving_history variable...
+  command_history::ignore_entries ();
+
+  unwind_protect::protect_var (Vsaving_history);
+
+  Vsaving_history = false;
+
+  FILE *ffile = get_input_from_file (ff, 0);
+
+  unwind_protect::add (safe_fclose, ffile);
+
+  if (ffile)
+    {
+      bool eof;
+
+      std::string help_txt = gobble_leading_white_space (ffile, eof);
+
+      if (! eof)
+	{
+	  std::string file_type;
+
+	  unwind_protect::protect_var (get_input_from_eval_string);
+	  unwind_protect::protect_var (parser_end_of_input);
+	  unwind_protect::protect_var (reading_fcn_file);
+	  unwind_protect::protect_var (reading_script_file);
+	  unwind_protect::protect_var (reading_classdef_file);
+	  unwind_protect::protect_var (Vecho_executing_commands);
+
+
+	  get_input_from_eval_string = false;
+	  parser_end_of_input = false;
+
+	  if (! force_script && looking_at_function_keyword (ffile))
+	    {
+	      file_type = "function";
+
+	      Vecho_executing_commands = ECHO_OFF;
+
+	      reading_classdef_file = false;
+	      reading_fcn_file = true;
+	      reading_script_file = false;
+	    }
+	  else if (! force_script && looking_at_classdef_keyword (ffile))
+	    {
+	      file_type = "classdef";
+
+	      Vecho_executing_commands = ECHO_OFF;
+
+	      reading_classdef_file = true;
+	      reading_fcn_file = false;
+	      reading_script_file = false;
+	    }
+	  else
+	    {
+	      file_type = "script";
+
+	      Vecho_executing_commands = ECHO_OFF;
+
+	      reading_classdef_file = false;
+	      reading_fcn_file = false;
+	      reading_script_file = true;
+	    }
+
+	  YY_BUFFER_STATE old_buf = current_buffer ();
+	  YY_BUFFER_STATE new_buf = create_buffer (ffile);
+
+	  unwind_protect::add_fcn (switch_to_buffer, old_buf);
+	  unwind_protect::add_fcn (delete_buffer, new_buf);
+
+	  switch_to_buffer (new_buf);
+
+	  unwind_protect::protect_var (primary_fcn_ptr);
+	  primary_fcn_ptr = 0;
+
+	  reset_parser ();
+
+	  // Do this with an unwind-protect cleanup function so that
+	  // the forced variables will be unmarked in the event of an
+	  // interrupt. 
+	  symbol_table::scope_id scope = symbol_table::top_scope ();
+	  unwind_protect::add_fcn (symbol_table::unmark_forced_variables, scope);
+
+	  if (! help_txt.empty ())
+	    help_buf.push (help_txt);
+
+	  if (reading_script_file)
+	    prep_lexer_for_script_file ();
+	  else
+	    prep_lexer_for_function_file ();
+
+	  lexer_flags.parsing_class_method = ! dispatch_type.empty ();
+
+	  int status = yyparse ();
+
+	  fcn_ptr = primary_fcn_ptr;
+
+	  if (reading_fcn_file && endfunction_found && max_function_depth > 1)
+	    warning_with_id ("Octave:nested-functions-coerced",
+			     "nested functions are coerced into subfunctions "
+			     "in file %s", ff.c_str ());
+
+	  if (status != 0)
+	    error ("parse error while reading %s file %s",
+		   file_type.c_str(), ff.c_str ());
+	}
+    }
+  else if (require_file)
+    error ("no such file, `%s'", ff.c_str ());
+  else if (! warn_for.empty ())
+    error ("%s: unable to open file `%s'", warn_for.c_str (), ff.c_str ());    
+
+  unwind_protect::run_frame (uwp_frame);
+
+  return fcn_ptr;
+}
+
+std::string
+get_help_from_file (const std::string& nm, bool& symbol_found,
+		    std::string& file)
+{
+  std::string retval;
+
+  file = fcn_file_in_path (nm);
+
+  if (! file.empty ())
+    {
+      symbol_found = true;
+
+      FILE *fptr = fopen (file.c_str (), "r");
+
+      if (fptr)
+	{
+	  unwind_protect::add (safe_fclose, fptr);
+
+	  bool eof;
+	  retval = gobble_leading_white_space (fptr, eof);
+
+	  if (retval.empty ())
+	    {
+	      octave_function *fcn = parse_fcn_file (file, "");
+
+	      if (fcn)
+		{
+		  retval = fcn->doc_string ();
+
+		  delete fcn;
+		}
+	    }
+
+	  unwind_protect::run ();
+	}
+    }
+
+  return retval;
+}
+
+std::string
+get_help_from_file (const std::string& nm, bool& symbol_found)
+{
+  std::string file;
+  return get_help_from_file (nm, symbol_found, file);
+}
+
+std::string
+lookup_autoload (const std::string& nm)
+{
+  std::string retval;
+
+  typedef std::map<std::string, std::string>::const_iterator am_iter;
+
+  am_iter p = autoload_map.find (nm);
+
+  if (p != autoload_map.end ())
+    retval = load_path::find_file (p->second);
+
+  return retval;
+}
+
+string_vector 
+autoloaded_functions (void)
+{
+  string_vector names (autoload_map.size());
+
+  octave_idx_type i = 0;
+  typedef std::map<std::string, std::string>::const_iterator am_iter;
+  for (am_iter p = autoload_map.begin (); p != autoload_map.end (); p++)
+    names[i++] = p->first;
+
+  return names;
+}
+
+string_vector
+reverse_lookup_autoload (const std::string& nm)
+{
+  string_vector names;
+
+  typedef std::map<std::string, std::string>::const_iterator am_iter;
+  for (am_iter p = autoload_map.begin (); p != autoload_map.end (); p++)
+    if (nm == p->second)
+      names.append (p->first);
+
+  return names;
+}
+
+octave_function *
+load_fcn_from_file (const std::string& file_name, const std::string& dir_name,
+		    const std::string& dispatch_type,
+		    const std::string& fcn_name, bool autoload)
+{
+  octave_function *retval = 0;
+
+  unwind_protect::frame_id_t uwp_frame = unwind_protect::begin_frame ();
+
+  std::string nm = file_name;
+
+  size_t nm_len = nm.length ();
+
+  std::string file;
+
+  unwind_protect::protect_var (fcn_file_from_relative_lookup);
+
+  fcn_file_from_relative_lookup = false;
+
+  file = nm;
+
+  if ((nm_len > 4 && nm.substr (nm_len-4) == ".oct")
+      || (nm_len > 4 && nm.substr (nm_len-4) == ".mex")
+      || (nm_len > 2 && nm.substr (nm_len-2) == ".m"))
+    {
+      nm = octave_env::base_pathname (file);
+      nm = nm.substr (0, nm.find_last_of ('.'));
+    }
+
+  if (autoload)
+    {
+      unwind_protect::protect_var (autoloading);
+      autoloading = true;
+    }
+
+  fcn_file_from_relative_lookup = ! octave_env::absolute_pathname (file);
+
+  file = octave_env::make_absolute (file, octave_env::getcwd ());
+
+  int len = file.length ();
+
+  if (len > 4 && file.substr (len-4, len-1) == ".oct")
+    {
+      if (autoload && ! fcn_name.empty ())
+	nm = fcn_name;
+
+      retval = octave_dynamic_loader::load_oct (nm, file, fcn_file_from_relative_lookup);
+    }
+  else if (len > 4 && file.substr (len-4, len-1) == ".mex")
+    retval = octave_dynamic_loader::load_mex (nm, file, fcn_file_from_relative_lookup);
+  else if (len > 2)
+    {
+      // These are needed by yyparse.
+
+      unwind_protect::protect_var (curr_fcn_file_name);
+      unwind_protect::protect_var (curr_fcn_file_full_name);
+
+      curr_fcn_file_name = nm;
+      curr_fcn_file_full_name = file;
+
+      retval = parse_fcn_file (file, dispatch_type, autoloading);
+    }
+
+  if (retval)
+    {
+      retval->stash_dir_name (dir_name);
+
+      if (retval->is_user_function ())
+	{
+	  symbol_table::scope_id id = retval->scope ();
+
+	  symbol_table::stash_dir_name_for_subfunctions (id, dir_name);
+	}
+    }
+
+  unwind_protect::run_frame (uwp_frame);
+
+  return retval;
+}
+
+DEFUN (autoload, args, ,
+  "-*- texinfo -*-\n\
+@deftypefn {Built-in Function} {} autoload (@var{function}, @var{file})\n\
+Define @var{function} to autoload from @var{file}.\n\
+\n\
+The second argument, @var{file}, should be an absolute file name or\n\
+a file name in the same directory as the function or script from which\n\
+the autoload command was run.  @var{file} should not depend on the\n\
+Octave load path.\n\
+\n\
+Normally, calls to @code{autoload} appear in PKG_ADD script files that\n\
+are evaluated when a directory is added to the Octave's load path.  To\n\
+avoid having to hardcode directory names in @var{file}, if @var{file}\n\
+is in the same directory as the PKG_ADD script then\n\
+\n\
+@example\n\
+autoload (\"foo\", \"bar.oct\");\n\
+@end example\n\
+\n\
+will load the function @code{foo} from the file @code{bar.oct}.  The above\n\
+when @code{bar.oct} is not in the same directory or uses like\n\
+\n\
+@example\n\
+autoload (\"foo\", file_in_loadpath (\"bar.oct\"))\n\
+@end example\n\
+\n\
+@noindent\n\
+are strongly discouraged, as their behavior might be unpredictable.\n\
+\n\
+With no arguments, return a structure containing the current autoload map.\n\
+@seealso{PKG_ADD}\n\
+@end deftypefn")
+{
+  octave_value retval;
+
+  int nargin = args.length ();
+
+  if (nargin == 0)
+    {
+      Cell func_names (dim_vector (autoload_map.size ()), 1);
+      Cell file_names (dim_vector (autoload_map.size ()), 1);
+
+      octave_idx_type i = 0;
+      typedef std::map<std::string, std::string>::const_iterator am_iter;
+      for (am_iter p = autoload_map.begin (); p != autoload_map.end (); p++)
+	{
+	  func_names(i) = p->first;
+	  file_names(i) = p->second;
+
+	  i++;
+	}
+
+      Octave_map m;
+
+      m.assign ("function", func_names);
+      m.assign ("file", file_names);
+
+      retval = m;
+    }
+  else if (nargin == 2)
+    {
+      string_vector argv = args.make_argv ("autoload");
+
+      if (! error_state)
+        {
+	  std::string nm = argv[2];
+
+	  if (! octave_env::absolute_pathname (nm))
+	    {
+	      octave_user_code *fcn = octave_call_stack::caller_user_code ();
+
+	      bool found = false;
+
+	      if (fcn)
+		{
+		  std::string fname = fcn->fcn_file_name ();
+
+		  if (! fname.empty ())
+		    {
+		      fname = octave_env::make_absolute (fname, octave_env::getcwd ());
+		      fname = fname.substr (0, fname.find_last_of (file_ops::dir_sep_str ()) + 1);
+
+		      file_stat fs (fname + nm);
+
+		      if (fs.exists ())
+			{
+			  nm = fname + nm;
+			  found = true;
+			}
+		    }
+		}
+	      if (! found)
+		warning_with_id ("Octave:autoload-relative-file-name",
+				 "autoload: `%s' is not an absolute file name",
+				 nm.c_str ());
+	    }
+	  autoload_map[argv[1]] = nm;
+	}
+    }
+  else
+    print_usage ();
+
+  return retval;
+}
+
+void
+source_file (const std::string& file_name, const std::string& context,
+	     bool verbose, bool require_file, const std::string& warn_for)
+{
+  std::string file_full_name = file_ops::tilde_expand (file_name);
+
+  unwind_protect::frame_id_t uwp_frame = unwind_protect::begin_frame ();
+
+  unwind_protect::protect_var (curr_fcn_file_name);
+  unwind_protect::protect_var (curr_fcn_file_full_name);
+
+  curr_fcn_file_name = file_name;
+  curr_fcn_file_full_name = file_full_name;
+
+  if (! context.empty ())
+    {
+      if (context == "caller")
+	octave_call_stack::goto_caller_frame ();
+      else if (context == "base")
+	octave_call_stack::goto_base_frame ();
+      else
+	error ("source: context must be \"caller\" or \"base\"");
+
+      if (! error_state)
+	unwind_protect::add_fcn (octave_call_stack::pop);
+    }      
+
+  if (! error_state)
+    {
+      octave_function *fcn = parse_fcn_file (file_full_name, "", true,
+					     require_file, warn_for);
+
+      if (! error_state)
+	{
+	  if (fcn && fcn->is_user_script ())
+	    {
+	      octave_value_list args;
+
+	      if (verbose)
+		{
+		  std::cout << "executing commands from " << file_full_name << " ... ";
+		  reading_startup_message_printed = true;
+		  std::cout.flush ();
+		}
+
+	      fcn->do_multi_index_op (0, args);
+
+	      if (verbose)
+		std::cout << "done." << std::endl;
+
+	      delete fcn;
+	    }
+	}
+      else
+	error ("source: error sourcing file `%s'",
+	       file_full_name.c_str ());
+    }
+
+  unwind_protect::run_frame (uwp_frame);
+}
+
+DEFUN (mfilename, args, ,
+  "-*- texinfo -*-\n\
+@deftypefn {Built-in Function} {} mfilename ()\n\
+@deftypefnx {Built-in Function} {} mfilename (@code{\"fullpath\"})\n\
+@deftypefnx {Built-in Function} {} mfilename (@code{\"fullpathext\"})\n\
+Return the name of the currently executing file.  At the top-level,\n\
+return the empty string.  Given the argument @code{\"fullpath\"},\n\
+include the directory part of the file name, but not the extension.\n\
+Given the argument @code{\"fullpathext\"}, include the directory part\n\
+of the file name and the extension.\n\
+@end deftypefn")
+{
+  octave_value retval;
+
+  int nargin = args.length ();
+
+  if (nargin > 1)
+    {
+      print_usage ();
+      return retval;
+    }
+
+  std::string arg;
+
+  if (nargin == 1)
+    {
+      arg = args(0).string_value ();
+
+      if (error_state)
+	{
+	  error ("mfilename: expecting argument to be a character string");
+	  return retval;
+	}
+    }
+
+  std::string fname;
+
+  octave_user_code *fcn = octave_call_stack::caller_user_code ();
+
+  if (fcn)
+    {
+      fname = fcn->fcn_file_name ();
+
+      if (fname.empty ())
+        fname = fcn->name ();
+    }
+
+  if (arg == "fullpathext")
+    retval = fname;
+  else
+    {
+      size_t dpos = fname.rfind (file_ops::dir_sep_char ());
+      size_t epos = fname.rfind ('.');
+
+      if (epos <= dpos)
+        epos = std::string::npos;
+
+      fname = (epos != std::string::npos) ? fname.substr (0, epos) : fname;
+
+      if (arg == "fullpath")
+	retval = fname;
+      else
+        retval = (dpos != std::string::npos) ? fname.substr (dpos+1) : fname;
+    }
+
+  return retval;
+}
+
+
+DEFUN (source, args, ,
+  "-*- texinfo -*-\n\
+@deftypefn {Built-in Function} {} source (@var{file})\n\
+Parse and execute the contents of @var{file}.  This is equivalent to\n\
+executing commands from a script file, but without requiring the file to\n\
+be named @file{@var{file}.m}.\n\
+@end deftypefn")
+{
+  octave_value_list retval;
+
+  int nargin = args.length ();
+
+  if (nargin == 1 || nargin == 2)
+    {
+      std::string file_name = args(0).string_value ();
+
+      if (! error_state)
+	{
+	  std::string context;
+
+	  if (nargin == 2)
+	    context = args(1).string_value ();
+
+	  if (! error_state)
+	    source_file (file_name, context);
+	  else
+	    error ("source: expecting context to be character string");
+	}
+      else
+	error ("source: expecting file name as argument");
+    }
+  else
+    print_usage ();
+
+  return retval;
+}
+
+// Evaluate an Octave function (built-in or interpreted) and return
+// the list of result values.  NAME is the name of the function to
+// call.  ARGS are the arguments to the function.  NARGOUT is the
+// number of output arguments expected. 
+
+octave_value_list
+feval (const std::string& name, const octave_value_list& args, int nargout)
+{
+  octave_value_list retval;
+
+  octave_value fcn = symbol_table::find_function (name, args);
+
+  if (fcn.is_defined ())
+    retval = fcn.do_multi_index_op (nargout, args);
+  else
+    error ("feval: function `%s' not found", name.c_str ());
+
+  return retval;
+}
+
+octave_value_list
+feval (octave_function *fcn, const octave_value_list& args, int nargout)
+{
+  octave_value_list retval;
+
+  if (fcn)
+    retval = fcn->do_multi_index_op (nargout, args);
+
+  return retval;
+}
+
+static octave_value_list
+get_feval_args (const octave_value_list& args)
+{
+  int tmp_nargin = args.length () - 1;
+
+  octave_value_list retval (tmp_nargin, octave_value ());
+
+  for (int i = 0; i < tmp_nargin; i++)
+    retval(i) = args(i+1);
+
+  string_vector arg_names = args.name_tags ();
+
+  if (! arg_names.empty ())
+    {
+      // tmp_nargin and arg_names.length () - 1 may differ if
+      // we are passed all_va_args.
+
+      int n = arg_names.length () - 1;
+
+      int len = n > tmp_nargin ? tmp_nargin : n;
+
+      string_vector tmp_arg_names (len);
+
+      for (int i = 0; i < len; i++)
+	tmp_arg_names(i) = arg_names(i+1);
+
+      retval.stash_name_tags (tmp_arg_names);
+    }
+
+  return retval;
+}
+
+
+// Evaluate an Octave function (built-in or interpreted) and return
+// the list of result values.  The first element of ARGS should be a
+// string containing the name of the function to call, then the rest
+// are the actual arguments to the function.  NARGOUT is the number of
+// output arguments expected.
+
+octave_value_list
+feval (const octave_value_list& args, int nargout)
+{
+  octave_value_list retval;
+
+  int nargin = args.length ();
+
+  if (nargin > 0)
+    {
+      octave_value f_arg = args(0);
+
+      if (f_arg.is_string ())
+        {
+	  std::string name = f_arg.string_value ();
+
+	  if (! error_state)
+	    {
+	      octave_value_list tmp_args = get_feval_args (args);
+
+	      retval = feval (name, tmp_args, nargout);
+	    }
+	}
+      else
+	{
+	  octave_function *fcn = f_arg.function_value ();
+
+	  if (fcn)
+	    {
+	      octave_value_list tmp_args = get_feval_args (args);
+
+	      retval = feval (fcn, tmp_args, nargout);
+	    }
+	}
+    }
+
+  return retval;
+}
+
+DEFUN (feval, args, nargout,
+  "-*- texinfo -*-\n\
+@deftypefn {Built-in Function} {} feval (@var{name}, @dots{})\n\
+Evaluate the function named @var{name}.  Any arguments after the first\n\
+are passed on to the named function.  For example,\n\
+\n\
+@example\n\
+feval (\"acos\", -1)\n\
+     @result{} 3.1416\n\
+@end example\n\
+\n\
+@noindent\n\
+calls the function @code{acos} with the argument @samp{-1}.\n\
+\n\
+The function @code{feval} is necessary in order to be able to write\n\
+functions that call user-supplied functions, because Octave does not\n\
+have a way to declare a pointer to a function (like C) or to declare a\n\
+special kind of variable that can be used to hold the name of a function\n\
+(like @code{EXTERNAL} in Fortran).  Instead, you must refer to functions\n\
+by name, and use @code{feval} to call them.\n\
+@end deftypefn")
+{
+  octave_value_list retval;
+
+  int nargin = args.length ();
+
+  if (nargin > 0)
+    retval = feval (args, nargout);
+  else
+    print_usage ();
+
+  return retval;
+}
+
+octave_value_list
+eval_string (const std::string& s, bool silent, int& parse_status, int nargout)
+{
+  octave_value_list retval;
+
+  unwind_protect::frame_id_t uwp_frame = unwind_protect::begin_frame ();
+
+  unwind_protect::protect_var (input_line_number);
+  unwind_protect::protect_var (current_input_column);
+  unwind_protect::protect_var (get_input_from_eval_string);
+  unwind_protect::protect_var (input_from_eval_string_pending);
+  unwind_protect::protect_var (parser_end_of_input);
+  unwind_protect::protect_var (line_editing);
+  unwind_protect::protect_var (current_eval_string);
+  unwind_protect::protect_var (current_function_depth);
+  unwind_protect::protect_var (max_function_depth);
+  unwind_protect::protect_var (parsing_subfunctions);
+  unwind_protect::protect_var (endfunction_found);
+
+  input_line_number = 1;
+  current_input_column = 1;
+  get_input_from_eval_string = true;
+  input_from_eval_string_pending = true;
+  parser_end_of_input = false;
+  line_editing = false;
+  current_function_depth = 0;
+  max_function_depth = 0;
+  parsing_subfunctions = false;
+  endfunction_found = false;
+
+  current_eval_string = s;
+
+  YY_BUFFER_STATE old_buf = current_buffer ();
+  YY_BUFFER_STATE new_buf = create_buffer (0);
+
+  unwind_protect::add_fcn (switch_to_buffer, old_buf);
+  unwind_protect::add_fcn (delete_buffer, new_buf);
+
+  switch_to_buffer (new_buf);
+
+  do
+    {
+      reset_parser ();
+
+      unwind_protect::protect_var (global_command);
+
+      // Do this with an unwind-protect cleanup function so that the
+      // forced variables will be unmarked in the event of an
+      // interrupt.
+      symbol_table::scope_id scope = symbol_table::top_scope ();
+      unwind_protect::add_fcn (symbol_table::unmark_forced_variables, scope);
+
+      parse_status = yyparse ();
+
+      tree_statement_list *command_list = global_command;
+
+      // Unmark forced variables.
+      unwind_protect::run ();
+
+      // Restore previous value of global_command.
+      unwind_protect::run ();
+
+      if (parse_status == 0)
+        {
+	  if (command_list)
+	    {
+	      tree_statement *stmt = 0;
+
+	      if (command_list->length () == 1
+		  && (stmt = command_list->front ())
+		  && stmt->is_expression ())
+		{
+		  tree_expression *expr = stmt->expression ();
+
+		  if (silent)
+		    expr->set_print_flag (false);
+
+		  bool do_bind_ans = false;
+
+		  if (expr->is_identifier ())
+		    {
+		      tree_identifier *id
+			= dynamic_cast<tree_identifier *> (expr);
+
+		      do_bind_ans = (! id->is_variable ());
+		    }
+		  else
+		    do_bind_ans = (! expr->is_assignment_expression ());
+
+		  retval = expr->rvalue (nargout);
+
+		  if (do_bind_ans && ! (error_state || retval.empty ()))
+		    bind_ans (retval(0), expr->print_result ());
+
+		  if (nargout == 0)
+		    retval = octave_value_list ();
+		}
+	      else if (nargout == 0)
+		command_list->accept (*current_evaluator);
+	      else
+		error ("eval: invalid use of statement list");
+
+	      delete command_list;
+
+	      command_list = 0;
+
+	      if (error_state
+		  || tree_return_command::returning
+		  || tree_break_command::breaking
+		  || tree_continue_command::continuing)
+		break;
+	    }
+	  else if (parser_end_of_input)
+	    break;
+        }
+    }
+  while (parse_status == 0);
+
+  unwind_protect::run_frame (uwp_frame);
+
+  return retval;
+}
+
+octave_value
+eval_string (const std::string& s, bool silent, int& parse_status)
+{
+  octave_value retval;
+
+  octave_value_list tmp = eval_string (s, silent, parse_status, 1);
+
+  if (! tmp.empty ())
+    retval = tmp(0);
+
+  return retval;
+}
+
+static octave_value_list
+eval_string (const octave_value& arg, bool silent, int& parse_status,
+	     int nargout)
+{
+  std::string s = arg.string_value ();
+
+  if (error_state)
+    {
+      error ("eval: expecting std::string argument");
+      return octave_value (-1);
+    }
+
+  return eval_string (s, silent, parse_status, nargout);
+}
+
+DEFUN (eval, args, nargout,
+  "-*- texinfo -*-\n\
+@deftypefn {Built-in Function} {} eval (@var{try}, @var{catch})\n\
+Parse the string @var{try} and evaluate it as if it were an Octave\n\
+program.  If that fails, evaluate the optional string @var{catch}.\n\
+The string @var{try} is evaluated in the current context,\n\
+so any results remain available after @code{eval} returns.\n\
+\n\
+The following example makes the variable @var{a} with the approximate\n\
+value 3.1416 available.\n\
+\n\
+@example\n\
+eval(\"a = acos(-1);\");\n\
+@end example\n\
+\n\
+If an error occurs during the evaluation of @var{try} the @var{catch}\n\
+string is evaluated, as the following example shows:\n\
+\n\
+@example\n\
+eval ('error (\"This is a bad example\");',\n\
+      'printf (\"This error occurred:\\n%s\\n\", lasterr ());');\n\
+     @print{} This error occurred:\n\
+        This is a bad example\n\
+@end example\n\
+@end deftypefn")
+{
+  octave_value_list retval;
+
+  int nargin = args.length ();
+
+  if (nargin > 0)
+    {
+      unwind_protect::frame_id_t uwp_frame = unwind_protect::begin_frame ();
+
+      if (nargin > 1)
+	{
+	  unwind_protect::protect_var (buffer_error_messages);
+	  buffer_error_messages++;
+	}
+
+      int parse_status = 0;
+
+      octave_value_list tmp = eval_string (args(0), nargout > 0,
+					   parse_status, nargout);
+
+      if (nargin > 1 && (parse_status != 0 || error_state))
+	{
+	  error_state = 0;
+
+	  // Set up for letting the user print any messages from
+	  // errors that occurred in the first part of this eval().
+
+	  buffer_error_messages--;
+
+	  tmp = eval_string (args(1), nargout > 0, parse_status, nargout);
+
+	  if (nargout > 0)
+	    retval = tmp;
+	}
+      else if (nargout > 0)
+	retval = tmp;
+
+      unwind_protect::run_frame (uwp_frame);
+    }
+  else
+    print_usage ();
+
+  return retval;
+}
+
+/*
+
+%% test/octave.test/eval/eval-1.m
+%!#test
+%! x = 1;
+%! assert(eval ("x"),1);
+
+%% test/octave.test/eval/eval-2.m
+%!test
+%! x = 1;
+%! assert(eval ("x;"));
+
+%% test/octave.test/eval/eval-3.m
+%!test
+%! x = 1;
+%! assert(eval ("x;"),1);
+
+%% FIXME
+%% Disable this test as adding the ";" is redundant with eval-1 and
+%% in any case is a syntax error with assert
+%% test/octave.test/eval/eval-4.m
+%!#test
+%! x = 1;
+%! assert(eval ("x");,1);
+
+%% test/octave.test/eval/eval-5.m
+%!test
+%! eval ("flipud = 2;");
+%! assert(flipud,2);
+
+%% test/octave.test/eval/eval-6.m
+%!function y = f ()
+%!  eval ("flipud = 2;");
+%!  y = flipud;
+%!test
+%! assert(f,2);
+
+%% test/octave.test/eval/eval-7.m
+%!#test
+%! eval ("x = 1");
+%! assert(x,1);
+
+%% test/octave.test/eval/eval-8.m
+%!test
+%! eval ("x = 1;")
+%! assert(x,1);
+
+%% test/octave.test/eval/eval-9.m
+%!test
+%! eval ("x = 1;");
+%! assert(x,1);
+
+%% test/octave.test/eval/eval-10.m
+%!#test
+%! eval ("x = 1")
+%! assert(x,1);
+
+%% test/octave.test/eval/eval-11.m
+%!test
+%! x = 1;
+%! y = eval ("x");
+%! assert(y,1);
+
+%% test/octave.test/eval/eval-12.m
+%!test
+%! x = 1;
+%! y = eval ("x;");
+%! assert(y,1);
+
+%% test/octave.test/eval/eval-13.m
+%!test
+%! x = 1;
+%! y = eval ("x;");
+%! assert(y,1);
+
+%% test/octave.test/eval/eval-14.m
+%!test
+%! x = 1;
+%! y = eval ("x");
+%! assert(y,1);
+
+*/
+
+DEFUN (assignin, args, ,
+  "-*- texinfo -*-\n\
+@deftypefn {Built-in Function} {} assignin (@var{context}, @var{varname}, @var{value})\n\
+Assign @var{value} to @var{varname} in context @var{context}, which\n\
+may be either @code{\"base\"} or @code{\"caller\"}.\n\
+@end deftypefn")
+{
+  octave_value_list retval;
+
+  int nargin = args.length ();
+
+  if (nargin == 3)
+    {
+      std::string context = args(0).string_value ();
+
+      if (! error_state)
+        {
+	  unwind_protect::frame_id_t uwp_frame = unwind_protect::begin_frame ();
+
+	  if (context == "caller")
+	    octave_call_stack::goto_caller_frame ();
+	  else if (context == "base")
+	    octave_call_stack::goto_base_frame ();
+	  else
+	    error ("assignin: context must be \"caller\" or \"base\"");
+
+	  if (! error_state)
+	    {
+	      unwind_protect::add_fcn (octave_call_stack::pop);
+
+	      std::string nm = args(1).string_value ();
+
+	      if (! error_state)
+		{
+		  if (valid_identifier (nm))
+		    symbol_table::varref (nm) = args(2);
+		  else
+		    error ("assignin: invalid variable name");
+		}
+	      else
+		error ("assignin: expecting variable name as second argument");
+	    }
+
+	  unwind_protect::run_frame (uwp_frame);
+	}
+      else
+        error ("assignin: expecting string as first argument");
+    }
+  else
+    print_usage ();
+
+  return retval;
+}
+
+DEFUN (evalin, args, nargout,
+  "-*- texinfo -*-\n\
+@deftypefn {Built-in Function} {} evalin (@var{context}, @var{try}, @var{catch})\n\
+Like @code{eval}, except that the expressions are evaluated in the\n\
+context @var{context}, which may be either @code{\"caller\"} or\n\
+@code{\"base\"}.\n\
+@end deftypefn")
+{
+  octave_value_list retval;
+
+  int nargin = args.length ();
+
+  if (nargin > 1)
+    {
+      std::string context = args(0).string_value ();
+
+      if (! error_state)
+        {
+	  unwind_protect::frame_id_t uwp_frame = unwind_protect::begin_frame ();
+
+	  if (context == "caller")
+	    octave_call_stack::goto_caller_frame ();
+	  else if (context == "base")
+	    octave_call_stack::goto_base_frame ();
+	  else
+	    error ("evalin: context must be \"caller\" or \"base\"");
+
+	  if (! error_state)
+	    {
+	      unwind_protect::add_fcn (octave_call_stack::pop);
+
+	      if (nargin > 2)
+	        {
+		  unwind_protect::protect_var (buffer_error_messages);
+		  buffer_error_messages++;
+		}
+
+	      int parse_status = 0;
+
+	      octave_value_list tmp = eval_string (args(1), nargout > 0,
+						   parse_status, nargout);
+
+	      if (nargout > 0)
+		retval = tmp;
+
+	      if (nargin > 2 && (parse_status != 0 || error_state))
+		{
+		  error_state = 0;
+
+		  // Set up for letting the user print any messages from
+		  // errors that occurred in the first part of this eval().
+
+		  buffer_error_messages--;
+
+		  tmp = eval_string (args(2), nargout > 0,
+				     parse_status, nargout);
+
+		  retval = (nargout > 0) ? tmp : octave_value_list ();
+		}
+	    }
+
+	  unwind_protect::run_frame (uwp_frame);
+	}
+      else
+        error ("evalin: expecting string as first argument");
+    }
+  else
+    print_usage ();
+
+  return retval;
+}
+
+DEFUN (__parser_debug_flag__, args, nargout,
+  "-*- texinfo -*-\n\
+@deftypefn {Built-in Function} {@var{old_val} =} __parser_debug_flag__ (@var{new_val}))\n\
+Undocumented internal function.\n\
+@end deftypefn")
+{
+  octave_value retval;
+
+  bool debug_flag = octave_debug;
+
+  retval = set_internal_variable (debug_flag, args, nargout,
+           			  "__parser_debug_flag__");
+
+  octave_debug = debug_flag;
+
+  return retval;
+}
+
+/*
+;;; Local Variables: ***
+;;; mode: text ***
+;;; End: ***
+*/
--- a/src/parse.y	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4620 +0,0 @@
-/*
-
-Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-              2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009  John W. Eaton
-Copyright (C) 2009 David Grundberg
-
-This file is part of Octave.
-
-Octave is free software; you can redistribute it and/or modify it
-under the terms of the GNU General Public License as published by the
-Free Software Foundation; either version 3 of the License, or (at your
-option) any later version.
-
-Octave is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License
-along with Octave; see the file COPYING.  If not, see
-<http://www.gnu.org/licenses/>.
-
-*/
-
-// Parser for Octave.
-
-// C decarations.
-
-%{
-#define YYDEBUG 1
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <cassert>
-#include <cstdio>
-
-#ifdef YYBYACC
-#include <cstdlib>
-#endif
-
-#include <iostream>
-#include <map>
-#include <sstream>
-
-#include "Cell.h"
-#include "Matrix.h"
-#include "cmd-edit.h"
-#include "cmd-hist.h"
-#include "file-ops.h"
-#include "file-stat.h"
-#include "oct-env.h"
-#include "oct-time.h"
-#include "quit.h"
-
-#include "comment-list.h"
-#include "defaults.h"
-#include "defun.h"
-#include "dirfns.h"
-#include "dynamic-ld.h"
-#include "error.h"
-#include "input.h"
-#include "lex.h"
-#include "load-path.h"
-#include "oct-hist.h"
-#include "oct-map.h"
-#include "ov-fcn-handle.h"
-#include "ov-usr-fcn.h"
-#include "ov-null-mat.h"
-#include "toplev.h"
-#include "pager.h"
-#include "parse.h"
-#include "pt-all.h"
-#include "pt-eval.h"
-#include "symtab.h"
-#include "token.h"
-#include "unwind-prot.h"
-#include "utils.h"
-#include "variables.h"
-
-// The current input line number.
-int input_line_number = 1;
-
-// The column of the current token.
-int current_input_column = 1;
-
-// Buffer for help text snagged from function files.
-std::stack<std::string> help_buf;
-
-// Buffer for comments appearing before a function statement.
-static std::string fcn_comment_header;
-
-// TRUE means we are using readline.
-// (--no-line-editing)
-bool line_editing = true;
-
-// TRUE means we printed messages about reading startup files.
-bool reading_startup_message_printed = false;
-
-// TRUE means input is coming from startup file.
-bool input_from_startup_file = false;
-
-// = 0 currently outside any function.
-// = 1 inside the primary function or a subfunction.
-// > 1 means we are looking at a function definition that seems to be
-//     inside a function. Note that the function still might not be a
-//     nested function.
-static int current_function_depth = 0;
-
-// Maximum function depth detected. Just here to determine whether
-// we have nested functions or just implicitly ended subfunctions.
-static int max_function_depth = 0;
-
-// FALSE if we are still at the primary function. Subfunctions can
-// only be declared inside function files.
-static int parsing_subfunctions = false;
-
-// Have we found an explicit end to a function?
-static bool endfunction_found = false;
-
-// Keep track of symbol table information when parsing functions.
-std::stack<symbol_table::scope_id> symtab_context;
-
-// Name of the current class when we are parsing class methods or
-// constructors.
-std::string current_class_name;
-
-// TRUE means we are in the process of autoloading a function.
-static bool autoloading = false;
-
-// TRUE means the current function file was found in a relative path
-// element.
-static bool fcn_file_from_relative_lookup = false;
-
-// Pointer to the primary user function or user script function.
-static octave_function *primary_fcn_ptr = 0;
-
-// Scope where we install all subfunctions and nested functions. Only
-// used while reading function files.
-static symbol_table::scope_id primary_fcn_scope;
-
-// List of autoloads (function -> file mapping).
-static std::map<std::string, std::string> autoload_map;
-
-// Forward declarations for some functions defined at the bottom of
-// the file.
-
-// Generic error messages.
-static void
-yyerror (const char *s);
-
-// Error mesages for mismatched end tokens.
-static void
-end_error (const char *type, token::end_tok_type ettype, int l, int c);
-
-// Check to see that end tokens are properly matched.
-static bool
-end_token_ok (token *tok, token::end_tok_type expected);
-
-// Maybe print a warning if an assignment expression is used as the
-// test in a logical expression.
-static void
-maybe_warn_assign_as_truth_value (tree_expression *expr);
-
-// Maybe print a warning about switch labels that aren't constants.
-static void
-maybe_warn_variable_switch_label (tree_expression *expr);
-
-// Finish building a range.
-static tree_expression *
-finish_colon_expression (tree_colon_expression *e);
-
-// Build a constant.
-static tree_constant *
-make_constant (int op, token *tok_val);
-
-// Build a function handle.
-static tree_fcn_handle *
-make_fcn_handle (token *tok_val);
-
-// Build an anonymous function handle.
-static tree_anon_fcn_handle *
-make_anon_fcn_handle (tree_parameter_list *param_list, tree_statement *stmt);
-
-// Build a binary expression.
-static tree_expression *
-make_binary_op (int op, tree_expression *op1, token *tok_val,
-		tree_expression *op2);
-
-// Build a boolean expression.
-static tree_expression *
-make_boolean_op (int op, tree_expression *op1, token *tok_val,
-		 tree_expression *op2);
-
-// Build a prefix expression.
-static tree_expression *
-make_prefix_op (int op, tree_expression *op1, token *tok_val);
-
-// Build a postfix expression.
-static tree_expression *
-make_postfix_op (int op, tree_expression *op1, token *tok_val);
-
-// Build an unwind-protect command.
-static tree_command *
-make_unwind_command (token *unwind_tok, tree_statement_list *body,
-		     tree_statement_list *cleanup, token *end_tok,
-		     octave_comment_list *lc, octave_comment_list *mc);
-
-// Build a try-catch command.
-static tree_command *
-make_try_command (token *try_tok, tree_statement_list *body,
-		  tree_statement_list *cleanup, token *end_tok,
-		  octave_comment_list *lc, octave_comment_list *mc);
-
-// Build a while command.
-static tree_command *
-make_while_command (token *while_tok, tree_expression *expr,
-		    tree_statement_list *body, token *end_tok,
-		    octave_comment_list *lc);
-
-// Build a do-until command.
-static tree_command *
-make_do_until_command (token *until_tok, tree_statement_list *body,
-		       tree_expression *expr, octave_comment_list *lc);
-
-// Build a for command.
-static tree_command *
-make_for_command (token *for_tok, tree_argument_list *lhs,
-		  tree_expression *expr, tree_statement_list *body,
-		  token *end_tok, octave_comment_list *lc);
-
-// Build a break command.
-static tree_command *
-make_break_command (token *break_tok);
-
-// Build a continue command.
-static tree_command *
-make_continue_command (token *continue_tok);
-
-// Build a return command.
-static tree_command *
-make_return_command (token *return_tok);
-
-// Start an if command.
-static tree_if_command_list *
-start_if_command (tree_expression *expr, tree_statement_list *list);
-
-// Finish an if command.
-static tree_if_command *
-finish_if_command (token *if_tok, tree_if_command_list *list,
-		   token *end_tok, octave_comment_list *lc);
-
-// Build an elseif clause.
-static tree_if_clause *
-make_elseif_clause (token *elseif_tok, tree_expression *expr,
-		    tree_statement_list *list, octave_comment_list *lc);
-
-// Finish a switch command.
-static tree_switch_command *
-finish_switch_command (token *switch_tok, tree_expression *expr,
-		       tree_switch_case_list *list, token *end_tok,
-		       octave_comment_list *lc);
-
-// Build a switch case.
-static tree_switch_case *
-make_switch_case (token *case_tok, tree_expression *expr,
-		  tree_statement_list *list, octave_comment_list *lc);
-
-// Build an assignment to a variable.
-static tree_expression *
-make_assign_op (int op, tree_argument_list *lhs, token *eq_tok,
-		tree_expression *rhs);
-
-// Define a script.
-static void
-make_script (tree_statement_list *cmds, tree_statement *end_script);
-
-// Begin defining a function.
-static octave_user_function *
-start_function (tree_parameter_list *param_list, tree_statement_list *body,
-		tree_statement *end_function);
-
-// Create a no-op statement for end_function.
-static tree_statement *
-make_end (const std::string& type, int l, int c);
-
-// Do most of the work for defining a function.
-static octave_user_function *
-frob_function (const std::string& fname, octave_user_function *fcn);
-
-// Finish defining a function.
-static tree_function_def *
-finish_function (tree_parameter_list *ret_list,
-		 octave_user_function *fcn, octave_comment_list *lc);
-
-// Reset state after parsing function.
-static void
-recover_from_parsing_function (void);
-
-// Make an index expression.
-static tree_index_expression *
-make_index_expression (tree_expression *expr,
-		       tree_argument_list *args, char type);
-
-// Make an indirect reference expression.
-static tree_index_expression *
-make_indirect_ref (tree_expression *expr, const std::string&);
-
-// Make an indirect reference expression with dynamic field name.
-static tree_index_expression *
-make_indirect_ref (tree_expression *expr, tree_expression *field);
-
-// Make a declaration command.
-static tree_decl_command *
-make_decl_command (int tok, token *tok_val, tree_decl_init_list *lst);
-
-// Finish building a matrix list.
-static tree_expression *
-finish_matrix (tree_matrix *m);
-
-// Finish building a cell list.
-static tree_expression *
-finish_cell (tree_cell *c);
-
-// Maybe print a warning.  Duh.
-static void
-maybe_warn_missing_semi (tree_statement_list *);
-
-// Set the print flag for a statement based on the separator type.
-static tree_statement_list *
-set_stmt_print_flag (tree_statement_list *, char, bool);
-
-// Create a statement list.
-static tree_statement_list *make_statement_list (tree_statement *stmt);
-
-// Append a statement to an existing statement list.
-static tree_statement_list *
-append_statement_list (tree_statement_list *list, char sep,
-		       tree_statement *stmt, bool warn_missing_semi);
-
-// Finish building a statement.
-template <class T>
-static tree_statement *
-make_statement (T *arg)
-{
-  octave_comment_list *comment = octave_comment_buffer::get_comment ();
-
-  return new tree_statement (arg, comment);
-}
-
-#define ABORT_PARSE \
-  do \
-    { \
-      global_command = 0; \
-      yyerrok; \
-      if (! symtab_context.empty ()) \
-        { \
-	  symbol_table::set_scope (symtab_context.top ()); \
-	  symtab_context.pop (); \
-        } \
-      if (interactive || forced_interactive) \
-	YYACCEPT; \
-      else \
-	YYABORT; \
-    } \
-  while (0)
-
-%}
-
-// Bison declarations.
-
-// Don't add spaces around the = here; it causes some versions of
-// bison to fail to properly recognize the directive.
-
-%name-prefix="octave_"
-
-%union
-{
-  // The type of the basic tokens returned by the lexer.
-  token *tok_val;
-
-  // Comment strings that we need to deal with mid-rule.
-  octave_comment_list *comment_type;
-
-  // Types for the nonterminals we generate.
-  char sep_type;
-  tree *tree_type;
-  tree_matrix *tree_matrix_type;
-  tree_cell *tree_cell_type;
-  tree_expression *tree_expression_type;
-  tree_constant *tree_constant_type;
-  tree_fcn_handle *tree_fcn_handle_type;
-  tree_anon_fcn_handle *tree_anon_fcn_handle_type;
-  tree_identifier *tree_identifier_type;
-  tree_index_expression *tree_index_expression_type;
-  tree_colon_expression *tree_colon_expression_type;
-  tree_argument_list *tree_argument_list_type;
-  tree_parameter_list *tree_parameter_list_type;
-  tree_command *tree_command_type;
-  tree_if_command *tree_if_command_type;
-  tree_if_clause *tree_if_clause_type;
-  tree_if_command_list *tree_if_command_list_type;
-  tree_switch_command *tree_switch_command_type;
-  tree_switch_case *tree_switch_case_type;
-  tree_switch_case_list *tree_switch_case_list_type;
-  tree_decl_elt *tree_decl_elt_type;
-  tree_decl_init_list *tree_decl_init_list_type;
-  tree_decl_command *tree_decl_command_type;
-  tree_statement *tree_statement_type;
-  tree_statement_list *tree_statement_list_type;
-  octave_user_function *octave_user_function_type;
-  void *dummy_type;
-}
-
-// Tokens with line and column information.
-%token <tok_val> '=' ':' '-' '+' '*' '/'
-%token <tok_val> ADD_EQ SUB_EQ MUL_EQ DIV_EQ LEFTDIV_EQ POW_EQ
-%token <tok_val> EMUL_EQ EDIV_EQ ELEFTDIV_EQ EPOW_EQ AND_EQ OR_EQ
-%token <tok_val> LSHIFT_EQ RSHIFT_EQ LSHIFT RSHIFT
-%token <tok_val> EXPR_AND_AND EXPR_OR_OR
-%token <tok_val> EXPR_AND EXPR_OR EXPR_NOT
-%token <tok_val> EXPR_LT EXPR_LE EXPR_EQ EXPR_NE EXPR_GE EXPR_GT
-%token <tok_val> LEFTDIV EMUL EDIV ELEFTDIV EPLUS EMINUS
-%token <tok_val> QUOTE TRANSPOSE
-%token <tok_val> PLUS_PLUS MINUS_MINUS POW EPOW
-%token <tok_val> NUM IMAG_NUM
-%token <tok_val> STRUCT_ELT
-%token <tok_val> NAME
-%token <tok_val> END
-%token <tok_val> DQ_STRING SQ_STRING
-%token <tok_val> FOR WHILE DO UNTIL
-%token <tok_val> IF ELSEIF ELSE
-%token <tok_val> SWITCH CASE OTHERWISE
-%token <tok_val> BREAK CONTINUE FUNC_RET
-%token <tok_val> UNWIND CLEANUP
-%token <tok_val> TRY CATCH
-%token <tok_val> GLOBAL STATIC
-%token <tok_val> FCN_HANDLE
-%token <tok_val> PROPERTIES
-%token <tok_val> METHODS
-%token <tok_val> EVENTS
-%token <tok_val> METAQUERY
-%token <tok_val> SUPERCLASSREF
-%token <tok_val> GET SET
-
-// Other tokens.
-%token END_OF_INPUT LEXICAL_ERROR
-%token FCN SCRIPT_FILE FUNCTION_FILE CLASSDEF
-// %token VARARGIN VARARGOUT
-%token CLOSE_BRACE
-
-// Nonterminals we construct.
-%type <comment_type> stash_comment function_beg classdef_beg
-%type <comment_type> properties_beg methods_beg events_beg
-%type <sep_type> sep_no_nl opt_sep_no_nl sep opt_sep
-%type <tree_type> input
-%type <tree_constant_type> string constant magic_colon
-%type <tree_anon_fcn_handle_type> anon_fcn_handle
-%type <tree_fcn_handle_type> fcn_handle
-%type <tree_matrix_type> matrix_rows matrix_rows1
-%type <tree_cell_type> cell_rows cell_rows1
-%type <tree_expression_type> matrix cell
-%type <tree_expression_type> primary_expr postfix_expr prefix_expr binary_expr
-%type <tree_expression_type> simple_expr colon_expr assign_expr expression
-%type <tree_identifier_type> identifier fcn_name
-%type <tree_identifier_type> superclass_identifier meta_identifier
-%type <octave_user_function_type> function1 function2 classdef1
-%type <tree_index_expression_type> word_list_cmd
-%type <tree_colon_expression_type> colon_expr1
-%type <tree_argument_list_type> arg_list word_list assign_lhs
-%type <tree_argument_list_type> cell_or_matrix_row
-%type <tree_parameter_list_type> param_list param_list1 param_list2
-%type <tree_parameter_list_type> return_list return_list1
-%type <tree_parameter_list_type> superclasses opt_superclasses
-%type <tree_command_type> command select_command loop_command
-%type <tree_command_type> jump_command except_command function
-%type <tree_command_type> script_file classdef
-%type <tree_command_type> function_file function_list
-%type <tree_if_command_type> if_command
-%type <tree_if_clause_type> elseif_clause else_clause
-%type <tree_if_command_list_type> if_cmd_list1 if_cmd_list
-%type <tree_switch_command_type> switch_command
-%type <tree_switch_case_type> switch_case default_case
-%type <tree_switch_case_list_type> case_list1 case_list
-%type <tree_decl_elt_type> decl2
-%type <tree_decl_init_list_type> decl1
-%type <tree_decl_command_type> declaration
-%type <tree_statement_type> statement function_end classdef_end
-%type <tree_statement_list_type> simple_list simple_list1 list list1
-%type <tree_statement_list_type> opt_list input1
-// These types need to be specified.
-%type <dummy_type> attr
-%type <dummy_type> class_event
-%type <dummy_type> class_property
-%type <dummy_type> properties_list
-%type <dummy_type> properties_block
-%type <dummy_type> methods_list
-%type <dummy_type> methods_block
-%type <dummy_type> opt_attr_list
-%type <dummy_type> attr_list
-%type <dummy_type> events_list
-%type <dummy_type> events_block
-%type <dummy_type> class_body
-
-// Precedence and associativity.
-%left ';' ',' '\n'
-%right '=' ADD_EQ SUB_EQ MUL_EQ DIV_EQ LEFTDIV_EQ POW_EQ EMUL_EQ EDIV_EQ ELEFTDIV_EQ EPOW_EQ OR_EQ AND_EQ LSHIFT_EQ RSHIFT_EQ
-%left EXPR_OR_OR
-%left EXPR_AND_AND
-%left EXPR_OR
-%left EXPR_AND
-%left EXPR_LT EXPR_LE EXPR_EQ EXPR_NE EXPR_GE EXPR_GT
-%left LSHIFT RSHIFT
-%left ':'
-%left '-' '+' EPLUS EMINUS
-%left '*' '/' LEFTDIV EMUL EDIV ELEFTDIV
-%left UNARY PLUS_PLUS MINUS_MINUS EXPR_NOT
-%left POW EPOW QUOTE TRANSPOSE
-%left '(' '.' '{'
-
-// Where to start.
-%start input
-
-%%
-
-// ==============================
-// Statements and statement lists
-// ==============================
-
-input		: input1
-		  {
-		    global_command = $1;
-		    promptflag = 1;
-		    YYACCEPT;
-		  }
-		| function_file
-		  {
-		    YYACCEPT;
-		  }
-		| simple_list parse_error
-		  { ABORT_PARSE; }
-		| parse_error
-		  { ABORT_PARSE; }
-		;
-
-input1		: '\n'
-		  { $$ = 0; }
-		| END_OF_INPUT
-		  {
-		    parser_end_of_input = 1;
-		    $$ = 0;
-		  }
-		| simple_list
-		  { $$ = $1; }
-		| simple_list '\n'
-		  { $$ = $1; }
-		| simple_list END_OF_INPUT
-		  { $$ = $1; }
-		;
-
-simple_list	: simple_list1 opt_sep_no_nl
-		  { $$ = set_stmt_print_flag ($1, $2, false); }
-		;
-
-simple_list1	: statement
-		  { $$ = make_statement_list ($1); }
-		| simple_list1 sep_no_nl statement
-		  { $$ = append_statement_list ($1, $2, $3, false); }
-		;
-
-opt_list	: // empty
-		  { $$ = new tree_statement_list (); }
-		| list
-		  { $$ = $1; }
-		;
-
-list		: list1 opt_sep
-		  { $$ = set_stmt_print_flag ($1, $2, true); }
-		;
-
-list1		: statement
-		  { $$ = make_statement_list ($1); }
-		| list1 sep statement
-		  { $$ = append_statement_list ($1, $2, $3, true); }
-		;
-
-statement	: expression
-		  { $$ = make_statement ($1); }
-		| command
-		  { $$ = make_statement ($1); }
-		| word_list_cmd
-		  { $$ = make_statement ($1); }
-		;
-
-// =================
-// Word-list command
-// =================
-
-// These are not really like expressions since they can't appear on
-// the RHS of an assignment.  But they are also not like commands (IF,
-// WHILE, etc.
-
-word_list_cmd	: identifier word_list
-		  { $$ = make_index_expression ($1, $2, '('); }
-		;
-
-word_list	: string
-		  { $$ = new tree_argument_list ($1); }
-		| word_list string
-		  {
-		    $1->append ($2);
-		    $$ = $1;
-		  }
-		;
-
-// ===========
-// Expressions
-// ===========
-
-identifier	: NAME
-		  {
-		    symbol_table::symbol_record *sr = $1->sym_rec ();
-		    $$ = new tree_identifier (*sr, $1->line (), $1->column ());
-		  }
-		;
-
-superclass_identifier
-		: SUPERCLASSREF
-		  { $$ = new tree_identifier ($1->line (), $1->column ()); }
-		;
-	    
-meta_identifier	: METAQUERY
-		  { $$ = new tree_identifier ($1->line (), $1->column ()); }
-		;	    
-
-string		: DQ_STRING
-		  { $$ = make_constant (DQ_STRING, $1); }
-		| SQ_STRING
-		  { $$ = make_constant (SQ_STRING, $1); }
-		;
-
-constant	: NUM
-		  { $$ = make_constant (NUM, $1); }
-		| IMAG_NUM
-		  { $$ = make_constant (IMAG_NUM, $1); }
-		| string
-		  { $$ = $1; }
-		;
-
-matrix		: '[' ']'
-		  {
-		    $$ = new tree_constant (octave_null_matrix::instance);
-		    lexer_flags.looking_at_matrix_or_assign_lhs = false;
-		    lexer_flags.pending_local_variables.clear ();
-		  }
-		| '[' ';' ']'
-		  {
-		    $$ = new tree_constant (octave_null_matrix::instance);
-		    lexer_flags.looking_at_matrix_or_assign_lhs = false;
-		    lexer_flags.pending_local_variables.clear ();
-		  }
-		| '[' ',' ']'
-		  {
-		    $$ = new tree_constant (octave_null_matrix::instance);
-		    lexer_flags.looking_at_matrix_or_assign_lhs = false;
-		    lexer_flags.pending_local_variables.clear ();
-		  }
-		| '[' matrix_rows ']'
-		  {
-		    $$ = finish_matrix ($2);
-		    lexer_flags.looking_at_matrix_or_assign_lhs = false;
-		    lexer_flags.pending_local_variables.clear ();
-		  }
-		;
-
-matrix_rows	: matrix_rows1
-		  { $$ = $1; }
-		| matrix_rows1 ';'	// Ignore trailing semicolon.
-		  { $$ = $1; }
-		;
-
-matrix_rows1	: cell_or_matrix_row
-		  { $$ = new tree_matrix ($1); }
-		| matrix_rows1 ';' cell_or_matrix_row
-		  {
-		    $1->append ($3);
-		    $$ = $1;
-		  }
-		;
-
-cell		: '{' '}'
-		  { $$ = new tree_constant (octave_value (Cell ())); }
-		| '{' ';' '}'
-		  { $$ = new tree_constant (octave_value (Cell ())); }
-		| '{' cell_rows '}'
-		  { $$ = finish_cell ($2); }
-		;
-
-cell_rows	: cell_rows1
-		  { $$ = $1; }
-		| cell_rows1 ';'	// Ignore trailing semicolon.
-		  { $$ = $1; }
-		;
-
-cell_rows1	: cell_or_matrix_row
-		  { $$ = new tree_cell ($1); }
-		| cell_rows1 ';' cell_or_matrix_row
-		  {
-		    $1->append ($3);
-		    $$ = $1;
-		  }
-		;
-
-cell_or_matrix_row
-		: arg_list
-		  { $$ = $1; }
-		| arg_list ','	// Ignore trailing comma.
-		  { $$ = $1; }
-		;
-
-fcn_handle	: '@' FCN_HANDLE
-		  {
-		    $$ = make_fcn_handle ($2);
-		    lexer_flags.looking_at_function_handle--;
-		  }
-		;
-
-anon_fcn_handle	: '@' param_list statement
-		  { $$ = make_anon_fcn_handle ($2, $3); }
-		;
-	
-primary_expr	: identifier
-		  { $$ = $1; }
-		| constant
-		  { $$ = $1; }
-		| fcn_handle
-		  { $$ = $1; }
-		| matrix
-		  { $$ = $1; }
-		| cell
-		  { $$ = $1; }
-		| meta_identifier
-		  { $$ = $1; }
-		| superclass_identifier
-		  { $$ = $1; }
-		| '(' expression ')'
-		  { $$ = $2->mark_in_parens (); }
-		;
-
-magic_colon	: ':'
-		  {
-		    octave_value tmp (octave_value::magic_colon_t);
-		    $$ = new tree_constant (tmp);
-		  }
-		;
-
-arg_list	: expression
-		  { $$ = new tree_argument_list ($1); }
-		| magic_colon
-		  { $$ = new tree_argument_list ($1); }
-		| arg_list ',' magic_colon
-		  {
-		    $1->append ($3);
-		    $$ = $1;
-		  }
-		| arg_list ',' expression
-		  {
-		    $1->append ($3);
-		    $$ = $1;
-		  }
-		;
-
-indirect_ref_op	: '.'
-		  { lexer_flags.looking_at_indirect_ref = true; }
-		;
-
-postfix_expr	: primary_expr
-		  { $$ = $1; }
-		| postfix_expr '(' ')'
-		  { $$ = make_index_expression ($1, 0, '('); }
-		| postfix_expr '(' arg_list ')'
-		  { $$ = make_index_expression ($1, $3, '('); }
-		| postfix_expr '{' '}'
-		  { $$ = make_index_expression ($1, 0, '{'); }
-		| postfix_expr '{' arg_list '}'
-		  { $$ = make_index_expression ($1, $3, '{'); }
-		| postfix_expr PLUS_PLUS
-		  { $$ = make_postfix_op (PLUS_PLUS, $1, $2); }
-		| postfix_expr MINUS_MINUS
-		  { $$ = make_postfix_op (MINUS_MINUS, $1, $2); }
-		| postfix_expr QUOTE
-		  { $$ = make_postfix_op (QUOTE, $1, $2); }
-		| postfix_expr TRANSPOSE
-		  { $$ = make_postfix_op (TRANSPOSE, $1, $2); }
-		| postfix_expr indirect_ref_op STRUCT_ELT
-		  { $$ = make_indirect_ref ($1, $3->text ()); }
-		| postfix_expr indirect_ref_op '(' expression ')'
-		  { $$ = make_indirect_ref ($1, $4); }
-		;
-
-prefix_expr	: postfix_expr
-		  { $$ = $1; }
-		| binary_expr
-		  { $$ = $1; }
-		| PLUS_PLUS prefix_expr %prec UNARY
-		  { $$ = make_prefix_op (PLUS_PLUS, $2, $1); }
-		| MINUS_MINUS prefix_expr %prec UNARY
-		  { $$ = make_prefix_op (MINUS_MINUS, $2, $1); }
-		| EXPR_NOT prefix_expr %prec UNARY
-		  { $$ = make_prefix_op (EXPR_NOT, $2, $1); }
-		| '+' prefix_expr %prec UNARY
-		  { $$ = make_prefix_op ('+', $2, $1); }
-		| '-' prefix_expr %prec UNARY
-		  { $$ = make_prefix_op ('-', $2, $1); }
-		;
-
-binary_expr	: prefix_expr POW prefix_expr
-		  { $$ = make_binary_op (POW, $1, $2, $3); }
-		| prefix_expr EPOW prefix_expr
-		  { $$ = make_binary_op (EPOW, $1, $2, $3); }
-		| prefix_expr '+' prefix_expr
-		  { $$ = make_binary_op ('+', $1, $2, $3); }
-		| prefix_expr '-' prefix_expr
-		  { $$ = make_binary_op ('-', $1, $2, $3); }
-		| prefix_expr '*' prefix_expr
-		  { $$ = make_binary_op ('*', $1, $2, $3); }
-		| prefix_expr '/' prefix_expr
-		  { $$ = make_binary_op ('/', $1, $2, $3); }
-		| prefix_expr EPLUS prefix_expr
-		  { $$ = make_binary_op ('+', $1, $2, $3); }
-		| prefix_expr EMINUS prefix_expr
-		  { $$ = make_binary_op ('-', $1, $2, $3); }
-		| prefix_expr EMUL prefix_expr
-		  { $$ = make_binary_op (EMUL, $1, $2, $3); }
-		| prefix_expr EDIV prefix_expr
-		  { $$ = make_binary_op (EDIV, $1, $2, $3); }
-		| prefix_expr LEFTDIV prefix_expr
-		  { $$ = make_binary_op (LEFTDIV, $1, $2, $3); }
-		| prefix_expr ELEFTDIV prefix_expr
-		  { $$ = make_binary_op (ELEFTDIV, $1, $2, $3); }
-		;
-
-colon_expr	: colon_expr1
-		  { $$ = finish_colon_expression ($1); }
-		;
-
-colon_expr1	: prefix_expr
-		  { $$ = new tree_colon_expression ($1); }
-		| colon_expr1 ':' prefix_expr
-		  {
-		    if (! ($$ = $1->append ($3)))
-		      ABORT_PARSE;
-		  }
-		;
-
-simple_expr	: colon_expr
-		  { $$ = $1; }
-		| simple_expr LSHIFT simple_expr
-		  { $$ = make_binary_op (LSHIFT, $1, $2, $3); }
-		| simple_expr RSHIFT simple_expr
-		  { $$ = make_binary_op (RSHIFT, $1, $2, $3); }
-		| simple_expr EXPR_LT simple_expr
-		  { $$ = make_binary_op (EXPR_LT, $1, $2, $3); }
-		| simple_expr EXPR_LE simple_expr
-		  { $$ = make_binary_op (EXPR_LE, $1, $2, $3); }
-		| simple_expr EXPR_EQ simple_expr
-		  { $$ = make_binary_op (EXPR_EQ, $1, $2, $3); }
-		| simple_expr EXPR_GE simple_expr
-		  { $$ = make_binary_op (EXPR_GE, $1, $2, $3); }
-		| simple_expr EXPR_GT simple_expr
-		  { $$ = make_binary_op (EXPR_GT, $1, $2, $3); }
-		| simple_expr EXPR_NE simple_expr
-		  { $$ = make_binary_op (EXPR_NE, $1, $2, $3); }
-		| simple_expr EXPR_AND simple_expr
-		  { $$ = make_binary_op (EXPR_AND, $1, $2, $3); }
-		| simple_expr EXPR_OR simple_expr
-		  { $$ = make_binary_op (EXPR_OR, $1, $2, $3); }
-		| simple_expr EXPR_AND_AND simple_expr
-		  { $$ = make_boolean_op (EXPR_AND_AND, $1, $2, $3); }
-		| simple_expr EXPR_OR_OR simple_expr
-		  { $$ = make_boolean_op (EXPR_OR_OR, $1, $2, $3); }
-		;
-
-// Arrange for the lexer to return CLOSE_BRACE for `]' by looking ahead
-// one token for an assignment op.
-
-assign_lhs	: simple_expr
-		  {
-		    $$ = new tree_argument_list ($1);
-		    $$->mark_as_simple_assign_lhs ();
-		  }
-		| '[' arg_list CLOSE_BRACE
-		  {
-		    $$ = $2;
-		    lexer_flags.looking_at_matrix_or_assign_lhs = false;
-		    for (std::set<std::string>::const_iterator p = lexer_flags.pending_local_variables.begin ();
-			 p != lexer_flags.pending_local_variables.end ();
-			 p++)
-		      {
-			symbol_table::force_variable (*p);
-		      }
-		    lexer_flags.pending_local_variables.clear ();
-		  }
-		;
-
-assign_expr	: assign_lhs '=' expression
-		  { $$ = make_assign_op ('=', $1, $2, $3); }
-		| assign_lhs ADD_EQ expression
-		  { $$ = make_assign_op (ADD_EQ, $1, $2, $3); }
-		| assign_lhs SUB_EQ expression
-		  { $$ = make_assign_op (SUB_EQ, $1, $2, $3); }
-		| assign_lhs MUL_EQ expression
-		  { $$ = make_assign_op (MUL_EQ, $1, $2, $3); }
-		| assign_lhs DIV_EQ expression
-		  { $$ = make_assign_op (DIV_EQ, $1, $2, $3); }
-		| assign_lhs LEFTDIV_EQ expression
-		  { $$ = make_assign_op (LEFTDIV_EQ, $1, $2, $3); }
-		| assign_lhs POW_EQ expression
-		  { $$ = make_assign_op (POW_EQ, $1, $2, $3); }
-		| assign_lhs LSHIFT_EQ expression
-		  { $$ = make_assign_op (LSHIFT_EQ, $1, $2, $3); }
-		| assign_lhs RSHIFT_EQ expression
-		  { $$ = make_assign_op (RSHIFT_EQ, $1, $2, $3); }
-		| assign_lhs EMUL_EQ expression
-		  { $$ = make_assign_op (EMUL_EQ, $1, $2, $3); }
-		| assign_lhs EDIV_EQ expression
-		  { $$ = make_assign_op (EDIV_EQ, $1, $2, $3); }
-		| assign_lhs ELEFTDIV_EQ expression
-		  { $$ = make_assign_op (ELEFTDIV_EQ, $1, $2, $3); }
-		| assign_lhs EPOW_EQ expression
-		  { $$ = make_assign_op (EPOW_EQ, $1, $2, $3); }
-		| assign_lhs AND_EQ expression
-		  { $$ = make_assign_op (AND_EQ, $1, $2, $3); }
-		| assign_lhs OR_EQ expression
-		  { $$ = make_assign_op (OR_EQ, $1, $2, $3); }
-		;
-
-expression	: simple_expr
-		  { $$ = $1; }
-		| assign_expr
-		  { $$ = $1; }
-		| anon_fcn_handle
-		  { $$ = $1; }
-		;
-
-// ================================================
-// Commands, declarations, and function definitions
-// ================================================
-
-command		: declaration
-		  { $$ = $1; }
-		| select_command
-		  { $$ = $1; }
-		| loop_command
-		  { $$ = $1; }
-		| jump_command
-		  { $$ = $1; }
-		| except_command
-		  { $$ = $1; }
-		| function
-		  { $$ = $1; }
-		| script_file
-		  { $$ = $1; }
-		| classdef
-		  { $$ = $1; }
-		;
-
-// =====================
-// Declaration statemnts
-// =====================
-
-parsing_decl_list
-		: // empty
-		  { lexer_flags.looking_at_decl_list = true; }
-
-declaration	: GLOBAL parsing_decl_list decl1
-		  {
-		    $$ = make_decl_command (GLOBAL, $1, $3);
-		    lexer_flags.looking_at_decl_list = false;
-		  }
-		| STATIC parsing_decl_list decl1
-		  {
-		    $$ = make_decl_command (STATIC, $1, $3);
-		    lexer_flags.looking_at_decl_list = false;
-		  }
-		;
-
-decl1		: decl2
-		  { $$ = new tree_decl_init_list ($1); }
-		| decl1 decl2
-		  {
-		    $1->append ($2);
-		    $$ = $1;
-		  }
-		;
-
-decl_param_init : // empty
-		{ lexer_flags.looking_at_initializer_expression = true; }
-
-decl2		: identifier
-		  { $$ = new tree_decl_elt ($1); }
-		| identifier '=' decl_param_init expression
-		  {
-		    lexer_flags.looking_at_initializer_expression = false;
-		    $$ = new tree_decl_elt ($1, $4);
-		  }
-		;
-
-// ====================
-// Selection statements
-// ====================
-
-select_command	: if_command
-		  { $$ = $1; }
-		| switch_command
-		  { $$ = $1; }
-		;
-
-// ============
-// If statement
-// ============
-
-if_command	: IF stash_comment if_cmd_list END
-		  {
-		    if (! ($$ = finish_if_command ($1, $3, $4, $2)))
-		      ABORT_PARSE;
-		  }
-		;
-
-if_cmd_list	: if_cmd_list1
-		  { $$ = $1; }
-		| if_cmd_list1 else_clause
-		  {
-		    $1->append ($2);
-		    $$ = $1;
-		  }
-		;
-
-if_cmd_list1	: expression opt_sep opt_list
-		  { $$ = start_if_command ($1, $3); }
-		| if_cmd_list1 elseif_clause
-		  {
-		    $1->append ($2);
-		    $$ = $1;
-		  }
-		;
-
-elseif_clause	: ELSEIF stash_comment opt_sep expression opt_sep opt_list
-		  { $$ = make_elseif_clause ($1, $4, $6, $2); }
-		;
-
-else_clause	: ELSE stash_comment opt_sep opt_list
-		  { $$ = new tree_if_clause ($4, $2); }
-		;
-
-// ================
-// Switch statement
-// ================
-
-switch_command	: SWITCH stash_comment expression opt_sep case_list END
-		  {
-		    if (! ($$ = finish_switch_command ($1, $3, $5, $6, $2)))
-		      ABORT_PARSE;
-		  }
-		;
-
-case_list	: // empty
-		  { $$ = new tree_switch_case_list (); }
-		| case_list1
-		  { $$ = $1; }
-		| case_list1 default_case
-		  {
-		    $1->append ($2);
-		    $$ = $1;
-		  }		
-		;
-
-case_list1	: switch_case
-		  { $$ = new tree_switch_case_list ($1); }
-		| case_list1 switch_case
-		  {
-		    $1->append ($2);
-		    $$ = $1;
-		  }
-		;
-
-switch_case	: CASE stash_comment opt_sep expression opt_sep opt_list
-		  { $$ = make_switch_case ($1, $4, $6, $2); }
-		;
-
-default_case	: OTHERWISE stash_comment opt_sep opt_list
-		  {
-		    $$ = new tree_switch_case ($4, $2);
-		  }
-		;
-
-// =======
-// Looping
-// =======
-
-loop_command	: WHILE stash_comment expression opt_sep opt_list END
-		  {
-		    if (! ($$ = make_while_command ($1, $3, $5, $6, $2)))
-		      ABORT_PARSE;
-		  }
-		| DO stash_comment opt_sep opt_list UNTIL expression
-		  {
-		    if (! ($$ = make_do_until_command ($5, $4, $6, $2)))
-		      ABORT_PARSE;
-		  }
-		| FOR stash_comment assign_lhs '=' expression opt_sep opt_list END
-		  {
-		    if (! ($$ = make_for_command ($1, $3, $5, $7, $8, $2)))
-		      ABORT_PARSE;
-		  }
-		| FOR stash_comment '(' assign_lhs '=' expression ')' opt_sep opt_list END
-		  {
-		    if (! ($$ = make_for_command ($1, $4, $6, $9, $10, $2)))
-		      ABORT_PARSE;
-		  }
-		;
-
-// =======
-// Jumping
-// =======
-
-jump_command	: BREAK
-		  {
-		    if (! ($$ = make_break_command ($1)))
-		      ABORT_PARSE;
-		  }
-		| CONTINUE
-		  {
-		    if (! ($$ = make_continue_command ($1)))
-		      ABORT_PARSE;
-		  }
-		| FUNC_RET
-		  {
-		    if (! ($$ = make_return_command ($1)))
-		      ABORT_PARSE;
-		  }
-		;
-
-// ==========
-// Exceptions
-// ==========
-
-except_command	: UNWIND stash_comment opt_sep opt_list CLEANUP
-		  stash_comment opt_sep opt_list END
-		  {
-		    if (! ($$ = make_unwind_command ($1, $4, $8, $9, $2, $6)))
-		      ABORT_PARSE;
-		  }
-		| TRY stash_comment opt_sep opt_list CATCH
-		  stash_comment opt_sep opt_list END
-		  {
-		    if (! ($$ = make_try_command ($1, $4, $8, $9, $2, $6)))
-		      ABORT_PARSE;
-		  }
-		| TRY stash_comment opt_sep opt_list END
-		  {
-		    if (! ($$ = make_try_command ($1, $4, 0, $5, $2, 0)))
-		      ABORT_PARSE;
-		  }
-		;
-
-// ===========================================
-// Some `subroutines' for function definitions
-// ===========================================
-
-push_fcn_symtab	: // empty
-		  {
-		    current_function_depth++;
-
-		    if (max_function_depth < current_function_depth)
-		      max_function_depth = current_function_depth;
-
-		    symtab_context.push (symbol_table::current_scope ());
-		    symbol_table::set_scope (symbol_table::alloc_scope ());
-
-		    if (! reading_script_file && current_function_depth == 1
-			&& ! parsing_subfunctions)
-		      primary_fcn_scope = symbol_table::current_scope ();
-
-		    if (reading_script_file && current_function_depth > 1)
-		      yyerror ("nested functions not implemented in this context");
-		  }
-		;
-
-// ===========================
-// List of function parameters
-// ===========================
-
-param_list_beg	: '('
-		  {
-		    lexer_flags.looking_at_parameter_list = true;
-
-		    if (lexer_flags.looking_at_function_handle)
-		      {
-		        symtab_context.push (symbol_table::current_scope ());
-			symbol_table::set_scope (symbol_table::alloc_scope ());
-			lexer_flags.looking_at_function_handle--;
-		      }
-		  }
-		;
-
-param_list_end	: ')'
-		  {
-		    lexer_flags.looking_at_parameter_list = false;
-		    lexer_flags.looking_for_object_index = false;
-		  }
-		;
-
-param_list	: param_list_beg param_list1 param_list_end
-		  {
-		    lexer_flags.quote_is_transpose = false;
-		    $$ = $2;
-		  }
-		| param_list_beg error
-		  {
-		    yyerror ("invalid parameter list");
-		    $$ = 0;
-		    ABORT_PARSE;
-		  }
-		;
-
-param_list1	: // empty
-		  { $$ = 0; }
-		| param_list2
-		  {
-		    $1->mark_as_formal_parameters ();
-		    if ($1->validate (tree_parameter_list::in))
-		      $$ = $1;
-		    else
-		      ABORT_PARSE;
-		  }
-		;
-
-param_list2	: decl2
-		  { $$ = new tree_parameter_list ($1); }
-		| param_list2 ',' decl2
-		  {
-		    $1->append ($3);
-		    $$ = $1;
-		  }
-		;
-
-// ===================================
-// List of function return value names
-// ===================================
-
-return_list	: '[' ']'
-		  {
-		    lexer_flags.looking_at_return_list = false;
-		    $$ = new tree_parameter_list ();
-		  }
-		| return_list1
-		  {
-		    lexer_flags.looking_at_return_list = false;
-		    if ($1->validate (tree_parameter_list::out))
-		      $$ = $1;
-		    else
-		      ABORT_PARSE;
-		  }
-		| '[' return_list1 ']'
-		  {
-		    lexer_flags.looking_at_return_list = false;
-		    if ($2->validate (tree_parameter_list::out))
-		      $$ = $2;
-		    else
-		      ABORT_PARSE;
-		  }
-		;
-
-return_list1	: identifier
-		  { $$ = new tree_parameter_list (new tree_decl_elt ($1)); }
-		| return_list1 ',' identifier
-		  {
-		    $1->append (new tree_decl_elt ($3));
-		    $$ = $1;
-		  }
-		;
-
-// ===========
-// Script file
-// ===========
-
-script_file	: SCRIPT_FILE opt_list END_OF_INPUT
-		  {
-		    tree_statement *end_of_script
-		      = make_end ("endscript", input_line_number,
-				  current_input_column);
-
-		    make_script ($2, end_of_script);
-
-		    $$ = 0;
-		  }
-		;
-
-// =============
-// Function file
-// =============
-
-function_file   : FUNCTION_FILE function_list opt_sep END_OF_INPUT
-		  { $$ = 0; }
-		;
-
-function_list   : function
-		| function_list sep function
-		;
-
-// ===================
-// Function definition
-// ===================
-
-function_beg	: push_fcn_symtab FCN stash_comment
-		  {
-		    $$ = $3;
-
-		    if (reading_classdef_file || lexer_flags.parsing_classdef) 
-		      lexer_flags.maybe_classdef_get_set_method = true; 
-		  }
-		;
-
-function	: function_beg function1
-		  {
-		    $$ = finish_function (0, $2, $1);
-		    recover_from_parsing_function ();
-		  }
-		| function_beg return_list '=' function1
-		  {
-		    $$ = finish_function ($2, $4, $1);
-		    recover_from_parsing_function ();
-		  }
-		;
-
-fcn_name	: identifier
-		  {
-		    std::string id_name = $1->name ();
-
-		    lexer_flags.parsed_function_name = true;
-		    lexer_flags.defining_func = false;
-		    lexer_flags.maybe_classdef_get_set_method = false;
-            
-		    $$ = $1;
-		  }
-		| GET '.' identifier
-		  {
-		    lexer_flags.maybe_classdef_get_set_method = false;
-		    $$ = $3;
-		  }
-		| SET '.' identifier
-		  {
-		    lexer_flags.maybe_classdef_get_set_method = false;
-		    $$ = $3;
-		  }
-		;
-
-function1	: fcn_name function2
-		  {
-		    std::string fname = $1->name ();
-
-		    delete $1;
-
-		    if (! ($$ = frob_function (fname, $2)))
-		      ABORT_PARSE;
-		  }
-		;
-
-function2	: param_list opt_sep opt_list function_end
-		  { $$ = start_function ($1, $3, $4); }
-		| opt_sep opt_list function_end
-		  { $$ = start_function (0, $2, $3); }
-		;
-
-function_end	: END
-		  {
-		    endfunction_found = true;
-		    if (end_token_ok ($1, token::function_end))
-		      $$ = make_end ("endfunction", $1->line (), $1->column ());
-		    else
-		      ABORT_PARSE;
-		  }
-		| END_OF_INPUT
-		  {
-// A lot of tests are based on the assumption that this is OK
-// 		    if (reading_script_file)
-// 		      {
-// 			yyerror ("function body open at end of script");
-// 			YYABORT;
-// 		      }
-
-		    if (endfunction_found)
-		      {
-			yyerror ("inconsistent function endings -- "
-				 "if one function is explicitly ended, "
-				 "so must all the others");
-			YYABORT;
-		      }
-
-		    if (! reading_fcn_file && ! reading_script_file)
-		      {
-			yyerror ("function body open at end of input");
-			YYABORT;
-		      }
-
-		    if (reading_classdef_file)
-		      {
-		        yyerror ("classdef body open at end of input");
-		        YYABORT;
-		      }
-
-		    $$ = make_end ("endfunction", input_line_number,
-				   current_input_column);
-		  }
-		;
-
-// ========
-// Classdef
-// ========
-
-classdef_beg	: CLASSDEF stash_comment
-		  {
-		    $$ = 0;
-		    lexer_flags.parsing_classdef = true;
-		  }
-		;
-
-classdef_end	: END
-		  {
-		    lexer_flags.parsing_classdef = false;
-
-		    if (end_token_ok ($1, token::classdef_end))
-		      $$ = make_end ("endclassdef", $1->line (), $1->column ());
-		    else
-		      ABORT_PARSE;
-		  }
-		;
-
-classdef1	: classdef_beg opt_attr_list identifier opt_superclasses
-		  { $$ = 0; }
-		;
-
-classdef	: classdef1 '\n' class_body '\n' stash_comment classdef_end
-		  { $$ = 0; }
-		;
-
-opt_attr_list	: // empty
-		  { $$ = 0; }
-		| '(' attr_list ')'
-		  { $$ = 0; }
-		;
-
-attr_list	: attr
-		  { $$ = 0; }
-		| attr_list ',' attr
-		  { $$ = 0; }
-		;
-
-attr		: identifier
-		  { $$ = 0; }
-		| identifier '=' decl_param_init expression
-		  { $$ = 0; }
-		| EXPR_NOT identifier
-		  { $$ = 0; }
-		;
-
-opt_superclasses
-		: // empty
-		  { $$ = 0; }
-		| superclasses
-		  { $$ = 0; }
-		;
-
-superclasses	: EXPR_LT identifier '.' identifier
-		  { $$ = 0; }
-		| EXPR_LT identifier
-		  { $$ = 0; }
-		| superclasses EXPR_AND identifier '.' identifier
-		  { $$ = 0; }
-		| superclasses EXPR_AND identifier
-		  { $$ = 0; }
-		;
-
-class_body	: properties_block
-		  { $$ = 0; }
-		| methods_block
-		  { $$ = 0; }
-		| events_block
-		  { $$ = 0; }
-		| class_body '\n' properties_block
-		  { $$ = 0; }
-		| class_body '\n' methods_block
-		  { $$ = 0; }
-		| class_body '\n' events_block
-		  { $$ = 0; }
-		;
-
-properties_beg	: PROPERTIES stash_comment
-		  { $$ = 0; }
-		;
-
-properties_block
-		: properties_beg opt_attr_list '\n' properties_list '\n' END
-		  { $$ = 0; }
-		;
-
-properties_list
-		: class_property
-		  { $$ = 0; }
-		| properties_list '\n' class_property
-		  { $$ = 0; }
-		;
-
-class_property	: identifier
-		  { $$ = 0; }
-		| identifier '=' decl_param_init expression ';'
-		  { $$ = 0; }
-		;
-
-methods_beg	: METHODS stash_comment
-		  { $$ = 0; }
-		;
-
-methods_block	: methods_beg opt_attr_list '\n' methods_list '\n' END
-		  { $$ = 0; }
-		;
-
-methods_list	: function
-		  { $$ = 0; }
-		| methods_list '\n' function
-		  { $$ = 0; }
-		;
-
-events_beg	: EVENTS stash_comment
-		  { $$ = 0; }
-		;
-
-events_block	: events_beg opt_attr_list '\n' events_list '\n' END
-		  { $$ = 0; }
-		;
-
-events_list	: class_event
-		  { $$ = 0; }
-		| events_list '\n' class_event
-		  { $$ = 0; }
-		;
-
-class_event	: identifier
-		  { $$ = 0; }
-		;
- 
-// =============
-// Miscellaneous
-// =============
-
-stash_comment	: // empty
-		  { $$ = octave_comment_buffer::get_comment (); }
-		;
-
-parse_error	: LEXICAL_ERROR
-		  { yyerror ("parse error"); }
-		| error
-		;
-
-sep_no_nl	: ','
-		  { $$ = ','; }
-		| ';'
-		  { $$ = ';'; }
-		| sep_no_nl ','
-		  { $$ = $1; }
-		| sep_no_nl ';'
-		  { $$ = $1; }
-		;
-
-opt_sep_no_nl	: // empty
-		  { $$ = 0; }
-		| sep_no_nl
-		  { $$ = $1; }
-		;
-
-sep		: ','
-		  { $$ = ','; }
-		| ';'
-		  { $$ = ';'; }
-		| '\n'
-		  { $$ = '\n'; }
-		| sep ','
-		  { $$ = $1; }
-		| sep ';'
-		  { $$ = $1; }
-		| sep '\n'
-		  { $$ = $1; }
-		;
-
-opt_sep		: // empty
-		  { $$ = 0; }
-		| sep
-		  { $$ = $1; }
-		;
-
-%%
-
-// Generic error messages.
-
-static void
-yyerror (const char *s)
-{
-  int err_col = current_input_column - 1;
-
-  std::ostringstream output_buf;
-
-  if (reading_fcn_file || reading_script_file || reading_classdef_file)
-    output_buf << "parse error near line " << input_line_number
-	       << " of file " << curr_fcn_file_full_name;
-  else
-    output_buf << "parse error:";
-
-  if (s && strcmp (s, "parse error") != 0)
-    output_buf << "\n\n  " << s;
-
-  output_buf << "\n\n";
-
-  if (! current_input_line.empty ())
-    {
-      size_t len = current_input_line.length ();
-
-      if (current_input_line[len-1] == '\n')
-        current_input_line.resize (len-1);
-
-      // Print the line, maybe with a pointer near the error token.
-
-      output_buf << ">>> " << current_input_line << "\n";
-
-      if (err_col == 0)
-	err_col = len;
-
-      for (int i = 0; i < err_col + 3; i++)
-	output_buf << " ";
-
-      output_buf << "^";
-    }
-
-  output_buf << "\n";
-
-  std::string msg = output_buf.str ();
-
-  parse_error ("%s", msg.c_str ());
-}
-
-// Error mesages for mismatched end tokens.
-
-static void
-end_error (const char *type, token::end_tok_type ettype, int l, int c)
-{
-  static const char *fmt
-    = "`%s' command matched by `%s' near line %d column %d";
-
-  switch (ettype)
-    {
-    case token::simple_end:
-      error (fmt, type, "end", l, c);
-      break;
-
-    case token::for_end:
-      error (fmt, type, "endfor", l, c);
-      break;
-
-    case token::function_end:
-      error (fmt, type, "endfunction", l, c);
-      break;
-
-    case token::classdef_end:
-      error (fmt, type, "endclassdef", l, c);
-      break;
-
-    case token::if_end:
-      error (fmt, type, "endif", l, c);
-      break;
-
-    case token::switch_end:
-      error (fmt, type, "endswitch", l, c); 
-      break;
-
-    case token::while_end:
-      error (fmt, type, "endwhile", l, c); 
-      break;
-
-    case token::try_catch_end:
-      error (fmt, type, "end_try_catch", l, c); 
-      break;
-
-    case token::unwind_protect_end:
-      error (fmt, type, "end_unwind_protect", l, c); 
-      break;
-
-    default:
-      panic_impossible ();
-      break;
-    }
-}
-
-// Check to see that end tokens are properly matched.
-
-static bool
-end_token_ok (token *tok, token::end_tok_type expected)
-{
-  bool retval = true;
-
-  token::end_tok_type ettype = tok->ettype ();
-
-  if (ettype != expected && ettype != token::simple_end)
-    {
-      retval = false;
-
-      yyerror ("parse error");
-
-      int l = tok->line ();
-      int c = tok->column ();
-
-      switch (expected)
-	{
-	case token::classdef_end:
-	  end_error ("classdef", ettype, l, c);
-	  break;
-
-	case token::for_end:
-	  end_error ("for", ettype, l, c);
-	  break;
-
-	case token::function_end:
-	  end_error ("function", ettype, l, c);
-	  break;
-
-	case token::if_end:
-	  end_error ("if", ettype, l, c);
-	  break;
-
-	case token::try_catch_end:
-	  end_error ("try", ettype, l, c);
-	  break;
-
-	case token::switch_end:
-	  end_error ("switch", ettype, l, c);
-	  break;
-
-	case token::unwind_protect_end:
-	  end_error ("unwind_protect", ettype, l, c);
-	  break;
-
-	case token::while_end:
-	  end_error ("while", ettype, l, c);
-	  break;
-
-	default:
-	  panic_impossible ();
-	  break;
-	}
-    }
-
-  return retval;
-}
-
-// Maybe print a warning if an assignment expression is used as the
-// test in a logical expression.
-
-static void
-maybe_warn_assign_as_truth_value (tree_expression *expr)
-{
-  if (expr->is_assignment_expression ()
-      && expr->paren_count () < 2)
-    {
-      if (curr_fcn_file_full_name.empty ())
-	warning_with_id
-	  ("Octave:assign-as-truth-value",
-	   "suggest parenthesis around assignment used as truth value");
-      else
-	warning_with_id
-	  ("Octave:assign-as-truth-value",
-	   "suggest parenthesis around assignment used as truth value near line %d, column %d in file `%s'",
-	   expr->line (), expr->column (), curr_fcn_file_full_name.c_str ());
-    }
-}
-
-// Maybe print a warning about switch labels that aren't constants.
-
-static void
-maybe_warn_variable_switch_label (tree_expression *expr)
-{
-  if (! expr->is_constant ())
-    {
-      if (curr_fcn_file_full_name.empty ())
-	warning_with_id ("Octave:variable-switch-label",
-			 "variable switch label");
-      else
-	warning_with_id
-	  ("Octave:variable-switch-label",
-	   "variable switch label near line %d, column %d in file `%s'",
-	   expr->line (), expr->column (), curr_fcn_file_full_name.c_str ());
-    }
-}
-
-static tree_expression *
-fold (tree_binary_expression *e)
-{
-  tree_expression *retval = e;
-
-  unwind_protect::frame_id_t uwp_frame = unwind_protect::begin_frame ();
-
-  unwind_protect::protect_var (error_state);
-  unwind_protect::protect_var (warning_state);
-
-  unwind_protect::protect_var (discard_error_messages);
-  unwind_protect::protect_var (discard_warning_messages);
-
-  discard_error_messages = true;
-  discard_warning_messages = true;
-
-  tree_expression *op1 = e->lhs ();
-  tree_expression *op2 = e->rhs ();
-
-  octave_value::binary_op op_type = e->op_type ();
-
-  if (op1->is_constant () && op2->is_constant ()
-      && (! ((warning_enabled ("Octave:associativity-change")
-	      && (op_type == POW || op_type == EPOW))
-	     || (warning_enabled ("Octave:precedence-change")
-		 && (op_type == EXPR_OR || op_type == EXPR_OR_OR)))))
-    {
-      octave_value tmp = e->rvalue1 ();
-
-      if (! (error_state || warning_state))
-	{
-	  tree_constant *tc_retval
-	    = new tree_constant (tmp, op1->line (), op1->column ());
-
-	  std::ostringstream buf;
-
-	  tree_print_code tpc (buf);
-
-	  e->accept (tpc);
-
-	  tc_retval->stash_original_text (buf.str ());
-
-	  delete e;
-
-	  retval = tc_retval;
-	}
-    }
-
-  unwind_protect::run_frame (uwp_frame);
-
-  return retval;
-}
-
-static tree_expression *
-fold (tree_unary_expression *e)
-{
-  tree_expression *retval = e;
-
-  unwind_protect::frame_id_t uwp_frame = unwind_protect::begin_frame ();
-
-  unwind_protect::protect_var (error_state);
-  unwind_protect::protect_var (warning_state);
-
-  unwind_protect::protect_var (discard_error_messages);
-  unwind_protect::protect_var (discard_warning_messages);
-
-  discard_error_messages = true;
-  discard_warning_messages = true;
-
-  tree_expression *op = e->operand ();
-
-  if (op->is_constant ())
-    {
-      octave_value tmp = e->rvalue1 ();
-
-      if (! (error_state || warning_state))
-	{
-	  tree_constant *tc_retval
-	    = new tree_constant (tmp, op->line (), op->column ());
-
-	  std::ostringstream buf;
-
-	  tree_print_code tpc (buf);
-
-	  e->accept (tpc);
-
-	  tc_retval->stash_original_text (buf.str ());
-
-	  delete e;
-
-	  retval = tc_retval;
-	}
-    }
-
-  unwind_protect::run_frame (uwp_frame);
-
-  return retval;
-}
-
-// Finish building a range.
-
-static tree_expression *
-finish_colon_expression (tree_colon_expression *e)
-{
-  tree_expression *retval = e;
-
-  unwind_protect::frame_id_t uwp_frame = unwind_protect::begin_frame ();
-
-  unwind_protect::protect_var (error_state);
-  unwind_protect::protect_var (warning_state);
-
-  unwind_protect::protect_var (discard_error_messages);
-  unwind_protect::protect_var (discard_warning_messages);
-
-  discard_error_messages = true;
-  discard_warning_messages = true;
-
-  tree_expression *base = e->base ();
-  tree_expression *limit = e->limit ();
-  tree_expression *incr = e->increment ();
-
-  if (base)
-    {
-      if (limit)
-	{
-	  if (base->is_constant () && limit->is_constant ()
-	      && (! incr || (incr && incr->is_constant ())))
-	    {
-	      octave_value tmp = e->rvalue1 ();
-
-	      if (! (error_state || warning_state))
-		{
-		  tree_constant *tc_retval
-		    = new tree_constant (tmp, base->line (), base->column ());
-
-		  std::ostringstream buf;
-
-		  tree_print_code tpc (buf);
-
-		  e->accept (tpc);
-
-		  tc_retval->stash_original_text (buf.str ());
-
-		  delete e;
-
-		  retval = tc_retval;
-		}
-	    }
-	}
-      else
-	{
-	  e->preserve_base ();
-	  delete e;
-
-	  // FIXME -- need to attempt constant folding here
-	  // too (we need a generic way to do that).
-	  retval = base;
-	}
-    }
-
-  unwind_protect::run_frame (uwp_frame);
-
-  return retval;
-}
-
-// Make a constant.
-
-static tree_constant *
-make_constant (int op, token *tok_val)
-{
-  int l = tok_val->line ();
-  int c = tok_val->column ();
-
-  tree_constant *retval = 0;
-
-  switch (op)
-    {
-    case NUM:
-      {
-	octave_value tmp (tok_val->number ());
-	retval = new tree_constant (tmp, l, c);
-	retval->stash_original_text (tok_val->text_rep ());
-      }
-      break;
-
-    case IMAG_NUM:
-      {
-	octave_value tmp (Complex (0.0, tok_val->number ()));
-	retval = new tree_constant (tmp, l, c);
-	retval->stash_original_text (tok_val->text_rep ());
-      }
-      break;
-
-    case DQ_STRING:
-    case SQ_STRING:
-      {
-	std::string txt = tok_val->text ();
-
-        char delim = op == DQ_STRING ? '"' : '\'';
-        octave_value tmp (txt, delim);
-
-        if (txt.empty ())
-          {
-            if (op == DQ_STRING)
-              tmp = octave_null_str::instance;
-            else
-              tmp = octave_null_sq_str::instance;
-          }
-
-	retval = new tree_constant (tmp, l, c);
-
-	if (op == DQ_STRING)
-	  txt = undo_string_escapes (txt);
-
-	// FIXME -- maybe this should also be handled by
-	// tok_val->text_rep () for character strings?
-	retval->stash_original_text (delim + txt + delim);
-      }
-      break;
-
-    default:
-      panic_impossible ();
-      break;
-    }
-
-  return retval;
-}
-
-// Make a function handle.
-
-static tree_fcn_handle *
-make_fcn_handle (token *tok_val)
-{
-  int l = tok_val->line ();
-  int c = tok_val->column ();
-
-  tree_fcn_handle *retval = new tree_fcn_handle (tok_val->text (), l, c);
-
-  return retval;
-}
-
-// Make an anonymous function handle.
-
-static tree_anon_fcn_handle *
-make_anon_fcn_handle (tree_parameter_list *param_list, tree_statement *stmt)
-{
-  // FIXME -- need to get these from the location of the @ symbol.
-
-  int l = -1;
-  int c = -1;
-
-  tree_parameter_list *ret_list = 0;
-
-  symbol_table::scope_id fcn_scope = symbol_table::current_scope ();
-
-  if (symtab_context.empty ())
-    panic_impossible ();
-
-  symbol_table::set_scope (symtab_context.top ());
-
-  symtab_context.pop ();
-
-  stmt->set_print_flag (false);
-
-  tree_statement_list *body = new tree_statement_list (stmt);
-
-  body->mark_as_anon_function_body ();
-
-  tree_anon_fcn_handle *retval
-    = new tree_anon_fcn_handle (param_list, ret_list, body, fcn_scope, l, c);
-
-  return retval;
-}
-
-static void
-maybe_warn_associativity_change (tree_expression *op)
-{
-  if (op->paren_count () == 0 && op->is_binary_expression ())
-    {
-      tree_binary_expression *e
-	= dynamic_cast<tree_binary_expression *> (op);
-
-      octave_value::binary_op op_type = e->op_type ();
-
-      if (op_type == octave_value::op_pow
-	  || op_type == octave_value::op_el_pow)
-	{
-	  std::string op_str = octave_value::binary_op_as_string (op_type);
-
-	  if (curr_fcn_file_full_name.empty ())
-	    warning_with_id
-	      ("Octave:associativity-change",
-	       "meaning may have changed due to change in associativity for %s operator",
-	       op_str.c_str ());
-	  else
-	    warning_with_id
-	      ("Octave:associativity-change",
-	       "meaning may have changed due to change in associativity for %s operator near line %d, column %d in file `%s'",
-	       op_str.c_str (), op->line (), op->column (),
-	       curr_fcn_file_full_name.c_str ());
-	}
-    }
-}
-
-// Build a binary expression.
-
-static tree_expression *
-make_binary_op (int op, tree_expression *op1, token *tok_val,
-		tree_expression *op2)
-{
-  octave_value::binary_op t = octave_value::unknown_binary_op;
-
-  switch (op)
-    {
-    case POW:
-      t = octave_value::op_pow;
-      maybe_warn_associativity_change (op1);
-      break;
-
-    case EPOW:
-      t = octave_value::op_el_pow;
-      maybe_warn_associativity_change (op1);
-      break;
-
-    case '+':
-      t = octave_value::op_add;
-      break;
-
-    case '-':
-      t = octave_value::op_sub;
-      break;
-
-    case '*':
-      t = octave_value::op_mul;
-      break;
-
-    case '/':
-      t = octave_value::op_div;
-      break;
-
-    case EMUL:
-      t = octave_value::op_el_mul;
-      break;
-
-    case EDIV:
-      t = octave_value::op_el_div;
-      break;
-
-    case LEFTDIV:
-      t = octave_value::op_ldiv;
-      break;
-
-    case ELEFTDIV:
-      t = octave_value::op_el_ldiv;
-      break;
-
-    case LSHIFT:
-      t = octave_value::op_lshift;
-      break;
-
-    case RSHIFT:
-      t = octave_value::op_rshift;
-      break;
-
-    case EXPR_LT:
-      t = octave_value::op_lt;
-      break;
-
-    case EXPR_LE:
-      t = octave_value::op_le;
-      break;
-
-    case EXPR_EQ:
-      t = octave_value::op_eq;
-      break;
-
-    case EXPR_GE:
-      t = octave_value::op_ge;
-      break;
-
-    case EXPR_GT:
-      t = octave_value::op_gt;
-      break;
-
-    case EXPR_NE:
-      t = octave_value::op_ne;
-      break;
-
-    case EXPR_AND:
-      t = octave_value::op_el_and;
-      break;
-
-    case EXPR_OR:
-      t = octave_value::op_el_or;
-      if (op2->paren_count () == 0 && op2->is_binary_expression ())
-        {
-	  tree_binary_expression *e
-	    = dynamic_cast<tree_binary_expression *> (op2);
-
-	  if (e->op_type () == octave_value::op_el_and)
-	    {
-	      if (curr_fcn_file_full_name.empty ())
-		warning_with_id
-		  ("Octave:precedence-change",
-		   "meaning may have changed due to change in precedence for & and | operators");
-	      else
-		warning_with_id
-		  ("Octave:precedence-change",
-		   "meaning may have changed due to change in precedence for & and | operators near line %d, column %d in file `%s'",
-		   op2->line (), op2->column (),
-		   curr_fcn_file_full_name.c_str ());
-	    }
-        }
-      break;
-
-    default:
-      panic_impossible ();
-      break;
-    }
-
-  int l = tok_val->line ();
-  int c = tok_val->column ();
-
-  tree_binary_expression *e
-    = maybe_compound_binary_expression (op1, op2, l, c, t);
-
-  return fold (e);
-}
-
-// Build a boolean expression.
-
-static tree_expression *
-make_boolean_op (int op, tree_expression *op1, token *tok_val,
-		 tree_expression *op2)
-{
-  tree_boolean_expression::type t;
-
-  switch (op)
-    {
-    case EXPR_AND_AND:
-      t = tree_boolean_expression::bool_and;
-      break;
-
-    case EXPR_OR_OR:
-      t = tree_boolean_expression::bool_or;
-      if (op2->paren_count () == 0 && op2->is_boolean_expression ())
-        {
-	  tree_boolean_expression *e
-	    = dynamic_cast<tree_boolean_expression *> (op2);
-
-	  if (e->op_type () == tree_boolean_expression::bool_and)
-	    warning_with_id
-	      ("Octave:precedence-change",
-	       "meaning may have changed due to change in precedence for && and || operators");
-        }
-      break;
-
-    default:
-      panic_impossible ();
-      break;
-    }
-
-  int l = tok_val->line ();
-  int c = tok_val->column ();
-
-  tree_boolean_expression *e
-    = new tree_boolean_expression (op1, op2, l, c, t);
-
-  return fold (e);
-}
-
-// Build a prefix expression.
-
-static tree_expression *
-make_prefix_op (int op, tree_expression *op1, token *tok_val)
-{
-  octave_value::unary_op t = octave_value::unknown_unary_op;
-
-  switch (op)
-    {
-    case EXPR_NOT:
-      t = octave_value::op_not;
-      break;
-
-    case '+':
-      t = octave_value::op_uplus;
-      break;
-
-    case '-':
-      t = octave_value::op_uminus;
-      break;
-
-    case PLUS_PLUS:
-      t = octave_value::op_incr;
-      break;
-
-    case MINUS_MINUS:
-      t = octave_value::op_decr;
-      break;
-
-    default:
-      panic_impossible ();
-      break;
-    }
-
-  int l = tok_val->line ();
-  int c = tok_val->column ();
-
-  tree_prefix_expression *e
-    = new tree_prefix_expression (op1, l, c, t);
-
-  return fold (e);
-}
-
-// Build a postfix expression.
-
-static tree_expression *
-make_postfix_op (int op, tree_expression *op1, token *tok_val)
-{
-  octave_value::unary_op t = octave_value::unknown_unary_op;
-
-  switch (op)
-    {
-    case QUOTE:
-      t = octave_value::op_hermitian;
-      break;
-
-    case TRANSPOSE:
-      t = octave_value::op_transpose;
-      break;
-
-    case PLUS_PLUS:
-      t = octave_value::op_incr;
-      break;
-
-    case MINUS_MINUS:
-      t = octave_value::op_decr;
-      break;
-
-    default:
-      panic_impossible ();
-      break;
-    }
-
-  int l = tok_val->line ();
-  int c = tok_val->column ();
-
-  tree_postfix_expression *e
-    = new tree_postfix_expression (op1, l, c, t);
-
-  return fold (e);
-}
-
-// Build an unwind-protect command.
-
-static tree_command *
-make_unwind_command (token *unwind_tok, tree_statement_list *body,
-		     tree_statement_list *cleanup, token *end_tok,
-		     octave_comment_list *lc, octave_comment_list *mc)
-{
-  tree_command *retval = 0;
-
-  if (end_token_ok (end_tok, token::unwind_protect_end))
-    {
-      octave_comment_list *tc = octave_comment_buffer::get_comment ();
-
-      int l = unwind_tok->line ();
-      int c = unwind_tok->column ();
-
-      retval = new tree_unwind_protect_command (body, cleanup,
-						lc, mc, tc, l, c);
-    }
-
-  return retval;
-}
-
-// Build a try-catch command.
-
-static tree_command *
-make_try_command (token *try_tok, tree_statement_list *body,
-		  tree_statement_list *cleanup, token *end_tok,
-		  octave_comment_list *lc, octave_comment_list *mc)
-{
-  tree_command *retval = 0;
-
-  if (end_token_ok (end_tok, token::try_catch_end))
-    {
-      octave_comment_list *tc = octave_comment_buffer::get_comment ();
-
-      int l = try_tok->line ();
-      int c = try_tok->column ();
-
-      retval = new tree_try_catch_command (body, cleanup,
-					   lc, mc, tc, l, c);
-    }
-
-  return retval;
-}
-
-// Build a while command.
-
-static tree_command *
-make_while_command (token *while_tok, tree_expression *expr,
-		    tree_statement_list *body, token *end_tok,
-		    octave_comment_list *lc)
-{
-  tree_command *retval = 0;
-
-  maybe_warn_assign_as_truth_value (expr);
-
-  if (end_token_ok (end_tok, token::while_end))
-    {
-      octave_comment_list *tc = octave_comment_buffer::get_comment ();
-
-      lexer_flags.looping--;
-
-      int l = while_tok->line ();
-      int c = while_tok->column ();
-
-      retval = new tree_while_command (expr, body, lc, tc, l, c);
-    }
-
-  return retval;
-}
-
-// Build a do-until command.
-
-static tree_command *
-make_do_until_command (token *until_tok, tree_statement_list *body,
-		       tree_expression *expr, octave_comment_list *lc)
-{
-  tree_command *retval = 0;
-
-  maybe_warn_assign_as_truth_value (expr);
-
-  octave_comment_list *tc = octave_comment_buffer::get_comment ();
-
-  lexer_flags.looping--;
-
-  int l = until_tok->line ();
-  int c = until_tok->column ();
-
-  retval = new tree_do_until_command (expr, body, lc, tc, l, c);
-
-  return retval;
-}
-
-// Build a for command.
-
-static tree_command *
-make_for_command (token *for_tok, tree_argument_list *lhs,
-		  tree_expression *expr, tree_statement_list *body,
-		  token *end_tok, octave_comment_list *lc)
-{
-  tree_command *retval = 0;
-
-  if (end_token_ok (end_tok, token::for_end))
-    {
-      octave_comment_list *tc = octave_comment_buffer::get_comment ();
-
-      lexer_flags.looping--;
-
-      int l = for_tok->line ();
-      int c = for_tok->column ();
-
-      if (lhs->length () == 1)
-	{
-	  tree_expression *tmp = lhs->remove_front ();
-
-	  retval = new tree_simple_for_command (tmp, expr, body,
-						lc, tc, l, c);
-
-	  delete lhs;
-	}
-      else
-	retval = new tree_complex_for_command (lhs, expr, body,
-					       lc, tc, l, c);
-    }
-
-  return retval;
-}
-
-// Build a break command.
-
-static tree_command *
-make_break_command (token *break_tok)
-{
-  tree_command *retval = 0;
-
-  int l = break_tok->line ();
-  int c = break_tok->column ();
-
-  // We check to see if we are evaluating a function, script, or loop
-  // so that we don't turn eval ("break;") inside a function, script,
-  // or loop into a no-op command.
-
-  if (lexer_flags.looping || current_function_depth > 0
-      || reading_script_file || tree_evaluator::in_fcn_or_script_body
-      || tree_evaluator::in_loop_command)
-    retval = new tree_break_command (l, c);
-  else
-    retval = new tree_no_op_command ("break", l, c);
-
-  return retval;
-}
-
-// Build a continue command.
-
-static tree_command *
-make_continue_command (token *continue_tok)
-{
-  tree_command *retval = 0;
-
-  int l = continue_tok->line ();
-  int c = continue_tok->column ();
-
-  // We check to see if we are evaluating a loop so that we don't turn
-  // eval ("continue;") into a no-op command inside a loop.
-
-  if (lexer_flags.looping || tree_evaluator::in_loop_command)
-    retval = new tree_continue_command (l, c);
-  else
-    retval = new tree_no_op_command ("continue", l, c);
-
-  return retval;
-}
-
-// Build a return command.
-
-static tree_command *
-make_return_command (token *return_tok)
-{
-  tree_command *retval = 0;
-
-  int l = return_tok->line ();
-  int c = return_tok->column ();
-
-  if (Vdebugging)
-    {
-      Vdebugging = false;
-
-      retval = new tree_no_op_command ("return", l, c);
-    }
-  else
-    {
-      // We check to see if we are evaluating a function or script so
-      // that we don't turn eval ("return;") inside a function, script,
-      // or loop into a no-op command.
-
-      if (current_function_depth > 0 || reading_script_file
-          || tree_evaluator::in_fcn_or_script_body)
-        retval = new tree_return_command (l, c);
-      else
-        retval = new tree_no_op_command ("return", l, c);
-    }
-
-  return retval;
-}
-
-// Start an if command.
-
-static tree_if_command_list *
-start_if_command (tree_expression *expr, tree_statement_list *list)
-{
-  maybe_warn_assign_as_truth_value (expr);
-
-  tree_if_clause *t = new tree_if_clause (expr, list);
-
-  return new tree_if_command_list (t);
-}
-
-// Finish an if command.
-
-static tree_if_command *
-finish_if_command (token *if_tok, tree_if_command_list *list,
-		   token *end_tok, octave_comment_list *lc)
-{
-  tree_if_command *retval = 0;
-
-  if (end_token_ok (end_tok, token::if_end))
-    {
-      octave_comment_list *tc = octave_comment_buffer::get_comment ();
-
-      int l = if_tok->line ();
-      int c = if_tok->column ();
-
-      if (list && ! list->empty ())
-	{
-	  tree_if_clause *elt = list->front ();
-
-	  if (elt)
-	    {
-	      elt->line (l);
-	      elt->column (c);
-	    }
-	}
-
-      retval = new tree_if_command (list, lc, tc, l, c);
-    }
-
-  return retval;
-}
-
-// Build an elseif clause.
-
-static tree_if_clause *
-make_elseif_clause (token *elseif_tok, tree_expression *expr,
-		    tree_statement_list *list, octave_comment_list *lc)
-{
-  maybe_warn_assign_as_truth_value (expr);
-
-  int l = elseif_tok->line ();
-  int c = elseif_tok->column ();
-
-  return new tree_if_clause (expr, list, lc, l, c);
-}
-
-// Finish a switch command.
-
-static tree_switch_command *
-finish_switch_command (token *switch_tok, tree_expression *expr,
-		       tree_switch_case_list *list, token *end_tok,
-		       octave_comment_list *lc)
-{
-  tree_switch_command *retval = 0;
-
-  if (end_token_ok (end_tok, token::switch_end))
-    {
-      octave_comment_list *tc = octave_comment_buffer::get_comment ();
-
-      int l = switch_tok->line ();
-      int c = switch_tok->column ();
-
-      if (list && ! list->empty ())
-	{
-	  tree_switch_case *elt = list->front ();
-
-	  if (elt)
-	    {
-	      elt->line (l);
-	      elt->column (c);
-	    }
-	}
-
-      retval = new tree_switch_command (expr, list, lc, tc, l, c);
-    }
-
-  return retval;
-}
-
-// Build a switch case.
-
-static tree_switch_case *
-make_switch_case (token *case_tok, tree_expression *expr,
-		  tree_statement_list *list, octave_comment_list *lc)
-{
-  maybe_warn_variable_switch_label (expr);
-
-  int l = case_tok->line ();
-  int c = case_tok->column ();
-
-  return new tree_switch_case (expr, list, lc, l, c);
-}
-
-// Build an assignment to a variable.
-
-static tree_expression *
-make_assign_op (int op, tree_argument_list *lhs, token *eq_tok,
-		tree_expression *rhs)
-{
-  tree_expression *retval = 0;
-
-  octave_value::assign_op t = octave_value::unknown_assign_op;
-
-  switch (op)
-    {
-    case '=':
-      t = octave_value::op_asn_eq;
-      break;
-
-    case ADD_EQ:
-      t = octave_value::op_add_eq;
-      break;
-
-    case SUB_EQ:
-      t = octave_value::op_sub_eq;
-      break;
-
-    case MUL_EQ:
-      t = octave_value::op_mul_eq;
-      break;
-
-    case DIV_EQ:
-      t = octave_value::op_div_eq;
-      break;
-
-    case LEFTDIV_EQ:
-      t = octave_value::op_ldiv_eq;
-      break;
-
-    case POW_EQ:
-      t = octave_value::op_pow_eq;
-      break;
-
-    case LSHIFT_EQ:
-      t = octave_value::op_lshift_eq;
-      break;
-
-    case RSHIFT_EQ:
-      t = octave_value::op_rshift_eq;
-      break;
-
-    case EMUL_EQ:
-      t = octave_value::op_el_mul_eq;
-      break;
-
-    case EDIV_EQ:
-      t = octave_value::op_el_div_eq;
-      break;
-
-    case ELEFTDIV_EQ:
-      t = octave_value::op_el_ldiv_eq;
-      break;
-
-    case EPOW_EQ:
-      t = octave_value::op_el_pow_eq;
-      break;
-
-    case AND_EQ:
-      t = octave_value::op_el_and_eq;
-      break;
-
-    case OR_EQ:
-      t = octave_value::op_el_or_eq;
-      break;
-
-    default:
-      panic_impossible ();
-      break;
-    }
-
-  int l = eq_tok->line ();
-  int c = eq_tok->column ();
-
-  if (lhs->is_simple_assign_lhs ())
-    {
-      tree_expression *tmp = lhs->remove_front ();
-
-      retval = new tree_simple_assignment (tmp, rhs, false, l, c, t);
-
-      delete lhs;
-    }
-  else
-    return new tree_multi_assignment (lhs, rhs, false, l, c, t);
-
-  return retval;
-}
-
-// Define a script.
-
-static void
-make_script (tree_statement_list *cmds, tree_statement *end_script)
-{
-  std::string doc_string;
-
-  if (! help_buf.empty ())
-    {
-      doc_string = help_buf.top ();
-      help_buf.pop ();
-    }
-
-  if (! cmds)
-    cmds = new tree_statement_list ();
-
-  cmds->append (end_script);
-
-  octave_user_script *script
-    = new octave_user_script (curr_fcn_file_full_name, curr_fcn_file_name,
-			      cmds, doc_string);
-
-  octave_time now;
-
-  script->stash_fcn_file_time (now);
-
-  primary_fcn_ptr = script;
-
-  // Unmark any symbols that may have been tagged as local variables
-  // while parsing (for example, by force_local_variable in lex.l).
-
-  symbol_table::unmark_forced_variables ();
-}
-
-// Begin defining a function.
-
-static octave_user_function *
-start_function (tree_parameter_list *param_list, tree_statement_list *body,
-		tree_statement *end_fcn_stmt)
-{
-  // We'll fill in the return list later.
-
-  if (! body)
-    body = new tree_statement_list ();
-
-  body->append (end_fcn_stmt);
-
-  octave_user_function *fcn
-    = new octave_user_function (symbol_table::current_scope (),
-				param_list, 0, body);
-
-  if (fcn)
-    {
-      octave_comment_list *tc = octave_comment_buffer::get_comment ();
-
-      fcn->stash_trailing_comment (tc);
-    }
-
-  return fcn;
-}
-
-static tree_statement *
-make_end (const std::string& type, int l, int c)
-{
-  return make_statement (new tree_no_op_command (type, l, c));
-}
-
-// Do most of the work for defining a function.
-
-static octave_user_function *
-frob_function (const std::string& fname, octave_user_function *fcn)
-{
-  std::string id_name = fname;
-
-  // If input is coming from a file, issue a warning if the name of
-  // the file does not match the name of the function stated in the
-  // file.  Matlab doesn't provide a diagnostic (it ignores the stated
-  // name).
-  if (! autoloading && reading_fcn_file
-      && (current_function_depth == 1
-	  && ! (parsing_subfunctions || lexer_flags.parsing_class_method)))
-  {
-    // FIXME -- should curr_fcn_file_name already be
-    // preprocessed when we get here?  It seems to only be a
-    // problem with relative file names.
-
-    std::string nm = curr_fcn_file_name;
-
-    size_t pos = nm.find_last_of (file_ops::dir_sep_chars ());
-
-    if (pos != std::string::npos)
-      nm = curr_fcn_file_name.substr (pos+1);
-
-    if (nm != id_name)
-      {
-	warning_with_id
-	  ("Octave:function-name-clash",
-	   "function name `%s' does not agree with function file name `%s'",
-	   id_name.c_str (), curr_fcn_file_full_name.c_str ());
-
-	id_name = nm;
-      }
-  }
-
-  if (reading_fcn_file || reading_classdef_file || autoloading)
-    {
-      octave_time now;
-
-      fcn->stash_fcn_file_name (curr_fcn_file_full_name);
-      fcn->stash_fcn_file_time (now);
-      fcn->mark_as_system_fcn_file ();
-
-      if (fcn_file_from_relative_lookup)
-	fcn->mark_relative ();
-
-      if (current_function_depth > 1 || parsing_subfunctions)
-        {
-	  fcn->stash_parent_fcn_name (curr_fcn_file_name);
-	  fcn->stash_parent_fcn_scope (primary_fcn_scope);
-        }
-
-      if (lexer_flags.parsing_class_method)
-	{
-	  if (current_class_name == id_name)
-	    fcn->mark_as_class_constructor ();
-	  else
-	    fcn->mark_as_class_method ();
-
-	  fcn->stash_dispatch_class (current_class_name);
-	}
-
-      std::string nm = fcn->fcn_file_name ();
-
-      file_stat fs (nm);
-
-      if (fs && fs.is_newer (now))
-        warning_with_id ("Octave:future-time-stamp",
-			 "time stamp for `%s' is in the future", nm.c_str ());
-    }
-  else if (! (input_from_tmp_history_file || input_from_startup_file)
-	   && reading_script_file
-	   && curr_fcn_file_name == id_name)
-    {
-      warning ("function `%s' defined within script file `%s'",
-	       id_name.c_str (), curr_fcn_file_full_name.c_str ());
-    }
-
-  fcn->stash_function_name (id_name);
-
-  if (! help_buf.empty () && current_function_depth == 1
-      && ! parsing_subfunctions)
-    {
-      fcn->document (help_buf.top ());
-
-      help_buf.pop ();
-    }
-
-  if (reading_fcn_file && current_function_depth == 1
-      && ! parsing_subfunctions)
-    primary_fcn_ptr = fcn;
-  
-  return fcn;
-}
-
-static tree_function_def *
-finish_function (tree_parameter_list *ret_list,
-		 octave_user_function *fcn, octave_comment_list *lc)
-{
-  tree_function_def *retval = 0;
-
-  if (ret_list)
-    ret_list->mark_as_formal_parameters ();
-
-  if (fcn)
-    {
-      std::string nm = fcn->name ();
-      std::string file = fcn->fcn_file_name ();
-
-      std::string tmp = nm;
-      if (! file.empty ())
-	tmp += ": " + file;
-
-      symbol_table::cache_name (fcn->scope (), tmp);
-
-      if (lc)
-	fcn->stash_leading_comment (lc);
-
-      fcn->define_ret_list (ret_list);
-
-      if (current_function_depth > 1 || parsing_subfunctions)
-        {
-          // FIXME -- is this flag used to determine if the function is a
-          // _subfunction_ somewhere?
-	  fcn->mark_as_nested_function ();
-
-	  symbol_table::install_subfunction (nm, octave_value (fcn),
-					     primary_fcn_scope);
-	}
-
-      if (! reading_fcn_file)
-	{
-	  // We are either reading a script file or defining a function
-	  // at the command line, so this definition creates a
-	  // tree_function object that is placed in the parse tree.
-	  // Otherwise, it is just inserted in the symbol table,
-	  // either as a subfunction (see above), or as the primary
-	  // function for the file, via primary_fcn_ptr (see also
-	  // load_fcn_from_file,, parse_fcn_file, and
-	  // symbol_table::fcn_info::fcn_info_rep::find_user_function).
-
-          retval = new tree_function_def (fcn);
-	}
-
-      // Unmark any symbols that may have been tagged as local
-      // variables while parsing (for example, by force_local_variable
-      // in lex.l).
-
-      symbol_table::unmark_forced_variables (fcn->scope ());
-    }
-
-  return retval;
-}
-
-static void
-recover_from_parsing_function (void)
-{
-  if (symtab_context.empty ())
-    panic_impossible ();
-
-  symbol_table::set_scope (symtab_context.top ());
-  symtab_context.pop ();
-
-  if (reading_fcn_file && current_function_depth == 1
-      && ! parsing_subfunctions)
-    parsing_subfunctions = true;
-
-  current_function_depth--;
-
-  lexer_flags.parsed_function_name = false;
-  lexer_flags.looking_at_return_list = false;
-  lexer_flags.looking_at_parameter_list = false;
-}
-
-// Make an index expression.
-
-static tree_index_expression *
-make_index_expression (tree_expression *expr, tree_argument_list *args,
-		       char type)
-{
-  tree_index_expression *retval = 0;
-
-  int l = expr->line ();
-  int c = expr->column ();
-
-  expr->mark_postfix_indexed ();
-
-  if (expr->is_index_expression ())
-    {
-      tree_index_expression *tmp = static_cast<tree_index_expression *> (expr);
-
-      tmp->append (args, type);
-
-      retval = tmp;
-    }
-  else
-    retval = new tree_index_expression (expr, args, l, c, type);
-
-  return retval;
-}
-
-// Make an indirect reference expression.
-
-static tree_index_expression *
-make_indirect_ref (tree_expression *expr, const std::string& elt)
-{
-  tree_index_expression *retval = 0;
-
-  int l = expr->line ();
-  int c = expr->column ();
-
-  if (expr->is_index_expression ())
-    {
-      tree_index_expression *tmp = static_cast<tree_index_expression *> (expr);
-
-      tmp->append (elt);
-
-      retval = tmp;
-    }
-  else
-    retval = new tree_index_expression (expr, elt, l, c);
-
-  lexer_flags.looking_at_indirect_ref = false;
-
-  return retval;
-}
-
-// Make an indirect reference expression with dynamic field name.
-
-static tree_index_expression *
-make_indirect_ref (tree_expression *expr, tree_expression *elt)
-{
-  tree_index_expression *retval = 0;
-
-  int l = expr->line ();
-  int c = expr->column ();
-
-  if (expr->is_index_expression ())
-    {
-      tree_index_expression *tmp = static_cast<tree_index_expression *> (expr);
-
-      tmp->append (elt);
-
-      retval = tmp;
-    }
-  else
-    retval = new tree_index_expression (expr, elt, l, c);
-
-  lexer_flags.looking_at_indirect_ref = false;
-
-  return retval;
-}
-
-// Make a declaration command.
-
-static tree_decl_command *
-make_decl_command (int tok, token *tok_val, tree_decl_init_list *lst)
-{
-  tree_decl_command *retval = 0;
-
-  int l = tok_val->line ();
-  int c = tok_val->column ();
-
-  switch (tok)
-    {
-    case GLOBAL:
-      retval = new tree_global_command (lst, l, c);
-      break;
-
-    case STATIC:
-      if (current_function_depth > 0)
-	retval = new tree_static_command (lst, l, c);
-      else
-	{
-	  if (reading_script_file)
-	    warning ("ignoring persistent declaration near line %d of file `%s'",
-		     l, curr_fcn_file_full_name.c_str ());
-	  else
-	    warning ("ignoring persistent declaration near line %d", l);
-	}
-      break;
-
-    default:
-      panic_impossible ();
-      break;
-    }
-
-  return retval;
-}
-
-// Finish building a matrix list.
-
-static tree_expression *
-finish_matrix (tree_matrix *m)
-{
-  tree_expression *retval = m;
-
-  unwind_protect::frame_id_t uwp_frame = unwind_protect::begin_frame ();
-
-  unwind_protect::protect_var (error_state);
-  unwind_protect::protect_var (warning_state);
-
-  unwind_protect::protect_var (discard_error_messages);
-  unwind_protect::protect_var (discard_warning_messages);
-
-  discard_error_messages = true;
-  discard_warning_messages = true;
-
-  if (m->all_elements_are_constant ())
-    {
-      octave_value tmp = m->rvalue1 ();
-
-      if (! (error_state || warning_state))
-	{
-	  tree_constant *tc_retval
-	    = new tree_constant (tmp, m->line (), m->column ());
-
-	  std::ostringstream buf;
-
-	  tree_print_code tpc (buf);
-
-	  m->accept (tpc);
-
-	  tc_retval->stash_original_text (buf.str ());
-
-	  delete m;
-
-	  retval = tc_retval;
-	}
-    }
-
-  unwind_protect::run_frame (uwp_frame);
-
-  return retval;
-}
-
-// Finish building a cell list.
-
-static tree_expression *
-finish_cell (tree_cell *c)
-{
-  return finish_matrix (c);
-}
-
-static void
-maybe_warn_missing_semi (tree_statement_list *t)
-{
-  if (current_function_depth > 0)
-    {
-      tree_statement *tmp = t->back();
-
-      if (tmp->is_expression ())
-	warning_with_id
-	  ("Octave:missing-semicolon",
-	   "missing semicolon near line %d, column %d in file `%s'",
-	    tmp->line (), tmp->column (), curr_fcn_file_full_name.c_str ());
-    }
-}
-
-static tree_statement_list *
-set_stmt_print_flag (tree_statement_list *list, char sep,
-		     bool warn_missing_semi)
-{
-  tree_statement *tmp = list->back ();
-
-  switch (sep)
-    {
-    case ';':
-      tmp->set_print_flag (false);
-      break;
-
-    case 0:
-    case ',':
-    case '\n':
-      tmp->set_print_flag (true);
-      if (warn_missing_semi)
-	maybe_warn_missing_semi (list);
-      break;
-
-    default:
-      warning ("unrecognized separator type!");
-      break;
-    }
-
-  // Even if a statement is null, we add it to the list then remove it
-  // here so that the print flag is applied to the correct statement.
-
-  if (tmp->is_null_statement ())
-    {
-      list->pop_back ();
-      delete tmp;
-    }
-
-  return list;
-}
-
-static tree_statement_list *
-make_statement_list (tree_statement *stmt)
-{
-  return new tree_statement_list (stmt);
-}
-
-static tree_statement_list *
-append_statement_list (tree_statement_list *list, char sep,
-		       tree_statement *stmt, bool warn_missing_semi)
-{
-  set_stmt_print_flag (list, sep, warn_missing_semi);
-
-  list->append (stmt);
-
-  return list;
-}
-
-static void
-safe_fclose (void *f)
-{
-  // FIXME -- comments at the end of an input file are
-  // discarded (otherwise, they would be appended to the next
-  // statement, possibly from the command line or another file, which
-  // can be quite confusing).
-
-  octave_comment_list *tc = octave_comment_buffer::get_comment ();
-
-  delete tc;
-
-  if (f)
-    fclose (static_cast<FILE *> (f));
-}
-
-static bool
-looks_like_copyright (const std::string& s)
-{
-  bool retval = false;
-
-  if (! s.empty ())
-    {
-      size_t offset = s.find_first_not_of (" \t");
-  
-      retval = (s.substr (offset, 9) == "Copyright");
-    }
-
-  return retval;
-}
-
-static int
-text_getc (FILE *f)
-{
-  int c = getc (f);
-
-  // Convert CRLF into just LF and single CR into LF.
-
-  if (c == '\r')
-    {
-      c = getc (f);
-
-      if (c != '\n')
-	{
-	  ungetc (c, f);
-	  c = '\n';
-	}
-    }
-
-  if (c == '\n')
-    input_line_number++;
-
-  return c;
-}
-
-class
-stdio_stream_reader : public stream_reader
-{
-public:
-  stdio_stream_reader (FILE *f_arg) : stream_reader (), f (f_arg) { }
-
-  int getc (void) { return ::text_getc (f); }
-  int ungetc (int c)
-  {
-    if (c == '\n')
-      input_line_number--;
-
-    return ::ungetc (c, f);
-  }
-  
-private:
-  FILE *f;
-};
-
-static bool
-skip_white_space (stream_reader& reader)
-{
-  int c = 0;
-
-  while ((c = reader.getc ()) != EOF)
-    {
-      switch (c)
-	{
-	case ' ':
-	case '\t':
-	  current_input_column++;
-	  break;
-
-	case '\n':
-	  current_input_column = 0;
-	  break;
-
-	default:
-	  current_input_column--;
-	  reader.ungetc (c);
-	  goto done;
-	}
-    }
-
- done:
-
-  return (c == EOF);
-}
-
-static bool
-looking_at_classdef_keyword (FILE *ffile)
-{
-  bool status = false;
-
-  long pos = ftell (ffile);
-
-  char buf [10];
-  fgets (buf, 10, ffile);
-  size_t len = strlen (buf);
-  if (len > 8 && strncmp (buf, "classdef", 8) == 0
-      && ! (isalnum (buf[8]) || buf[8] == '_'))
-    status = true;
-
-  fseek (ffile, pos, SEEK_SET);
-
-  return status;
- }
-
-static std::string
-gobble_leading_white_space (FILE *ffile, bool& eof)
-{
-  std::string help_txt;
-
-  eof = false;
-
-  // TRUE means we have already cached the help text.
-  bool have_help_text = false;
-
-  std::string txt;
-
-  stdio_stream_reader stdio_reader (ffile);
-
-  while (true)
-    {
-      eof = skip_white_space (stdio_reader);
-
-      if (eof)
-	break;
-
-      txt = grab_comment_block (stdio_reader, true, eof);
-
-      if (txt.empty ())
-	break;
-
-      if (! (have_help_text || looks_like_copyright (txt)))
-	{
-	  help_txt = txt;
-	  have_help_text = true;
-	}
-
-      octave_comment_buffer::append (txt);
-
-      if (eof)
-	break;
-    }
-
-  return help_txt;
-}
-
-static bool
-looking_at_function_keyword (FILE *ffile)
-{
-  bool status = false;
-
-  long pos = ftell (ffile);
-
-  char buf [10];
-  fgets (buf, 10, ffile);
-  size_t len = strlen (buf);
-  if (len > 8 && strncmp (buf, "function", 8) == 0
-      && ! (isalnum (buf[8]) || buf[8] == '_'))
-    status = true;
-
-  fseek (ffile, pos, SEEK_SET);
-
-  return status;
-}
-
-static octave_function *
-parse_fcn_file (const std::string& ff, const std::string& dispatch_type,
-		bool force_script = false, bool require_file = true,
-		const std::string& warn_for = std::string ())
-{
-  unwind_protect::frame_id_t uwp_frame = unwind_protect::begin_frame ();
-
-  octave_function *fcn_ptr = 0;
-
-  // Open function file and parse.
-
-  FILE *in_stream = command_editor::get_input_stream ();
-
-  unwind_protect::add_fcn (command_editor::set_input_stream,
-                           in_stream);
-
-  unwind_protect::protect_var (ff_instream);
-
-  unwind_protect::protect_var (input_line_number);
-  unwind_protect::protect_var (current_input_column);
-  unwind_protect::protect_var (reading_fcn_file);
-  unwind_protect::protect_var (line_editing);
-  unwind_protect::protect_var (current_class_name);
-  unwind_protect::protect_var (current_function_depth);
-  unwind_protect::protect_var (max_function_depth);
-  unwind_protect::protect_var (parsing_subfunctions);
-  unwind_protect::protect_var (endfunction_found);
-
-  input_line_number = 1;
-  current_input_column = 1;
-  reading_fcn_file = true;
-  line_editing = false;
-  current_class_name = dispatch_type;
-  current_function_depth = 0;
-  max_function_depth = 0;
-  parsing_subfunctions = false;
-  endfunction_found = false;
-
-  // The next four lines must be in this order.
-  unwind_protect::add_fcn (command_history::ignore_entries, ! Vsaving_history);
-
-  // FIXME -- we shouldn't need both the
-  // command_history object and the
-  // Vsaving_history variable...
-  command_history::ignore_entries ();
-
-  unwind_protect::protect_var (Vsaving_history);
-
-  Vsaving_history = false;
-
-  FILE *ffile = get_input_from_file (ff, 0);
-
-  unwind_protect::add (safe_fclose, ffile);
-
-  if (ffile)
-    {
-      bool eof;
-
-      std::string help_txt = gobble_leading_white_space (ffile, eof);
-
-      if (! eof)
-	{
-	  std::string file_type;
-
-	  unwind_protect::protect_var (get_input_from_eval_string);
-	  unwind_protect::protect_var (parser_end_of_input);
-	  unwind_protect::protect_var (reading_fcn_file);
-	  unwind_protect::protect_var (reading_script_file);
-	  unwind_protect::protect_var (reading_classdef_file);
-	  unwind_protect::protect_var (Vecho_executing_commands);
-
-
-	  get_input_from_eval_string = false;
-	  parser_end_of_input = false;
-
-	  if (! force_script && looking_at_function_keyword (ffile))
-	    {
-	      file_type = "function";
-
-	      Vecho_executing_commands = ECHO_OFF;
-
-	      reading_classdef_file = false;
-	      reading_fcn_file = true;
-	      reading_script_file = false;
-	    }
-	  else if (! force_script && looking_at_classdef_keyword (ffile))
-	    {
-	      file_type = "classdef";
-
-	      Vecho_executing_commands = ECHO_OFF;
-
-	      reading_classdef_file = true;
-	      reading_fcn_file = false;
-	      reading_script_file = false;
-	    }
-	  else
-	    {
-	      file_type = "script";
-
-	      Vecho_executing_commands = ECHO_OFF;
-
-	      reading_classdef_file = false;
-	      reading_fcn_file = false;
-	      reading_script_file = true;
-	    }
-
-	  YY_BUFFER_STATE old_buf = current_buffer ();
-	  YY_BUFFER_STATE new_buf = create_buffer (ffile);
-
-	  unwind_protect::add_fcn (switch_to_buffer, old_buf);
-	  unwind_protect::add_fcn (delete_buffer, new_buf);
-
-	  switch_to_buffer (new_buf);
-
-	  unwind_protect::protect_var (primary_fcn_ptr);
-	  primary_fcn_ptr = 0;
-
-	  reset_parser ();
-
-	  // Do this with an unwind-protect cleanup function so that
-	  // the forced variables will be unmarked in the event of an
-	  // interrupt. 
-	  symbol_table::scope_id scope = symbol_table::top_scope ();
-	  unwind_protect::add_fcn (symbol_table::unmark_forced_variables, scope);
-
-	  if (! help_txt.empty ())
-	    help_buf.push (help_txt);
-
-	  if (reading_script_file)
-	    prep_lexer_for_script_file ();
-	  else
-	    prep_lexer_for_function_file ();
-
-	  lexer_flags.parsing_class_method = ! dispatch_type.empty ();
-
-	  int status = yyparse ();
-
-	  fcn_ptr = primary_fcn_ptr;
-
-	  if (reading_fcn_file && endfunction_found && max_function_depth > 1)
-	    warning_with_id ("Octave:nested-functions-coerced",
-			     "nested functions are coerced into subfunctions "
-			     "in file %s", ff.c_str ());
-
-	  if (status != 0)
-	    error ("parse error while reading %s file %s",
-		   file_type.c_str(), ff.c_str ());
-	}
-    }
-  else if (require_file)
-    error ("no such file, `%s'", ff.c_str ());
-  else if (! warn_for.empty ())
-    error ("%s: unable to open file `%s'", warn_for.c_str (), ff.c_str ());    
-
-  unwind_protect::run_frame (uwp_frame);
-
-  return fcn_ptr;
-}
-
-std::string
-get_help_from_file (const std::string& nm, bool& symbol_found,
-		    std::string& file)
-{
-  std::string retval;
-
-  file = fcn_file_in_path (nm);
-
-  if (! file.empty ())
-    {
-      symbol_found = true;
-
-      FILE *fptr = fopen (file.c_str (), "r");
-
-      if (fptr)
-	{
-	  unwind_protect::add (safe_fclose, fptr);
-
-	  bool eof;
-	  retval = gobble_leading_white_space (fptr, eof);
-
-	  if (retval.empty ())
-	    {
-	      octave_function *fcn = parse_fcn_file (file, "");
-
-	      if (fcn)
-		{
-		  retval = fcn->doc_string ();
-
-		  delete fcn;
-		}
-	    }
-
-	  unwind_protect::run ();
-	}
-    }
-
-  return retval;
-}
-
-std::string
-get_help_from_file (const std::string& nm, bool& symbol_found)
-{
-  std::string file;
-  return get_help_from_file (nm, symbol_found, file);
-}
-
-std::string
-lookup_autoload (const std::string& nm)
-{
-  std::string retval;
-
-  typedef std::map<std::string, std::string>::const_iterator am_iter;
-
-  am_iter p = autoload_map.find (nm);
-
-  if (p != autoload_map.end ())
-    retval = load_path::find_file (p->second);
-
-  return retval;
-}
-
-string_vector 
-autoloaded_functions (void)
-{
-  string_vector names (autoload_map.size());
-
-  octave_idx_type i = 0;
-  typedef std::map<std::string, std::string>::const_iterator am_iter;
-  for (am_iter p = autoload_map.begin (); p != autoload_map.end (); p++)
-    names[i++] = p->first;
-
-  return names;
-}
-
-string_vector
-reverse_lookup_autoload (const std::string& nm)
-{
-  string_vector names;
-
-  typedef std::map<std::string, std::string>::const_iterator am_iter;
-  for (am_iter p = autoload_map.begin (); p != autoload_map.end (); p++)
-    if (nm == p->second)
-      names.append (p->first);
-
-  return names;
-}
-
-octave_function *
-load_fcn_from_file (const std::string& file_name, const std::string& dir_name,
-		    const std::string& dispatch_type,
-		    const std::string& fcn_name, bool autoload)
-{
-  octave_function *retval = 0;
-
-  unwind_protect::frame_id_t uwp_frame = unwind_protect::begin_frame ();
-
-  std::string nm = file_name;
-
-  size_t nm_len = nm.length ();
-
-  std::string file;
-
-  unwind_protect::protect_var (fcn_file_from_relative_lookup);
-
-  fcn_file_from_relative_lookup = false;
-
-  file = nm;
-
-  if ((nm_len > 4 && nm.substr (nm_len-4) == ".oct")
-      || (nm_len > 4 && nm.substr (nm_len-4) == ".mex")
-      || (nm_len > 2 && nm.substr (nm_len-2) == ".m"))
-    {
-      nm = octave_env::base_pathname (file);
-      nm = nm.substr (0, nm.find_last_of ('.'));
-    }
-
-  if (autoload)
-    {
-      unwind_protect::protect_var (autoloading);
-      autoloading = true;
-    }
-
-  fcn_file_from_relative_lookup = ! octave_env::absolute_pathname (file);
-
-  file = octave_env::make_absolute (file, octave_env::getcwd ());
-
-  int len = file.length ();
-
-  if (len > 4 && file.substr (len-4, len-1) == ".oct")
-    {
-      if (autoload && ! fcn_name.empty ())
-	nm = fcn_name;
-
-      retval = octave_dynamic_loader::load_oct (nm, file, fcn_file_from_relative_lookup);
-    }
-  else if (len > 4 && file.substr (len-4, len-1) == ".mex")
-    retval = octave_dynamic_loader::load_mex (nm, file, fcn_file_from_relative_lookup);
-  else if (len > 2)
-    {
-      // These are needed by yyparse.
-
-      unwind_protect::protect_var (curr_fcn_file_name);
-      unwind_protect::protect_var (curr_fcn_file_full_name);
-
-      curr_fcn_file_name = nm;
-      curr_fcn_file_full_name = file;
-
-      retval = parse_fcn_file (file, dispatch_type, autoloading);
-    }
-
-  if (retval)
-    {
-      retval->stash_dir_name (dir_name);
-
-      if (retval->is_user_function ())
-	{
-	  symbol_table::scope_id id = retval->scope ();
-
-	  symbol_table::stash_dir_name_for_subfunctions (id, dir_name);
-	}
-    }
-
-  unwind_protect::run_frame (uwp_frame);
-
-  return retval;
-}
-
-DEFUN (autoload, args, ,
-  "-*- texinfo -*-\n\
-@deftypefn {Built-in Function} {} autoload (@var{function}, @var{file})\n\
-Define @var{function} to autoload from @var{file}.\n\
-\n\
-The second argument, @var{file}, should be an absolute file name or\n\
-a file name in the same directory as the function or script from which\n\
-the autoload command was run.  @var{file} should not depend on the\n\
-Octave load path.\n\
-\n\
-Normally, calls to @code{autoload} appear in PKG_ADD script files that\n\
-are evaluated when a directory is added to the Octave's load path.  To\n\
-avoid having to hardcode directory names in @var{file}, if @var{file}\n\
-is in the same directory as the PKG_ADD script then\n\
-\n\
-@example\n\
-autoload (\"foo\", \"bar.oct\");\n\
-@end example\n\
-\n\
-will load the function @code{foo} from the file @code{bar.oct}.  The above\n\
-when @code{bar.oct} is not in the same directory or uses like\n\
-\n\
-@example\n\
-autoload (\"foo\", file_in_loadpath (\"bar.oct\"))\n\
-@end example\n\
-\n\
-@noindent\n\
-are strongly discouraged, as their behavior might be unpredictable.\n\
-\n\
-With no arguments, return a structure containing the current autoload map.\n\
-@seealso{PKG_ADD}\n\
-@end deftypefn")
-{
-  octave_value retval;
-
-  int nargin = args.length ();
-
-  if (nargin == 0)
-    {
-      Cell func_names (dim_vector (autoload_map.size ()), 1);
-      Cell file_names (dim_vector (autoload_map.size ()), 1);
-
-      octave_idx_type i = 0;
-      typedef std::map<std::string, std::string>::const_iterator am_iter;
-      for (am_iter p = autoload_map.begin (); p != autoload_map.end (); p++)
-	{
-	  func_names(i) = p->first;
-	  file_names(i) = p->second;
-
-	  i++;
-	}
-
-      Octave_map m;
-
-      m.assign ("function", func_names);
-      m.assign ("file", file_names);
-
-      retval = m;
-    }
-  else if (nargin == 2)
-    {
-      string_vector argv = args.make_argv ("autoload");
-
-      if (! error_state)
-        {
-	  std::string nm = argv[2];
-
-	  if (! octave_env::absolute_pathname (nm))
-	    {
-	      octave_user_code *fcn = octave_call_stack::caller_user_code ();
-
-	      bool found = false;
-
-	      if (fcn)
-		{
-		  std::string fname = fcn->fcn_file_name ();
-
-		  if (! fname.empty ())
-		    {
-		      fname = octave_env::make_absolute (fname, octave_env::getcwd ());
-		      fname = fname.substr (0, fname.find_last_of (file_ops::dir_sep_str ()) + 1);
-
-		      file_stat fs (fname + nm);
-
-		      if (fs.exists ())
-			{
-			  nm = fname + nm;
-			  found = true;
-			}
-		    }
-		}
-	      if (! found)
-		warning_with_id ("Octave:autoload-relative-file-name",
-				 "autoload: `%s' is not an absolute file name",
-				 nm.c_str ());
-	    }
-	  autoload_map[argv[1]] = nm;
-	}
-    }
-  else
-    print_usage ();
-
-  return retval;
-}
-
-void
-source_file (const std::string& file_name, const std::string& context,
-	     bool verbose, bool require_file, const std::string& warn_for)
-{
-  std::string file_full_name = file_ops::tilde_expand (file_name);
-
-  unwind_protect::frame_id_t uwp_frame = unwind_protect::begin_frame ();
-
-  unwind_protect::protect_var (curr_fcn_file_name);
-  unwind_protect::protect_var (curr_fcn_file_full_name);
-
-  curr_fcn_file_name = file_name;
-  curr_fcn_file_full_name = file_full_name;
-
-  if (! context.empty ())
-    {
-      if (context == "caller")
-	octave_call_stack::goto_caller_frame ();
-      else if (context == "base")
-	octave_call_stack::goto_base_frame ();
-      else
-	error ("source: context must be \"caller\" or \"base\"");
-
-      if (! error_state)
-	unwind_protect::add_fcn (octave_call_stack::pop);
-    }      
-
-  if (! error_state)
-    {
-      octave_function *fcn = parse_fcn_file (file_full_name, "", true,
-					     require_file, warn_for);
-
-      if (! error_state)
-	{
-	  if (fcn && fcn->is_user_script ())
-	    {
-	      octave_value_list args;
-
-	      if (verbose)
-		{
-		  std::cout << "executing commands from " << file_full_name << " ... ";
-		  reading_startup_message_printed = true;
-		  std::cout.flush ();
-		}
-
-	      fcn->do_multi_index_op (0, args);
-
-	      if (verbose)
-		std::cout << "done." << std::endl;
-
-	      delete fcn;
-	    }
-	}
-      else
-	error ("source: error sourcing file `%s'",
-	       file_full_name.c_str ());
-    }
-
-  unwind_protect::run_frame (uwp_frame);
-}
-
-DEFUN (mfilename, args, ,
-  "-*- texinfo -*-\n\
-@deftypefn {Built-in Function} {} mfilename ()\n\
-@deftypefnx {Built-in Function} {} mfilename (@code{\"fullpath\"})\n\
-@deftypefnx {Built-in Function} {} mfilename (@code{\"fullpathext\"})\n\
-Return the name of the currently executing file.  At the top-level,\n\
-return the empty string.  Given the argument @code{\"fullpath\"},\n\
-include the directory part of the file name, but not the extension.\n\
-Given the argument @code{\"fullpathext\"}, include the directory part\n\
-of the file name and the extension.\n\
-@end deftypefn")
-{
-  octave_value retval;
-
-  int nargin = args.length ();
-
-  if (nargin > 1)
-    {
-      print_usage ();
-      return retval;
-    }
-
-  std::string arg;
-
-  if (nargin == 1)
-    {
-      arg = args(0).string_value ();
-
-      if (error_state)
-	{
-	  error ("mfilename: expecting argument to be a character string");
-	  return retval;
-	}
-    }
-
-  std::string fname;
-
-  octave_user_code *fcn = octave_call_stack::caller_user_code ();
-
-  if (fcn)
-    {
-      fname = fcn->fcn_file_name ();
-
-      if (fname.empty ())
-        fname = fcn->name ();
-    }
-
-  if (arg == "fullpathext")
-    retval = fname;
-  else
-    {
-      size_t dpos = fname.rfind (file_ops::dir_sep_char ());
-      size_t epos = fname.rfind ('.');
-
-      if (epos <= dpos)
-        epos = std::string::npos;
-
-      fname = (epos != std::string::npos) ? fname.substr (0, epos) : fname;
-
-      if (arg == "fullpath")
-	retval = fname;
-      else
-        retval = (dpos != std::string::npos) ? fname.substr (dpos+1) : fname;
-    }
-
-  return retval;
-}
-
-
-DEFUN (source, args, ,
-  "-*- texinfo -*-\n\
-@deftypefn {Built-in Function} {} source (@var{file})\n\
-Parse and execute the contents of @var{file}.  This is equivalent to\n\
-executing commands from a script file, but without requiring the file to\n\
-be named @file{@var{file}.m}.\n\
-@end deftypefn")
-{
-  octave_value_list retval;
-
-  int nargin = args.length ();
-
-  if (nargin == 1 || nargin == 2)
-    {
-      std::string file_name = args(0).string_value ();
-
-      if (! error_state)
-	{
-	  std::string context;
-
-	  if (nargin == 2)
-	    context = args(1).string_value ();
-
-	  if (! error_state)
-	    source_file (file_name, context);
-	  else
-	    error ("source: expecting context to be character string");
-	}
-      else
-	error ("source: expecting file name as argument");
-    }
-  else
-    print_usage ();
-
-  return retval;
-}
-
-// Evaluate an Octave function (built-in or interpreted) and return
-// the list of result values.  NAME is the name of the function to
-// call.  ARGS are the arguments to the function.  NARGOUT is the
-// number of output arguments expected. 
-
-octave_value_list
-feval (const std::string& name, const octave_value_list& args, int nargout)
-{
-  octave_value_list retval;
-
-  octave_value fcn = symbol_table::find_function (name, args);
-
-  if (fcn.is_defined ())
-    retval = fcn.do_multi_index_op (nargout, args);
-  else
-    error ("feval: function `%s' not found", name.c_str ());
-
-  return retval;
-}
-
-octave_value_list
-feval (octave_function *fcn, const octave_value_list& args, int nargout)
-{
-  octave_value_list retval;
-
-  if (fcn)
-    retval = fcn->do_multi_index_op (nargout, args);
-
-  return retval;
-}
-
-static octave_value_list
-get_feval_args (const octave_value_list& args)
-{
-  int tmp_nargin = args.length () - 1;
-
-  octave_value_list retval (tmp_nargin, octave_value ());
-
-  for (int i = 0; i < tmp_nargin; i++)
-    retval(i) = args(i+1);
-
-  string_vector arg_names = args.name_tags ();
-
-  if (! arg_names.empty ())
-    {
-      // tmp_nargin and arg_names.length () - 1 may differ if
-      // we are passed all_va_args.
-
-      int n = arg_names.length () - 1;
-
-      int len = n > tmp_nargin ? tmp_nargin : n;
-
-      string_vector tmp_arg_names (len);
-
-      for (int i = 0; i < len; i++)
-	tmp_arg_names(i) = arg_names(i+1);
-
-      retval.stash_name_tags (tmp_arg_names);
-    }
-
-  return retval;
-}
-
-
-// Evaluate an Octave function (built-in or interpreted) and return
-// the list of result values.  The first element of ARGS should be a
-// string containing the name of the function to call, then the rest
-// are the actual arguments to the function.  NARGOUT is the number of
-// output arguments expected.
-
-octave_value_list
-feval (const octave_value_list& args, int nargout)
-{
-  octave_value_list retval;
-
-  int nargin = args.length ();
-
-  if (nargin > 0)
-    {
-      octave_value f_arg = args(0);
-
-      if (f_arg.is_string ())
-        {
-	  std::string name = f_arg.string_value ();
-
-	  if (! error_state)
-	    {
-	      octave_value_list tmp_args = get_feval_args (args);
-
-	      retval = feval (name, tmp_args, nargout);
-	    }
-	}
-      else
-	{
-	  octave_function *fcn = f_arg.function_value ();
-
-	  if (fcn)
-	    {
-	      octave_value_list tmp_args = get_feval_args (args);
-
-	      retval = feval (fcn, tmp_args, nargout);
-	    }
-	}
-    }
-
-  return retval;
-}
-
-DEFUN (feval, args, nargout,
-  "-*- texinfo -*-\n\
-@deftypefn {Built-in Function} {} feval (@var{name}, @dots{})\n\
-Evaluate the function named @var{name}.  Any arguments after the first\n\
-are passed on to the named function.  For example,\n\
-\n\
-@example\n\
-feval (\"acos\", -1)\n\
-     @result{} 3.1416\n\
-@end example\n\
-\n\
-@noindent\n\
-calls the function @code{acos} with the argument @samp{-1}.\n\
-\n\
-The function @code{feval} is necessary in order to be able to write\n\
-functions that call user-supplied functions, because Octave does not\n\
-have a way to declare a pointer to a function (like C) or to declare a\n\
-special kind of variable that can be used to hold the name of a function\n\
-(like @code{EXTERNAL} in Fortran).  Instead, you must refer to functions\n\
-by name, and use @code{feval} to call them.\n\
-@end deftypefn")
-{
-  octave_value_list retval;
-
-  int nargin = args.length ();
-
-  if (nargin > 0)
-    retval = feval (args, nargout);
-  else
-    print_usage ();
-
-  return retval;
-}
-
-octave_value_list
-eval_string (const std::string& s, bool silent, int& parse_status, int nargout)
-{
-  octave_value_list retval;
-
-  unwind_protect::frame_id_t uwp_frame = unwind_protect::begin_frame ();
-
-  unwind_protect::protect_var (input_line_number);
-  unwind_protect::protect_var (current_input_column);
-  unwind_protect::protect_var (get_input_from_eval_string);
-  unwind_protect::protect_var (input_from_eval_string_pending);
-  unwind_protect::protect_var (parser_end_of_input);
-  unwind_protect::protect_var (line_editing);
-  unwind_protect::protect_var (current_eval_string);
-  unwind_protect::protect_var (current_function_depth);
-  unwind_protect::protect_var (max_function_depth);
-  unwind_protect::protect_var (parsing_subfunctions);
-  unwind_protect::protect_var (endfunction_found);
-
-  input_line_number = 1;
-  current_input_column = 1;
-  get_input_from_eval_string = true;
-  input_from_eval_string_pending = true;
-  parser_end_of_input = false;
-  line_editing = false;
-  current_function_depth = 0;
-  max_function_depth = 0;
-  parsing_subfunctions = false;
-  endfunction_found = false;
-
-  current_eval_string = s;
-
-  YY_BUFFER_STATE old_buf = current_buffer ();
-  YY_BUFFER_STATE new_buf = create_buffer (0);
-
-  unwind_protect::add_fcn (switch_to_buffer, old_buf);
-  unwind_protect::add_fcn (delete_buffer, new_buf);
-
-  switch_to_buffer (new_buf);
-
-  do
-    {
-      reset_parser ();
-
-      unwind_protect::protect_var (global_command);
-
-      // Do this with an unwind-protect cleanup function so that the
-      // forced variables will be unmarked in the event of an
-      // interrupt.
-      symbol_table::scope_id scope = symbol_table::top_scope ();
-      unwind_protect::add_fcn (symbol_table::unmark_forced_variables, scope);
-
-      parse_status = yyparse ();
-
-      tree_statement_list *command_list = global_command;
-
-      // Unmark forced variables.
-      unwind_protect::run ();
-
-      // Restore previous value of global_command.
-      unwind_protect::run ();
-
-      if (parse_status == 0)
-        {
-	  if (command_list)
-	    {
-	      tree_statement *stmt = 0;
-
-	      if (command_list->length () == 1
-		  && (stmt = command_list->front ())
-		  && stmt->is_expression ())
-		{
-		  tree_expression *expr = stmt->expression ();
-
-		  if (silent)
-		    expr->set_print_flag (false);
-
-		  bool do_bind_ans = false;
-
-		  if (expr->is_identifier ())
-		    {
-		      tree_identifier *id
-			= dynamic_cast<tree_identifier *> (expr);
-
-		      do_bind_ans = (! id->is_variable ());
-		    }
-		  else
-		    do_bind_ans = (! expr->is_assignment_expression ());
-
-		  retval = expr->rvalue (nargout);
-
-		  if (do_bind_ans && ! (error_state || retval.empty ()))
-		    bind_ans (retval(0), expr->print_result ());
-
-		  if (nargout == 0)
-		    retval = octave_value_list ();
-		}
-	      else if (nargout == 0)
-		command_list->accept (*current_evaluator);
-	      else
-		error ("eval: invalid use of statement list");
-
-	      delete command_list;
-
-	      command_list = 0;
-
-	      if (error_state
-		  || tree_return_command::returning
-		  || tree_break_command::breaking
-		  || tree_continue_command::continuing)
-		break;
-	    }
-	  else if (parser_end_of_input)
-	    break;
-        }
-    }
-  while (parse_status == 0);
-
-  unwind_protect::run_frame (uwp_frame);
-
-  return retval;
-}
-
-octave_value
-eval_string (const std::string& s, bool silent, int& parse_status)
-{
-  octave_value retval;
-
-  octave_value_list tmp = eval_string (s, silent, parse_status, 1);
-
-  if (! tmp.empty ())
-    retval = tmp(0);
-
-  return retval;
-}
-
-static octave_value_list
-eval_string (const octave_value& arg, bool silent, int& parse_status,
-	     int nargout)
-{
-  std::string s = arg.string_value ();
-
-  if (error_state)
-    {
-      error ("eval: expecting std::string argument");
-      return octave_value (-1);
-    }
-
-  return eval_string (s, silent, parse_status, nargout);
-}
-
-DEFUN (eval, args, nargout,
-  "-*- texinfo -*-\n\
-@deftypefn {Built-in Function} {} eval (@var{try}, @var{catch})\n\
-Parse the string @var{try} and evaluate it as if it were an Octave\n\
-program.  If that fails, evaluate the optional string @var{catch}.\n\
-The string @var{try} is evaluated in the current context,\n\
-so any results remain available after @code{eval} returns.\n\
-\n\
-The following example makes the variable @var{a} with the approximate\n\
-value 3.1416 available.\n\
-\n\
-@example\n\
-eval(\"a = acos(-1);\");\n\
-@end example\n\
-\n\
-If an error occurs during the evaluation of @var{try} the @var{catch}\n\
-string is evaluated, as the following example shows:\n\
-\n\
-@example\n\
-eval ('error (\"This is a bad example\");',\n\
-      'printf (\"This error occurred:\\n%s\\n\", lasterr ());');\n\
-     @print{} This error occurred:\n\
-        This is a bad example\n\
-@end example\n\
-@end deftypefn")
-{
-  octave_value_list retval;
-
-  int nargin = args.length ();
-
-  if (nargin > 0)
-    {
-      unwind_protect::frame_id_t uwp_frame = unwind_protect::begin_frame ();
-
-      if (nargin > 1)
-	{
-	  unwind_protect::protect_var (buffer_error_messages);
-	  buffer_error_messages++;
-	}
-
-      int parse_status = 0;
-
-      octave_value_list tmp = eval_string (args(0), nargout > 0,
-					   parse_status, nargout);
-
-      if (nargin > 1 && (parse_status != 0 || error_state))
-	{
-	  error_state = 0;
-
-	  // Set up for letting the user print any messages from
-	  // errors that occurred in the first part of this eval().
-
-	  buffer_error_messages--;
-
-	  tmp = eval_string (args(1), nargout > 0, parse_status, nargout);
-
-	  if (nargout > 0)
-	    retval = tmp;
-	}
-      else if (nargout > 0)
-	retval = tmp;
-
-      unwind_protect::run_frame (uwp_frame);
-    }
-  else
-    print_usage ();
-
-  return retval;
-}
-
-/*
-
-%% test/octave.test/eval/eval-1.m
-%!#test
-%! x = 1;
-%! assert(eval ("x"),1);
-
-%% test/octave.test/eval/eval-2.m
-%!test
-%! x = 1;
-%! assert(eval ("x;"));
-
-%% test/octave.test/eval/eval-3.m
-%!test
-%! x = 1;
-%! assert(eval ("x;"),1);
-
-%% FIXME
-%% Disable this test as adding the ";" is redundant with eval-1 and
-%% in any case is a syntax error with assert
-%% test/octave.test/eval/eval-4.m
-%!#test
-%! x = 1;
-%! assert(eval ("x");,1);
-
-%% test/octave.test/eval/eval-5.m
-%!test
-%! eval ("flipud = 2;");
-%! assert(flipud,2);
-
-%% test/octave.test/eval/eval-6.m
-%!function y = f ()
-%!  eval ("flipud = 2;");
-%!  y = flipud;
-%!test
-%! assert(f,2);
-
-%% test/octave.test/eval/eval-7.m
-%!#test
-%! eval ("x = 1");
-%! assert(x,1);
-
-%% test/octave.test/eval/eval-8.m
-%!test
-%! eval ("x = 1;")
-%! assert(x,1);
-
-%% test/octave.test/eval/eval-9.m
-%!test
-%! eval ("x = 1;");
-%! assert(x,1);
-
-%% test/octave.test/eval/eval-10.m
-%!#test
-%! eval ("x = 1")
-%! assert(x,1);
-
-%% test/octave.test/eval/eval-11.m
-%!test
-%! x = 1;
-%! y = eval ("x");
-%! assert(y,1);
-
-%% test/octave.test/eval/eval-12.m
-%!test
-%! x = 1;
-%! y = eval ("x;");
-%! assert(y,1);
-
-%% test/octave.test/eval/eval-13.m
-%!test
-%! x = 1;
-%! y = eval ("x;");
-%! assert(y,1);
-
-%% test/octave.test/eval/eval-14.m
-%!test
-%! x = 1;
-%! y = eval ("x");
-%! assert(y,1);
-
-*/
-
-DEFUN (assignin, args, ,
-  "-*- texinfo -*-\n\
-@deftypefn {Built-in Function} {} assignin (@var{context}, @var{varname}, @var{value})\n\
-Assign @var{value} to @var{varname} in context @var{context}, which\n\
-may be either @code{\"base\"} or @code{\"caller\"}.\n\
-@end deftypefn")
-{
-  octave_value_list retval;
-
-  int nargin = args.length ();
-
-  if (nargin == 3)
-    {
-      std::string context = args(0).string_value ();
-
-      if (! error_state)
-        {
-	  unwind_protect::frame_id_t uwp_frame = unwind_protect::begin_frame ();
-
-	  if (context == "caller")
-	    octave_call_stack::goto_caller_frame ();
-	  else if (context == "base")
-	    octave_call_stack::goto_base_frame ();
-	  else
-	    error ("assignin: context must be \"caller\" or \"base\"");
-
-	  if (! error_state)
-	    {
-	      unwind_protect::add_fcn (octave_call_stack::pop);
-
-	      std::string nm = args(1).string_value ();
-
-	      if (! error_state)
-		{
-		  if (valid_identifier (nm))
-		    symbol_table::varref (nm) = args(2);
-		  else
-		    error ("assignin: invalid variable name");
-		}
-	      else
-		error ("assignin: expecting variable name as second argument");
-	    }
-
-	  unwind_protect::run_frame (uwp_frame);
-	}
-      else
-        error ("assignin: expecting string as first argument");
-    }
-  else
-    print_usage ();
-
-  return retval;
-}
-
-DEFUN (evalin, args, nargout,
-  "-*- texinfo -*-\n\
-@deftypefn {Built-in Function} {} evalin (@var{context}, @var{try}, @var{catch})\n\
-Like @code{eval}, except that the expressions are evaluated in the\n\
-context @var{context}, which may be either @code{\"caller\"} or\n\
-@code{\"base\"}.\n\
-@end deftypefn")
-{
-  octave_value_list retval;
-
-  int nargin = args.length ();
-
-  if (nargin > 1)
-    {
-      std::string context = args(0).string_value ();
-
-      if (! error_state)
-        {
-	  unwind_protect::frame_id_t uwp_frame = unwind_protect::begin_frame ();
-
-	  if (context == "caller")
-	    octave_call_stack::goto_caller_frame ();
-	  else if (context == "base")
-	    octave_call_stack::goto_base_frame ();
-	  else
-	    error ("evalin: context must be \"caller\" or \"base\"");
-
-	  if (! error_state)
-	    {
-	      unwind_protect::add_fcn (octave_call_stack::pop);
-
-	      if (nargin > 2)
-	        {
-		  unwind_protect::protect_var (buffer_error_messages);
-		  buffer_error_messages++;
-		}
-
-	      int parse_status = 0;
-
-	      octave_value_list tmp = eval_string (args(1), nargout > 0,
-						   parse_status, nargout);
-
-	      if (nargout > 0)
-		retval = tmp;
-
-	      if (nargin > 2 && (parse_status != 0 || error_state))
-		{
-		  error_state = 0;
-
-		  // Set up for letting the user print any messages from
-		  // errors that occurred in the first part of this eval().
-
-		  buffer_error_messages--;
-
-		  tmp = eval_string (args(2), nargout > 0,
-				     parse_status, nargout);
-
-		  retval = (nargout > 0) ? tmp : octave_value_list ();
-		}
-	    }
-
-	  unwind_protect::run_frame (uwp_frame);
-	}
-      else
-        error ("evalin: expecting string as first argument");
-    }
-  else
-    print_usage ();
-
-  return retval;
-}
-
-DEFUN (__parser_debug_flag__, args, nargout,
-  "-*- texinfo -*-\n\
-@deftypefn {Built-in Function} {@var{old_val} =} __parser_debug_flag__ (@var{new_val}))\n\
-Undocumented internal function.\n\
-@end deftypefn")
-{
-  octave_value retval;
-
-  bool debug_flag = octave_debug;
-
-  retval = set_internal_variable (debug_flag, args, nargout,
-           			  "__parser_debug_flag__");
-
-  octave_debug = debug_flag;
-
-  return retval;
-}
-
-/*
-;;; Local Variables: ***
-;;; mode: text ***
-;;; End: ***
-*/
--- a/src/toplev.cc	Tue Nov 10 13:25:57 2009 -0500
+++ b/src/toplev.cc	Tue Nov 10 15:02:25 2009 -0500
@@ -1262,6 +1262,7 @@
       { false, "HDF5_LDFLAGS", OCTAVE_CONF_HDF5_LDFLAGS },
       { false, "HDF5_LIBS", OCTAVE_CONF_HDF5_LIBS },
       { false, "INCFLAGS", OCTAVE_CONF_INCFLAGS },
+      { false, "LAPACK_LIBS", OCTAVE_CONF_LAPACK_LIBS },
       { false, "LDFLAGS", OCTAVE_CONF_LDFLAGS },
       { false, "LD_CXX", OCTAVE_CONF_LD_CXX },
       { false, "LD_STATIC_FLAG", OCTAVE_CONF_LD_STATIC_FLAG },
--- a/src/version.h	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,99 +0,0 @@
-/*
-
-Copyright (C) 1992, 1993, 1994, 1996, 1997, 1998, 1999, 2000, 2001,
-              2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
-              John W. Eaton
-
-This file is part of Octave.
-
-Octave is free software; you can redistribute it and/or modify it
-under the terms of the GNU General Public License as published by the
-Free Software Foundation; either version 3 of the License, or (at your
-option) any later version.
-
-Octave is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License
-along with Octave; see the file COPYING.  If not, see
-<http://www.gnu.org/licenses/>.
-
-*/
-
-#if !defined (octave_version_h)
-#define octave_version_h 1
-
-#define OCTAVE_VERSION "3.3.50+"
-
-#define OCTAVE_API_VERSION "api-v38+"
-
-#define OCTAVE_RELEASE_DATE "2009-09-12n"
-
-#define OCTAVE_COPYRIGHT "Copyright (C) 2009 John W. Eaton and others."
-
-// This is the first line printed by --version.  The GNU coding
-// standards say that the version number should follow the last space
-// on the line.
-
-#define OCTAVE_NAME_AND_VERSION "GNU Octave, version " OCTAVE_VERSION
-
-#define OCTAVE_CONFIG_STATEMENT \
-  "Octave was configured for \"" OCTAVE_CANONICAL_HOST_TYPE "\"."
-
-#define OCTAVE_COPYING_STATEMENT \
-  "This is free software; see the source code for copying conditions."
-
-#define X_OCTAVE_WARRANTY_STATEMENT(ARG) \
-  "There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or\n\
-FITNESS FOR A PARTICULAR PURPOSE." ARG
-
-#define OCTAVE_WARRANTY_STATEMENT \
-  X_OCTAVE_WARRANTY_STATEMENT ("")
-
-#define OCTAVE_WWW_STATEMENT \
-  "Additional information about Octave is available at http://www.octave.org."
-
-#define OCTAVE_CONTRIB_STATEMENT \
-  "Please contribute if you find this software useful.\n\
-For more information, visit http://www.octave.org/help-wanted.html"
-
-#define OCTAVE_BUGS_STATEMENT \
-  "Report bugs to <bug@octave.org> (but first, please read\n\
-http://www.octave.org/bugs.html to learn how to write a helpful report)."
-
-#define OCTAVE_NAME_VERSION_AND_COPYRIGHT \
-  OCTAVE_NAME_AND_VERSION "\n" \
-  OCTAVE_COPYRIGHT
-
-#define OCTAVE_NAME_VERSION_COPYRIGHT_COPYING_AND_WARRANTY \
-  X_OCTAVE_NAME_VERSION_COPYRIGHT_COPYING_AND_WARRANTY("") \
-
-#define X_OCTAVE_NAME_VERSION_COPYRIGHT_COPYING_AND_WARRANTY(ARG) \
-  OCTAVE_NAME_VERSION_AND_COPYRIGHT "\n" \
-  OCTAVE_COPYING_STATEMENT "\n" \
-  X_OCTAVE_WARRANTY_STATEMENT (ARG) "\n\n" \
-  OCTAVE_CONFIG_STATEMENT
-
-#define X_OCTAVE_NAME_VERSION_COPYRIGHT_COPYING_WARRANTY_AND_BUGS(ARG) \
-  X_OCTAVE_NAME_VERSION_COPYRIGHT_COPYING_AND_WARRANTY(ARG) "\n\n" \
-  OCTAVE_WWW_STATEMENT "\n\n" \
-  OCTAVE_CONTRIB_STATEMENT "\n\n" \
-  OCTAVE_BUGS_STATEMENT
-
-#define OCTAVE_NAME_VERSION_COPYRIGHT_COPYING_WARRANTY_AND_BUGS \
-  X_OCTAVE_NAME_VERSION_COPYRIGHT_COPYING_WARRANTY_AND_BUGS ("")
-
-#define OCTAVE_STARTUP_MESSAGE \
-  X_OCTAVE_NAME_VERSION_COPYRIGHT_COPYING_WARRANTY_AND_BUGS \
-    ("  For details, type `warranty'.") "\n\n" \
-  "For information about changes from previous versions, type `news'."
-
-#endif
-
-/*
-;;; Local Variables: ***
-;;; mode: C++ ***
-;;; End: ***
-*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/version.h.in	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,99 @@
+/*
+
+Copyright (C) 1992, 1993, 1994, 1996, 1997, 1998, 1999, 2000, 2001,
+              2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+              John W. Eaton
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, see
+<http://www.gnu.org/licenses/>.
+
+*/
+
+#if !defined (octave_version_h)
+#define octave_version_h 1
+
+#define OCTAVE_VERSION "@OCTAVE_VERSION@"
+
+#define OCTAVE_API_VERSION "@OCTAVE_API_VERSION@"
+
+#define OCTAVE_RELEASE_DATE "@OCTAVE_RELEASE_DATE@"
+
+#define OCTAVE_COPYRIGHT "@OCTAVE_COPYRIGHT@"
+
+// This is the first line printed by --version.  The GNU coding
+// standards say that the version number should follow the last space
+// on the line.
+
+#define OCTAVE_NAME_AND_VERSION "GNU Octave, version " OCTAVE_VERSION
+
+#define OCTAVE_CONFIG_STATEMENT \
+  "Octave was configured for \"" OCTAVE_CANONICAL_HOST_TYPE "\"."
+
+#define OCTAVE_COPYING_STATEMENT \
+  "This is free software; see the source code for copying conditions."
+
+#define X_OCTAVE_WARRANTY_STATEMENT(ARG) \
+  "There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or\n\
+FITNESS FOR A PARTICULAR PURPOSE." ARG
+
+#define OCTAVE_WARRANTY_STATEMENT \
+  X_OCTAVE_WARRANTY_STATEMENT ("")
+
+#define OCTAVE_WWW_STATEMENT \
+  "Additional information about Octave is available at http://www.octave.org."
+
+#define OCTAVE_CONTRIB_STATEMENT \
+  "Please contribute if you find this software useful.\n\
+For more information, visit http://www.octave.org/help-wanted.html"
+
+#define OCTAVE_BUGS_STATEMENT \
+  "Report bugs to <bug@octave.org> (but first, please read\n\
+http://www.octave.org/bugs.html to learn how to write a helpful report)."
+
+#define OCTAVE_NAME_VERSION_AND_COPYRIGHT \
+  OCTAVE_NAME_AND_VERSION "\n" \
+  OCTAVE_COPYRIGHT
+
+#define OCTAVE_NAME_VERSION_COPYRIGHT_COPYING_AND_WARRANTY \
+  X_OCTAVE_NAME_VERSION_COPYRIGHT_COPYING_AND_WARRANTY("") \
+
+#define X_OCTAVE_NAME_VERSION_COPYRIGHT_COPYING_AND_WARRANTY(ARG) \
+  OCTAVE_NAME_VERSION_AND_COPYRIGHT "\n" \
+  OCTAVE_COPYING_STATEMENT "\n" \
+  X_OCTAVE_WARRANTY_STATEMENT (ARG) "\n\n" \
+  OCTAVE_CONFIG_STATEMENT
+
+#define X_OCTAVE_NAME_VERSION_COPYRIGHT_COPYING_WARRANTY_AND_BUGS(ARG) \
+  X_OCTAVE_NAME_VERSION_COPYRIGHT_COPYING_AND_WARRANTY(ARG) "\n\n" \
+  OCTAVE_WWW_STATEMENT "\n\n" \
+  OCTAVE_CONTRIB_STATEMENT "\n\n" \
+  OCTAVE_BUGS_STATEMENT
+
+#define OCTAVE_NAME_VERSION_COPYRIGHT_COPYING_WARRANTY_AND_BUGS \
+  X_OCTAVE_NAME_VERSION_COPYRIGHT_COPYING_WARRANTY_AND_BUGS ("")
+
+#define OCTAVE_STARTUP_MESSAGE \
+  X_OCTAVE_NAME_VERSION_COPYRIGHT_COPYING_WARRANTY_AND_BUGS \
+    ("  For details, type `warranty'.") "\n\n" \
+  "For information about changes from previous versions, type `news'."
+
+#endif
+
+/*
+;;; Local Variables: ***
+;;; mode: C++ ***
+;;; End: ***
+*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/@Blork/module.mk	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,10 @@
+FCN_FILE_DIRS += @Blork
+
+at_Blork_FCN_FILES = \
+  @Blork/Blork.m \
+  @Blork/bleek.m \
+  @Blork/display.m \
+  @Blork/get.m \
+  @Blork/set.m
+
+FCN_FILES += $(at_Blork_FCN_FILES)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/@Cork/module.mk	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,10 @@
+FCN_FILE_DIRS += @Cork
+
+at_Cork_FCN_FILES = \
+  @Cork/Cork.m \
+  @Cork/click.m \
+  @Cork/display.m \
+  @Cork/get.m \
+  @Cork/set.m
+
+FCN_FILES += $(at_Cork_FCN_FILES)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/@Dork/module.mk	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,12 @@
+FCN_FILE_DIRS += @Dork
+
+at_Dork_FCN_FILES = \
+  @Dork/Dork.m \
+  @Dork/bling.m \
+  @Dork/display.m \
+  @Dork/gack.m \
+  @Dork/get.m \
+  @Dork/getStash.m \
+  @Dork/set.m
+
+FCN_FILES += $(at_Dork_FCN_FILES)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/@Gork/module.mk	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,13 @@
+FCN_FILE_DIRS += @Gork
+
+at_Gork_FCN_FILES = \
+  @Gork/Gork.m \
+  @Gork/cork.m \
+  @Gork/display.m \
+  @Gork/gark.m \
+  @Gork/get.m \
+  @Gork/set.m \
+  @Gork/subsasgn.m \
+  @Gork/subsref.m
+
+FCN_FILES += $(at_Gork_FCN_FILES)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/@Pork/module.mk	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,11 @@
+FCN_FILE_DIRS += @Pork
+
+at_Pork_FCN_FILES = \
+  @Pork/Pork.m \
+  @Pork/bling.m \
+  @Pork/display.m \
+  @Pork/get.m \
+  @Pork/gurk.m \
+  @Pork/set.m
+
+FCN_FILES += $(at_Pork_FCN_FILES)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/@Sneetch/module.mk	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,7 @@
+FCN_FILE_DIRS += @Sneetch
+
+at_Sneetch_FCN_FILES = \
+  @Sneetch/Sneetch.m \
+  @Sneetch/display.m
+
+FCN_FILES += $(at_Sneetch_FCN_FILES)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/@Snork/module.mk	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,18 @@
+FCN_FILE_DIRS += @Snork
+
+at_Snork_FCN_FILES = \
+  @Snork/Snork.m \
+  @Snork/cack.m \
+  @Snork/display.m \
+  @Snork/end.m \
+  @Snork/get.m \
+  @Snork/getStash.m \
+  @Snork/gick.m \
+  @Snork/loadobj.m \
+  @Snork/saveobj.m \
+  @Snork/set.m \
+  @Snork/subsasgn.m \
+  @Snork/subsindex.m \
+  @Snork/subsref.m
+
+FCN_FILES += $(at_Snork_FCN_FILES)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/@Spork/module.mk	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,14 @@
+FCN_FILE_DIRS += @Spork
+
+at_Spork_FCN_FILES = \
+  @Spork/Spork.m \
+  @Spork/cack.m \
+  @Spork/display.m \
+  @Spork/geek.m \
+  @Spork/get.m \
+  @Spork/getStash.m \
+  @Spork/loadobj.m \
+  @Spork/saveobj.m \
+  @Spork/set.m
+
+FCN_FILES += $(at_Spork_FCN_FILES)
--- a/test/ChangeLog	Tue Nov 10 13:25:57 2009 -0500
+++ b/test/ChangeLog	Tue Nov 10 15:02:25 2009 -0500
@@ -1,3 +1,10 @@
+2009-11-10  John W. Eaton  <jwe@octave.org>
+
+	* @Blork/module.mk, @Cork/module.mk, @Dork/module.mk,
+	@Gork/module.mk, @Pork/module.mk, @Sneetch/module.mk,
+	@Snork/module.mk, @Spork/module.mk, Makefile.am: New files.
+	* Makefile.in: Delete.
+
 2009-10-19  Rik  <octdev@nomad.inbox5.com>
 
 	* fntests.m: .cc files are now included in the list of files requiring
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/Makefile.am	Tue Nov 10 15:02:25 2009 -0500
@@ -0,0 +1,79 @@
+# Makefile for octave's test directory
+#
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 2001, 2002, 2006, 2007
+#               John W. Eaton
+#
+# This file is part of Octave.
+# 
+# Octave is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation; either version 3 of the License, or (at
+# your option) any later version.
+# 
+# Octave is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with Octave; see the file COPYING.  If not, see
+# <http://www.gnu.org/licenses/>.
+
+TOPDIR = ..
+
+include ../common.mk
+
+FCN_FILE_DIRS =
+
+FCN_FILES = \
+  fntests.m \
+  test_args.m \
+  test_classes.m \
+  test_contin.m \
+  test_diag_perm.m \
+  test_error.m \
+  test_eval-catch.m \
+  test_for.m \
+  test_func.m \
+  test_global.m \
+  test_if.m \
+  test_index-wfi-f.m \
+  test_index-wfi-t.m \
+  test_io.m \
+  test_logical-wfi-f.m \
+  test_logical-wfi-t.m \
+  test_null_assign.m \
+  test_prefer.m \
+  test_range.m \
+  test_recursion.m \
+  test_return.m \
+  test_slice.m \
+  test_string.m \
+  test_struct.m \
+  test_switch.m \
+  test_system.m \
+  test_transpose.m \
+  test_try.m \
+  test_unwind.m \
+  test_while.m
+
+include @Blork/module.mk
+include @Cork/module.mk
+include @Dork/module.mk
+include @Gork/module.mk
+include @Pork/module.mk
+include @Sneetch/module.mk
+include @Snork/module.mk
+include @Spork/module.mk
+
+EXTRA_DIST = \
+  ChangeLog \
+  build_sparse_tests.sh \
+  $(FCN_FILES)
+
+check: test_sparse.m
+	../run-octave --norc --silent --no-history $(srcdir)/fntests.m $(srcdir)
+.PHONY: check
+
+test_sparse.m: build_sparse_tests.sh
+	$(srcdir)/build_sparse_tests.sh
--- a/test/Makefile.in	Tue Nov 10 13:25:57 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,86 +0,0 @@
-# Makefile for octave's test directory
-#
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 2001, 2002, 2006, 2007
-#               John W. Eaton
-#
-# This file is part of Octave.
-# 
-# Octave is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 3 of the License, or (at
-# your option) any later version.
-# 
-# Octave is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with Octave; see the file COPYING.  If not, see
-# <http://www.gnu.org/licenses/>.
-
-TOPDIR = ..
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-
-include $(TOPDIR)/Makeconf
-
-SOURCES = $(wildcard $(srcdir)/test_*.m)
-
-DISTFILES = $(addprefix $(srcdir)/, ChangeLog Makefile.in \
-	build_sparse_tests.sh fntests.m) $(SOURCES)
-
-OCTAVE_BINARY = ../src/octave
-
-ifeq ($(SHARED_LIBS), true)
-  OCTAVE_LD_LIBRARY_PATH = `pwd`/../src:`pwd`/../liboctave:`pwd`/../libcruft
-  ifeq ($(@library_path_var@),)
-    XLD_LIBRARY_PATH = $(OCTAVE_LD_LIBRARY_PATH)
-  else
-    XLD_LIBRARY_PATH = $(OCTAVE_LD_LIBRARY_PATH):$(@library_path_var@)
-  endif
-  SET_LD_LIBRARY_PATH = @library_path_var@="$(XLD_LIBRARY_PATH)"
-endif
-
-all: check
-.PHONY: all
-
-check: test_sparse.m
-	../run-octave --norc --silent --no-history $(srcdir)/fntests.m $(srcdir)
-.PHONY: check
-
-test_sparse.m: build_sparse_tests.sh
-	$(srcdir)/build_sparse_tests.sh
-
-install install-strip: all
-.PHONY: install install-strip
-
-uninstall:
-.PHONY: uninstall
-
-tags: $(SOURCES)
-	ctags $(SOURCES)
-
-TAGS: $(SOURCES)
-	etags $(SOURCES)
-
-clean:
-	rm -f fntests.log a.wav
-.PHONY: clean
-
-mostlyclean:
-.PHONY: mostlyclean
-
-distclean: clean
-	rm -f Makefile test_sparse.m
-.PHONY: distclean
-
-maintainer-clean: distclean
-	rm -f tags TAGS
-.PHONY: maintainer-clean
-
-dist:
-	ln $(DISTFILES) ../`cat ../.fname`/test
-.PHONY: dist