Mercurial > hg > octave-lyh
changeset 6087:700e121edb94
[project @ 2006-10-25 19:03:12 by jwe]
author | jwe |
---|---|
date | Wed, 25 Oct 2006 19:03:13 +0000 |
parents | 4278b170b9f9 |
children | 32ea759ea27e |
files | ChangeLog Makeconf.in configure.in libcruft/ChangeLog libcruft/Makerules.in liboctave/ChangeLog liboctave/Makefile.in scripts/ChangeLog scripts/plot/__gnuplot_version__.m src/ChangeLog src/Makefile.in |
diffstat | 11 files changed, 143 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,20 @@ +2006-10-25 John W. Eaton <jwe@octave.org> + + * configure.in (INCLUDE_DEPS): Set and substitute. + (DEPEND_FLAGS, DEPEND_EXTRA_SED_PATTERN): Rearrange way these are set. + * Makeconf.in (INCLUDE_DEPS): Substitute here, and use to set default + value for omit_deps. + +2006-10-25 Michael Goffioul <michael.goffioul@swing.be> + + * Makeconf.in (ALL_CFLAGS): Include $(XTRA_CDEFS) in the list. + (ALL_CXXFLAGS): Include $(XTRA_CXXDEFS) in the list. + + * configure.in (XTRA_CRUFT_DEFS, XTRA_OCTAVE_DEFS, + XTRA_OCTINTERP_DEFS): Define and substitute. + (AH_BOTTOM) [_MSC_VER]: include definitions for CRUFT_API, + OCTAVE_API, and OCTINTERP_API. + 2006-10-25 John W. Eaton <jwe@octave.org> * mkoctfile.in (OCTAVE_VERSION): No need to quote replacement here.
--- a/Makeconf.in +++ b/Makeconf.in @@ -139,7 +139,7 @@ CPICFLAG = @CPICFLAG@ XTRA_CFLAGS = @XTRA_CFLAGS@ WARN_CFLAGS = @WARN_CFLAGS@ -ALL_CFLAGS = $(INCFLAGS) $(DEFS) $(XTRA_CFLAGS) $(WARN_CFLAGS) $(CFLAGS) +ALL_CFLAGS = $(INCFLAGS) $(XTRA_CDEFS) $(DEFS) $(XTRA_CFLAGS) $(WARN_CFLAGS) $(CFLAGS) BUG_CFLAGS = $(DEFS) $(XTRA_CFLAGS) $(WARN_CFLAGS) $(CFLAGS) BUILD_CC = @BUILD_CC@ @@ -147,6 +147,10 @@ DEPEND_FLAGS = @DEPEND_FLAGS@ DEPEND_EXTRA_SED_PATTERN = @DEPEND_EXTRA_SED_PATTERN@ +INCLUDE_DEPS = @INCLUDE_DEPS@ +ifeq ($(INCLUDE_DEPS),false) + omit_deps = true; +endif CXX = @CXX@ CXX_VERSION = @CXX_VERSION@ @@ -156,7 +160,7 @@ XTRA_CXXFLAGS = @XTRA_CXXFLAGS@ WARN_CXXFLAGS = @WARN_CXXFLAGS@ ALL_CXXFLAGS = \ - $(INCFLAGS) $(DEFS) $(XTRA_CXXFLAGS) $(WARN_CXXFLAGS) $(CXXFLAGS) + $(INCFLAGS) $(XTRA_CXXDEFS) $(DEFS) $(XTRA_CXXFLAGS) $(WARN_CXXFLAGS) $(CXXFLAGS) BUG_CXXFLAGS = $(DEFS) $(XTRA_CXXFLAGS) $(WARN_CXXFLAGS) $(CXXFLAGS) BUILD_CXX = @BUILD_CXX@
--- a/configure.in +++ b/configure.in @@ -29,7 +29,7 @@ EXTERN_CXXFLAGS="$CXXFLAGS" AC_INIT -AC_REVISION($Revision: 1.528 $) +AC_REVISION($Revision: 1.529 $) AC_PREREQ(2.57) AC_CONFIG_SRCDIR([src/octave.cc]) AC_CONFIG_HEADER(config.h) @@ -249,18 +249,23 @@ ### The flag to create dependency varies depending on the compier. # Assume GCC. +INCLUDE_DEPS=true DEPEND_FLAGS="-M" DEPEND_EXTRA_SED_PATTERN="" -case "$canonical_host_type" in - sparc-sun-solaris2* | i386-pc-solaris2*) - if test "$GCC" = yes; then - true - else +if test "$GCC" = yes; then + true +else + case "$canonical_host_type" in + sparc-sun-solaris2* | i386-pc-solaris2*) DEPEND_FLAGS="-xM1" DEPEND_EXTRA_SED_PATTERN="-e '/\/opt\/SUNWspro/d'" - fi - ;; -esac + ;; + *) + INCLUDE_DEPS=false + ;; + esac +fi +AC_SUBST(INCLUDE_DEPS) AC_SUBST(DEPEND_FLAGS) AC_SUBST(DEPEND_EXTRA_SED_PATTERN) @@ -963,6 +968,9 @@ NO_OCT_FILE_STRIP=false TEMPLATE_AR='$(AR)' TEMPLATE_ARFLAGS="$ARFLAGS" +XTRA_CRUFT_DEFS= +XTRA_OCTAVE_DEFS= +XTRA_OCTINTERP_DEFS= library_path_var=LD_LIBRARY_PATH case "$canonical_host_type" in *-*-386bsd* | *-*-openbsd* | *-*-netbsd*) @@ -1019,6 +1027,10 @@ SHLBIN=dll LIBPRE= SH_LDFLAGS="-shared -g" + ## Extra compilation flags. + XTRA_CRUFT_DEFS="-DCRUFT_DLL" + XTRA_OCTAVE_DEFS="-DOCTAVE_DLL" + XTRA_OCTINTERP_DEFS="-DOCTINTERP_DLL" ;; *-*-linux* | *-*-gnu*) MKOCTFILE_DL_LDFLAGS="-shared -Wl,-Bsymbolic" @@ -1081,7 +1093,7 @@ SH_LDFLAGS=-G fi RLD_FLAG='-R $(octlibdir)' - # Template closures in archive libraries need a different mechanism. + ## Template closures in archive libraries need a different mechanism. if test "$GXX" = yes; then true else @@ -1121,6 +1133,9 @@ AC_MSG_NOTICE([defining RLD_FLAG to be $RLD_FLAG]) AC_MSG_NOTICE([defining TEMPLATE_AR to be $TEMPLATE_AR]) AC_MSG_NOTICE([defining TEMPLATE_ARFLAGS to be $TEMPLATE_ARFLAGS]) +AC_MSG_NOTICE([defining XTRA_CRUFT_DEFS to be $XTRA_CRUFT_DEFS]) +AC_MSG_NOTICE([defining XTRA_OCTAVE_DEFS to be $XTRA_OCTAVE_DEFS]) +AC_MSG_NOTICE([defining XTRA_OCTINTERP_DEFS to be $XTRA_OCTINTERP_DEFS]) AC_MSG_NOTICE([defining library_path_var to be $library_path_var]) AC_SUBST(FPICFLAG) AC_SUBST(CPICFLAG) @@ -1144,6 +1159,9 @@ AC_SUBST(RLD_FLAG) AC_SUBST(TEMPLATE_AR) AC_SUBST(TEMPLATE_ARFLAGS) +AC_SUBST(XTRA_CRUFT_DEFS) +AC_SUBST(XTRA_OCTAVE_DEFS) +AC_SUBST(XTRA_OCTINTERP_DEFS) AC_SUBST(library_path_var) ### special checks for odd OS specific things. @@ -1293,7 +1311,7 @@ if $SHARED_LIBS || $ENABLE_DYNAMIC_LINKING; then - ### Check for dyld first since OS X can have a non-standard libdl + ## Check for dyld first since OS X can have a non-standard libdl AC_CHECK_HEADER(mach-o/dyld.h) if test "$ac_cv_header_mach_o_dyld_h" = yes; then @@ -1787,6 +1805,29 @@ #pragma warning (disable: 4996) /* deprecated function names (FIXME?) */ #pragma warning (disable: 4661) +/* API macro for libcruft */ +#ifdef CRUFT_DLL +#define CRUFT_API __declspec(dllexport) +#else +#define CRUFT_API __declspec(dllimport) +#endif +/* API macro for liboctave */ +#ifdef OCTAVE_DLL +#define OCTAVE_API __declspec(dllexport) +#else +#define OCTAVE_API __declspec(dllimport) +#endif +/* API macro for src */ +#ifdef OCTINTERP_DLL +#define OCTINTERP_API __declspec(dllexport) +#else +#define OCTINTERP_API __declspec(dllimport) +#endif +#else +/* All other compilers */ +#define OCTAVE_API +#define OCTINTERP_API +#define CRUFT_API #endif #include "oct-types.h"
--- a/libcruft/ChangeLog +++ b/libcruft/ChangeLog @@ -1,3 +1,7 @@ +2006-10-25 John W. Eaton <jwe@octave.org> + + * Makerules.in (XTRA_CDEFS, XTRA_CXXDEFS): Substitute here. + 2006-10-23 Paul Kienzle <pkienzle@users.sf.net> * misc/f77-fcn.h (F77_CHAR_ARG_DEF, F77_CONST_CHAR_ARG_DEF,
--- a/libcruft/Makerules.in +++ b/libcruft/Makerules.in @@ -10,6 +10,9 @@ # University of Wisconsin-Madison # Department of Chemical Engineering +XTRA_CDEFS = @XTRA_CRUFT_DEFS@ +XTRA_CXXDEFS = @XTRA_CRUFT_DEFS@ + SOURCES = *.f DISTFILES = Makefile.in $(SOURCES) $(SPECIAL)
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,7 @@ +2006-10-25 Michael Goffioul <michael.goffioul@swing.be> + + * Makefile.in (XTRA_CDEFS, XTRA_CXXDEFS): Substitute here. + 2006-10-24 David Bateman <dbateman@free.fr> * Sparse.cc (assign (Sparse<LT>&, const Sparse<RT>&)): Resize the
--- a/liboctave/Makefile.in +++ b/liboctave/Makefile.in @@ -18,6 +18,9 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ +XTRA_CDEFS = @XTRA_OCTAVE_DEFS@ +XTRA_CXXDEFS = @XTRA_OCTAVE_DEFS@ + LINK_DEPS = \ -L../libcruft -L. $(RLD_FLAG) \ $(LIBCRUFT) $(CHOLMOD_LIBS) $(UMFPACK_LIBS) $(AMD_LIBS) \
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,9 @@ +2006-10-25 John W. Eaton <jwe@octave.org> + + * plot/__gnuplot_version__.m: New function, originally from + Daniel J Sebald <daniel.sebald@ieee.org> by way of + Quentin Spencer <qspencer@ieee.org>. + 2006-10-25 Søren Hauberg <soren@hauberg.org> * plot/__pltopt__.m: Update symbol marker id numbers for gnuplot 4.
new file mode 100644 --- /dev/null +++ b/scripts/plot/__gnuplot_version__.m @@ -0,0 +1,41 @@ +## Copyright (C) 2006 Daniel Sebald +## +## 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 2, 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, write to the Free +## Software Foundation, 59 Temple Place - Suite 330, Boston, MA +## 02111-1307, USA. + +## -*- texinfo -*- +## @deftypefn {Function File} {@var{version} =} __gnuplot_version__ (@var{gplt_exe}) +## Return the version of gnuplot we are using. Note that we do not +## attempt to handle the case of the user switching to different +## versions of gnuplot during the same session. +## @end deftypefn + +function version = __gnuplot_version__ () + + persistent __version__ = ""; + + if (isempty (__version__)) + [status, output] = system (sprintf ("%s --version", gnuplot_binary ())); + pattern = "^[^\\s]*\\s*([0-9]+\\.[0-9]+)\\s*[^\\s]*\\s*([^\\s]*)"; + [d1, d2, d3, d4, matches] = regexp (output, pattern); + if (iscell (matches) && numel (matches) > 0 && iscellstr (matches{1})) + __version__ = matches{1}{1}; + endif + endif + + version = __version__; + +endfunction +