Commit 67556719cc7b863042ce885374a34994ab8ec7c1

Authored by knodlseder
1 parent ebbe02cd

Updated configuration, version 0.1pre

1   -Copyright 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software
2   -Foundation, Inc.
  1 +GammaLib - Gamma-Ray Astronomy Library
  2 +======================================
3 3  
4   - This file is free documentation; the Free Software Foundation gives
5   -unlimited permission to copy, distribute and modify it.
  4 +Installation Instructions
  5 +=========================
  6 +
  7 +GammaLib follows the standard GNU installation procedure. To compile
  8 +GammaLib you will need an ANSI C++-compiler. After unpacking the
  9 +distribution the Makefiles can be prepared using the configure command,
  10 +
  11 + ./configure
  12 +
  13 +You can then build the library by typing,
  14 +
  15 + make
  16 +
  17 +Both static and shared versions of the libraries will be compiled by
  18 +default. Compilation of shared libraries can be turned off by
  19 +specifying the `--disable-shared' option to `configure', e.g.
  20 +
  21 + ./configure --disable-shared
  22 +
  23 +If you encounter problems building the library try using the above
  24 +option, because some platforms do not support shared libraries.
  25 +
  26 +An extensive test suite is available. After compiling the library
  27 +with "make", it can be invoked with "make check" at the top level.
  28 +The test output should be directed to a file rather than a terminal,
  29 +with the command,
  30 +
  31 +
  32 + make check > log 2>&1
  33 +
  34 +to allow any errors to be examined in detail.
  35 +
  36 +The library can be installed using the command,
  37 +
  38 + make install
  39 +
  40 +The default installation directory prefix is /usr/local. Consult the
  41 +"Further Information" section below for instructions on installing the
  42 +library in another location or changing other default compilation
  43 +options.
6 44  
7   -Basic Installation
8   -==================
9 45  
10   - These are generic installation instructions.
11   -
12   - The `configure' shell script attempts to guess correct values for
13   -various system-dependent variables used during compilation. It uses
14   -those values to create a `Makefile' in each directory of the package.
15   -It may also create one or more `.h' files containing system-dependent
16   -definitions. Finally, it creates a shell script `config.status' that
17   -you can run in the future to recreate the current configuration, and a
18   -file `config.log' containing compiler output (useful mainly for
19   -debugging `configure').
20   -
21   - It can also use an optional file (typically called `config.cache'
22   -and enabled with `--cache-file=config.cache' or simply `-C') that saves
23   -the results of its tests to speed up reconfiguring. (Caching is
24   -disabled by default to prevent problems with accidental use of stale
25   -cache files.)
26   -
27   - If you need to do unusual things to compile the package, please try
28   -to figure out how `configure' could check whether to do them, and mail
29   -diffs or instructions to the address given in the `README' so they can
30   -be considered for the next release. If you are using the cache, and at
31   -some point `config.cache' contains results you don't want to keep, you
32   -may remove or edit it.
33   -
34   - The file `configure.ac' (or `configure.in') is used to create
35   -`configure' by a program called `autoconf'. You only need
36   -`configure.ac' if you want to change it or regenerate `configure' using
37   -a newer version of `autoconf'.
38   -
39   -The simplest way to compile this package is:
40   -
41   - 1. `cd' to the directory containing the package's source code and type
42   - `./configure' to configure the package for your system. If you're
43   - using `csh' on an old version of System V, you might need to type
44   - `sh ./configure' instead to prevent `csh' from trying to execute
45   - `configure' itself.
46   -
47   - Running `configure' takes awhile. While running, it prints some
48   - messages telling which features it is checking for.
49   -
50   - 2. Type `make' to compile the package.
51   -
52   - 3. Optionally, type `make check' to run any self-tests that come with
53   - the package.
54   -
55   - 4. Type `make install' to install the programs and any data files and
56   - documentation.
57   -
58   - 5. You can remove the program binaries and object files from the
59   - source code directory by typing `make clean'. To also remove the
60   - files that `configure' created (so you can compile the package for
61   - a different kind of computer), type `make distclean'. There is
62   - also a `make maintainer-clean' target, but that is intended mainly
63   - for the package's developers. If you use it, you may have to get
64   - all sorts of other programs in order to regenerate files that came
65   - with the distribution.
  46 +OPTIONS TO CONFIGURE SCRIPT:
  47 +============================
  48 +
  49 +Apart form the further down mentioned options, the following
  50 +options can be used:
  51 +
  52 +--enable-range-check performs index range checking (slower code)
  53 +
  54 +
  55 +For example, if index range checking should be performed, use
  56 +
  57 +./configure --enable-range-check
  58 +
66 59  
67 60 Compilers and Options
68 61 =====================
... ... @@ -79,6 +72,7 @@ is an example:
79 72  
80 73 *Note Defining Variables::, for more details.
81 74  
  75 +
82 76 Compiling For Multiple Architectures
83 77 ====================================
84 78  
... ... @@ -96,6 +90,7 @@ time in the source code directory. After you have installed the
96 90 package for one architecture, use `make distclean' before reconfiguring
97 91 for another architecture.
98 92  
  93 +
99 94 Installation Names
100 95 ==================
101 96  
... ... @@ -119,6 +114,7 @@ you can set and what kinds of files go in them.
119 114 with an extra prefix or suffix on their names by giving `configure' the
120 115 option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
121 116  
  117 +
122 118 Optional Features
123 119 =================
124 120  
... ... @@ -134,6 +130,7 @@ find the X include and library files automatically, but if it doesn't,
134 130 you can use the `configure' options `--x-includes=DIR' and
135 131 `--x-libraries=DIR' to specify their locations.
136 132  
  133 +
137 134 Specifying the System Type
138 135 ==========================
139 136  
... ... @@ -164,6 +161,7 @@ platform different from the build platform, you should specify the
164 161 "host" platform (i.e., that on which the generated programs will
165 162 eventually be run) with `--host=TYPE'.
166 163  
  164 +
167 165 Sharing Defaults
168 166 ================
169 167  
... ... @@ -175,6 +173,7 @@ default values for variables like `CC', `cache_file', and `prefix'.
175 173 `CONFIG_SITE' environment variable to the location of the site script.
176 174 A warning: not all `configure' scripts look for a site script.
177 175  
  176 +
178 177 Defining Variables
179 178 ==================
180 179  
... ... @@ -189,8 +188,9 @@ them in the `configure' command line, using `VAR=value'. For example:
189 188 will cause the specified gcc to be used as the C compiler (unless it is
190 189 overridden in the site shell script).
191 190  
192   -`configure' Invocation
193   -======================
  191 +
  192 +Operation Controls
  193 +==================
194 194  
195 195 `configure' recognizes the following options to control how it
196 196 operates.
... ...
Makefile.in
1   -# Makefile.in generated by automake 1.6.3 from Makefile.am.
  1 +# Makefile.in generated by automake 1.9.2 from Makefile.am.
2 2 # @configure_input@
3 3  
4   -# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
5   -# Free Software Foundation, Inc.
  4 +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
  5 +# 2003, 2004 Free Software Foundation, Inc.
6 6 # This Makefile.in is free software; the Free Software Foundation
7 7 # gives unlimited permission to copy and/or distribute it,
8 8 # with or without modifications, as long as this notice is preserved.
... ... @@ -13,124 +13,189 @@
13 13 # PARTICULAR PURPOSE.
14 14  
15 15 @SET_MAKE@
16   -SHELL = @SHELL@
17   -
18 16 srcdir = @srcdir@
19 17 top_srcdir = @top_srcdir@
20 18 VPATH = @srcdir@
21   -prefix = @prefix@
22   -exec_prefix = @exec_prefix@
23   -
24   -bindir = @bindir@
25   -sbindir = @sbindir@
26   -libexecdir = @libexecdir@
27   -datadir = @datadir@
28   -sysconfdir = @sysconfdir@
29   -sharedstatedir = @sharedstatedir@
30   -localstatedir = @localstatedir@
31   -libdir = @libdir@
32   -infodir = @infodir@
33   -mandir = @mandir@
34   -includedir = @includedir@
35   -oldincludedir = /usr/include
36 19 pkgdatadir = $(datadir)/@PACKAGE@
37 20 pkglibdir = $(libdir)/@PACKAGE@
38 21 pkgincludedir = $(includedir)/@PACKAGE@
39 22 top_builddir = .
40   -
41   -ACLOCAL = @ACLOCAL@
42   -AUTOCONF = @AUTOCONF@
43   -AUTOMAKE = @AUTOMAKE@
44   -AUTOHEADER = @AUTOHEADER@
45   -
46 23 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
47 24 INSTALL = @INSTALL@
48   -INSTALL_PROGRAM = @INSTALL_PROGRAM@
49   -INSTALL_DATA = @INSTALL_DATA@
50 25 install_sh_DATA = $(install_sh) -c -m 644
51 26 install_sh_PROGRAM = $(install_sh) -c
52 27 install_sh_SCRIPT = $(install_sh) -c
53   -INSTALL_SCRIPT = @INSTALL_SCRIPT@
54 28 INSTALL_HEADER = $(INSTALL_DATA)
55   -transform = @program_transform_name@
  29 +transform = $(program_transform_name)
56 30 NORMAL_INSTALL = :
57 31 PRE_INSTALL = :
58 32 POST_INSTALL = :
59 33 NORMAL_UNINSTALL = :
60 34 PRE_UNINSTALL = :
61 35 POST_UNINSTALL = :
62   -host_alias = @host_alias@
  36 +build_triplet = @build@
63 37 host_triplet = @host@
64   -
65   -EXEEXT = @EXEEXT@
66   -OBJEXT = @OBJEXT@
67   -PATH_SEPARATOR = @PATH_SEPARATOR@
  38 +DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
  39 + $(srcdir)/Makefile.in $(srcdir)/config.h.in \
  40 + $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
  41 + config.guess config.sub depcomp install-sh ltmain.sh missing
  42 +subdir = .
  43 +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
  44 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac
  45 +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
  46 + $(ACLOCAL_M4)
  47 +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
  48 + configure.lineno configure.status.lineno
  49 +mkinstalldirs = $(install_sh) -d
  50 +CONFIG_HEADER = config.h
  51 +CONFIG_CLEAN_FILES =
  52 +depcomp =
  53 +am__depfiles_maybe =
  54 +SOURCES =
  55 +DIST_SOURCES =
  56 +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
  57 + html-recursive info-recursive install-data-recursive \
  58 + install-exec-recursive install-info-recursive \
  59 + install-recursive installcheck-recursive installdirs-recursive \
  60 + pdf-recursive ps-recursive uninstall-info-recursive \
  61 + uninstall-recursive
  62 +ETAGS = etags
  63 +CTAGS = ctags
  64 +DIST_SUBDIRS = $(SUBDIRS)
  65 +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
  66 +distdir = $(PACKAGE)-$(VERSION)
  67 +top_distdir = $(distdir)
  68 +am__remove_distdir = \
  69 + { test ! -d $(distdir) \
  70 + || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
  71 + && rm -fr $(distdir); }; }
  72 +DIST_ARCHIVES = $(distdir).tar.gz
  73 +GZIP_ENV = --best
  74 +distuninstallcheck_listfiles = find . -type f -print
  75 +distcleancheck_listfiles = find . -type f -print
  76 +ACLOCAL = @ACLOCAL@
68 77 AMTAR = @AMTAR@
69 78 AR = @AR@
70   -AS = @AS@
  79 +AUTOCONF = @AUTOCONF@
  80 +AUTOHEADER = @AUTOHEADER@
  81 +AUTOMAKE = @AUTOMAKE@
71 82 AWK = @AWK@
72 83 CC = @CC@
  84 +CFLAGS = @CFLAGS@
  85 +CPP = @CPP@
  86 +CPPFLAGS = @CPPFLAGS@
73 87 CXX = @CXX@
74 88 CXXCPP = @CXXCPP@
75   -DEPDIR = @DEPDIR@
76   -DLLTOOL = @DLLTOOL@
  89 +CXXFLAGS = @CXXFLAGS@
  90 +CYGPATH_W = @CYGPATH_W@
  91 +DEFS = @DEFS@
77 92 ECHO = @ECHO@
  93 +ECHO_C = @ECHO_C@
  94 +ECHO_N = @ECHO_N@
  95 +ECHO_T = @ECHO_T@
78 96 EGREP = @EGREP@
  97 +EXEEXT = @EXEEXT@
79 98 F77 = @F77@
80   -GCJ = @GCJ@
81   -GCJFLAGS = @GCJFLAGS@
  99 +FFLAGS = @FFLAGS@
  100 +GAMMALIB_LT_VERSION = @GAMMALIB_LT_VERSION@
  101 +INSTALL_DATA = @INSTALL_DATA@
  102 +INSTALL_PROGRAM = @INSTALL_PROGRAM@
  103 +INSTALL_SCRIPT = @INSTALL_SCRIPT@
82 104 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
  105 +LDFLAGS = @LDFLAGS@
  106 +LIBOBJS = @LIBOBJS@
  107 +LIBS = @LIBS@
83 108 LIBTOOL = @LIBTOOL@
84 109 LN_S = @LN_S@
85   -MAINT = @MAINT@
86   -OBJDUMP = @OBJDUMP@
  110 +LTLIBOBJS = @LTLIBOBJS@
  111 +MAKEINFO = @MAKEINFO@
  112 +OBJEXT = @OBJEXT@
87 113 PACKAGE = @PACKAGE@
  114 +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
  115 +PACKAGE_NAME = @PACKAGE_NAME@
  116 +PACKAGE_STRING = @PACKAGE_STRING@
  117 +PACKAGE_TARNAME = @PACKAGE_TARNAME@
  118 +PACKAGE_VERSION = @PACKAGE_VERSION@
  119 +PATH_SEPARATOR = @PATH_SEPARATOR@
88 120 RANLIB = @RANLIB@
89   -RC = @RC@
  121 +SET_MAKE = @SET_MAKE@
  122 +SHELL = @SHELL@
90 123 STRIP = @STRIP@
91 124 VERSION = @VERSION@
92   -am__include = @am__include@
93   -am__quote = @am__quote@
  125 +ac_ct_AR = @ac_ct_AR@
  126 +ac_ct_CC = @ac_ct_CC@
  127 +ac_ct_CXX = @ac_ct_CXX@
  128 +ac_ct_F77 = @ac_ct_F77@
  129 +ac_ct_RANLIB = @ac_ct_RANLIB@
  130 +ac_ct_STRIP = @ac_ct_STRIP@
  131 +am__leading_dot = @am__leading_dot@
  132 +am__tar = @am__tar@
  133 +am__untar = @am__untar@
  134 +bindir = @bindir@
  135 +build = @build@
  136 +build_alias = @build_alias@
  137 +build_cpu = @build_cpu@
  138 +build_os = @build_os@
  139 +build_vendor = @build_vendor@
  140 +datadir = @datadir@
  141 +exec_prefix = @exec_prefix@
  142 +host = @host@
  143 +host_alias = @host_alias@
  144 +host_cpu = @host_cpu@
  145 +host_os = @host_os@
  146 +host_vendor = @host_vendor@
  147 +includedir = @includedir@
  148 +infodir = @infodir@
94 149 install_sh = @install_sh@
95   -
  150 +libdir = @libdir@
  151 +libexecdir = @libexecdir@
  152 +localstatedir = @localstatedir@
  153 +mandir = @mandir@
  154 +mkdir_p = @mkdir_p@
  155 +oldincludedir = @oldincludedir@
  156 +prefix = @prefix@
  157 +program_transform_name = @program_transform_name@
  158 +sbindir = @sbindir@
  159 +sharedstatedir = @sharedstatedir@
  160 +sysconfdir = @sysconfdir@
  161 +target_alias = @target_alias@
96 162 SUBDIRS = src test
97   -subdir = .
98   -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
99   -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
100   -CONFIG_HEADER = config.h
101   -CONFIG_CLEAN_FILES =
102   -depcomp =
103   -am__depfiles_maybe =
104   -DIST_SOURCES =
105   -
106   -RECURSIVE_TARGETS = info-recursive dvi-recursive install-info-recursive \
107   - uninstall-info-recursive all-recursive install-data-recursive \
108   - install-exec-recursive installdirs-recursive install-recursive \
109   - uninstall-recursive check-recursive installcheck-recursive
110   -DIST_COMMON = README AUTHORS COPYING ChangeLog INSTALL Makefile.am \
111   - Makefile.in NEWS aclocal.m4 config.guess config.h.in config.sub \
112   - configure configure.ac install-sh ltmain.sh missing \
113   - mkinstalldirs
114   -DIST_SUBDIRS = $(SUBDIRS)
115 163 all: config.h
116 164 $(MAKE) $(AM_MAKEFLAGS) all-recursive
117 165  
118 166 .SUFFIXES:
119   -
120   -am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
121   - configure.lineno
122   -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
  167 +am--refresh:
  168 + @:
  169 +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
  170 + @for dep in $?; do \
  171 + case '$(am__configure_deps)' in \
  172 + *$$dep*) \
  173 + echo ' cd $(srcdir) && $(AUTOMAKE) --gnu --ignore-deps'; \
  174 + cd $(srcdir) && $(AUTOMAKE) --gnu --ignore-deps \
  175 + && exit 0; \
  176 + exit 1;; \
  177 + esac; \
  178 + done; \
  179 + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu --ignore-deps Makefile'; \
123 180 cd $(top_srcdir) && \
124   - $(AUTOMAKE) --gnu Makefile
125   -Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status
126   - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)
127   -
128   -$(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
  181 + $(AUTOMAKE) --gnu --ignore-deps Makefile
  182 +.PRECIOUS: Makefile
  183 +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
  184 + @case '$?' in \
  185 + *config.status*) \
  186 + echo ' $(SHELL) ./config.status'; \
  187 + $(SHELL) ./config.status;; \
  188 + *) \
  189 + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
  190 + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
  191 + esac;
  192 +
  193 +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
129 194 $(SHELL) ./config.status --recheck
130   -$(srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(srcdir)/configure.ac $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
131   - cd $(srcdir) && $(AUTOCONF)
132 195  
133   -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.ac
  196 +$(top_srcdir)/configure: $(am__configure_deps)
  197 + cd $(srcdir) && $(AUTOCONF)
  198 +$(ACLOCAL_M4): $(am__aclocal_m4_deps)
134 199 cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
135 200  
136 201 config.h: stamp-h1
... ... @@ -142,10 +207,10 @@ config.h: stamp-h1
142 207 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
143 208 @rm -f stamp-h1
144 209 cd $(top_builddir) && $(SHELL) ./config.status config.h
145   -
146   -$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(top_srcdir)/configure.ac $(ACLOCAL_M4)
  210 +$(srcdir)/config.h.in: $(am__configure_deps)
147 211 cd $(top_srcdir) && $(AUTOHEADER)
148   - touch $(srcdir)/config.h.in
  212 + rm -f stamp-h1
  213 + touch $@
149 214  
150 215 distclean-hdr:
151 216 -rm -f config.h stamp-h1
... ... @@ -214,11 +279,10 @@ tags-recursive:
214 279 list='$(SUBDIRS)'; for subdir in $$list; do \
215 280 test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
216 281 done
217   -
218   -ETAGS = etags
219   -ETAGSFLAGS =
220   -
221   -tags: TAGS
  282 +ctags-recursive:
  283 + list='$(SUBDIRS)'; for subdir in $$list; do \
  284 + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
  285 + done
222 286  
223 287 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
224 288 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
... ... @@ -228,14 +292,23 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
228 292 $(AWK) ' { files[$$0] = 1; } \
229 293 END { for (i in files) print i; }'`; \
230 294 mkid -fID $$unique
  295 +tags: TAGS
231 296  
232 297 TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
233 298 $(TAGS_FILES) $(LISP)
234 299 tags=; \
235 300 here=`pwd`; \
  301 + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
  302 + include_option=--etags-include; \
  303 + empty_fix=.; \
  304 + else \
  305 + include_option=--include; \
  306 + empty_fix=; \
  307 + fi; \
236 308 list='$(SUBDIRS)'; for subdir in $$list; do \
237 309 if test "$$subdir" = .; then :; else \
238   - test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
  310 + test ! -f $$subdir/TAGS || \
  311 + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
239 312 fi; \
240 313 done; \
241 314 list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
... ... @@ -244,8 +317,24 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
244 317 done | \
245 318 $(AWK) ' { files[$$0] = 1; } \
246 319 END { for (i in files) print i; }'`; \
247   - test -z "$(ETAGS_ARGS)$$tags$$unique" \
248   - || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
  320 + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
  321 + test -n "$$unique" || unique=$$empty_fix; \
  322 + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
  323 + $$tags $$unique; \
  324 + fi
  325 +ctags: CTAGS
  326 +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
  327 + $(TAGS_FILES) $(LISP)
  328 + tags=; \
  329 + here=`pwd`; \
  330 + list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
  331 + unique=`for i in $$list; do \
  332 + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
  333 + done | \
  334 + $(AWK) ' { files[$$0] = 1; } \
  335 + END { for (i in files) print i; }'`; \
  336 + test -z "$(CTAGS_ARGS)$$tags$$unique" \
  337 + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
249 338 $$tags $$unique
250 339  
251 340 GTAGS:
... ... @@ -254,29 +343,23 @@ GTAGS:
254 343 && gtags -i $(GTAGS_ARGS) $$here
255 344  
256 345 distclean-tags:
257   - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
258   -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
259   -
260   -top_distdir = .
261   -distdir = $(PACKAGE)-$(VERSION)
262   -
263   -am__remove_distdir = \
264   - { test ! -d $(distdir) \
265   - || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
266   - && rm -fr $(distdir); }; }
267   -
268   -GZIP_ENV = --best
269   -distcleancheck_listfiles = find . -type f -print
  346 + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
270 347  
271 348 distdir: $(DISTFILES)
272 349 $(am__remove_distdir)
273 350 mkdir $(distdir)
274   - @list='$(DISTFILES)'; for file in $$list; do \
  351 + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
  352 + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
  353 + list='$(DISTFILES)'; for file in $$list; do \
  354 + case $$file in \
  355 + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
  356 + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
  357 + esac; \
275 358 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
276 359 dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
277 360 if test "$$dir" != "$$file" && test "$$dir" != "."; then \
278 361 dir="/$$dir"; \
279   - $(mkinstalldirs) "$(distdir)$$dir"; \
  362 + $(mkdir_p) "$(distdir)$$dir"; \
280 363 else \
281 364 dir=''; \
282 365 fi; \
... ... @@ -291,15 +374,17 @@ distdir: $(DISTFILES)
291 374 || exit 1; \
292 375 fi; \
293 376 done
294   - list='$(SUBDIRS)'; for subdir in $$list; do \
  377 + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
295 378 if test "$$subdir" = .; then :; else \
296   - test -d $(distdir)/$$subdir \
297   - || mkdir $(distdir)/$$subdir \
  379 + test -d "$(distdir)/$$subdir" \
  380 + || $(mkdir_p) "$(distdir)/$$subdir" \
298 381 || exit 1; \
  382 + distdir=`$(am__cd) $(distdir) && pwd`; \
  383 + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
299 384 (cd $$subdir && \
300 385 $(MAKE) $(AM_MAKEFLAGS) \
301   - top_distdir="$(top_distdir)" \
302   - distdir=../$(distdir)/$$subdir \
  386 + top_distdir="$$top_distdir" \
  387 + distdir="$$distdir/$$subdir" \
303 388 distdir) \
304 389 || exit 1; \
305 390 fi; \
... ... @@ -310,26 +395,54 @@ distdir: $(DISTFILES)
310 395 ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
311 396 || chmod -R a+r $(distdir)
312 397 dist-gzip: distdir
313   - $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
  398 + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
  399 + $(am__remove_distdir)
  400 +
  401 +dist-bzip2: distdir
  402 + tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
  403 + $(am__remove_distdir)
  404 +
  405 +dist-tarZ: distdir
  406 + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
  407 + $(am__remove_distdir)
  408 +
  409 +dist-shar: distdir
  410 + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
  411 + $(am__remove_distdir)
  412 +
  413 +dist-zip: distdir
  414 + -rm -f $(distdir).zip
  415 + zip -rq $(distdir).zip $(distdir)
314 416 $(am__remove_distdir)
315 417  
316 418 dist dist-all: distdir
317   - $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
  419 + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
318 420 $(am__remove_distdir)
319 421  
320 422 # This target untars the dist file and tries a VPATH configuration. Then
321 423 # it guarantees that the distribution is self-contained by making another
322 424 # tarfile.
323 425 distcheck: dist
324   - $(am__remove_distdir)
325   - GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf -
  426 + case '$(DIST_ARCHIVES)' in \
  427 + *.tar.gz*) \
  428 + GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
  429 + *.tar.bz2*) \
  430 + bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
  431 + *.tar.Z*) \
  432 + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
  433 + *.shar.gz*) \
  434 + GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
  435 + *.zip*) \
  436 + unzip $(distdir).zip ;;\
  437 + esac
326 438 chmod -R a-w $(distdir); chmod a+w $(distdir)
327   - mkdir $(distdir)/=build
328   - mkdir $(distdir)/=inst
  439 + mkdir $(distdir)/_build
  440 + mkdir $(distdir)/_inst
329 441 chmod a-w $(distdir)
330   - dc_install_base=`$(am__cd) $(distdir)/=inst && pwd` \
331   - && cd $(distdir)/=build \
332   - && ../configure --srcdir=.. --prefix=$$dc_install_base \
  442 + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
  443 + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
  444 + && cd $(distdir)/_build \
  445 + && ../configure --srcdir=.. --prefix="$$dc_install_base" \
333 446 $(DISTCHECK_CONFIGURE_FLAGS) \
334 447 && $(MAKE) $(AM_MAKEFLAGS) \
335 448 && $(MAKE) $(AM_MAKEFLAGS) dvi \
... ... @@ -337,23 +450,40 @@ distcheck: dist
337 450 && $(MAKE) $(AM_MAKEFLAGS) install \
338 451 && $(MAKE) $(AM_MAKEFLAGS) installcheck \
339 452 && $(MAKE) $(AM_MAKEFLAGS) uninstall \
340   - && (test `find $$dc_install_base -type f -print | wc -l` -le 1 \
341   - || { echo "ERROR: files left after uninstall:" ; \
342   - find $$dc_install_base -type f -print ; \
343   - exit 1; } >&2 ) \
344   - && $(MAKE) $(AM_MAKEFLAGS) dist-gzip \
345   - && rm -f $(distdir).tar.gz \
  453 + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
  454 + distuninstallcheck \
  455 + && chmod -R a-w "$$dc_install_base" \
  456 + && ({ \
  457 + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
  458 + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
  459 + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
  460 + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
  461 + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
  462 + } || { rm -rf "$$dc_destdir"; exit 1; }) \
  463 + && rm -rf "$$dc_destdir" \
  464 + && $(MAKE) $(AM_MAKEFLAGS) dist \
  465 + && rm -rf $(DIST_ARCHIVES) \
346 466 && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
347 467 $(am__remove_distdir)
348   - @echo "$(distdir).tar.gz is ready for distribution" | \
349   - sed 'h;s/./=/g;p;x;p;x'
  468 + @(echo "$(distdir) archives ready for distribution: "; \
  469 + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
  470 + sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
  471 +distuninstallcheck:
  472 + @cd $(distuninstallcheck_dir) \
  473 + && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
  474 + || { echo "ERROR: files left after uninstall:" ; \
  475 + if test -n "$(DESTDIR)"; then \
  476 + echo " (check DESTDIR support)"; \
  477 + fi ; \
  478 + $(distuninstallcheck_listfiles) ; \
  479 + exit 1; } >&2
350 480 distcleancheck: distclean
351   - if test '$(srcdir)' = . ; then \
  481 + @if test '$(srcdir)' = . ; then \
352 482 echo "ERROR: distcleancheck can only run from a VPATH build" ; \
353 483 exit 1 ; \
354 484 fi
355   - test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
356   - || { echo "ERROR: files left after distclean:" ; \
  485 + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
  486 + || { echo "ERROR: files left in build directory after distclean:" ; \
357 487 $(distcleancheck_listfiles) ; \
358 488 exit 1; } >&2
359 489 check-am: all-am
... ... @@ -361,7 +491,6 @@ check: check-recursive
361 491 all-am: Makefile config.h
362 492 installdirs: installdirs-recursive
363 493 installdirs-am:
364   -
365 494 install: install-recursive
366 495 install-exec: install-exec-recursive
367 496 install-data: install-data-recursive
... ... @@ -373,7 +502,7 @@ install-am: all-am
373 502 installcheck: installcheck-recursive
374 503 install-strip:
375 504 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
376   - INSTALL_STRIP_FLAG=-s \
  505 + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
377 506 `test -z '$(STRIP)' || \
378 507 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
379 508 mostlyclean-generic:
... ... @@ -381,7 +510,7 @@ mostlyclean-generic:
381 510 clean-generic:
382 511  
383 512 distclean-generic:
384   - -rm -f Makefile $(CONFIG_CLEAN_FILES)
  513 + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
385 514  
386 515 maintainer-clean-generic:
387 516 @echo "This command is intended for maintainers to use"
... ... @@ -392,13 +521,16 @@ clean-am: clean-generic clean-libtool mostlyclean-am
392 521  
393 522 distclean: distclean-recursive
394 523 -rm -f $(am__CONFIG_DISTCLEAN_FILES)
395   -distclean-am: clean-am distclean-generic distclean-hdr distclean-libtool \
396   - distclean-tags
  524 + -rm -f Makefile
  525 +distclean-am: clean-am distclean-generic distclean-hdr \
  526 + distclean-libtool distclean-tags
397 527  
398 528 dvi: dvi-recursive
399 529  
400 530 dvi-am:
401 531  
  532 +html: html-recursive
  533 +
402 534 info: info-recursive
403 535  
404 536 info-am:
... ... @@ -415,32 +547,40 @@ installcheck-am:
415 547  
416 548 maintainer-clean: maintainer-clean-recursive
417 549 -rm -f $(am__CONFIG_DISTCLEAN_FILES)
418   - -rm -rf autom4te.cache
  550 + -rm -rf $(top_srcdir)/autom4te.cache
  551 + -rm -f Makefile
419 552 maintainer-clean-am: distclean-am maintainer-clean-generic
420 553  
421 554 mostlyclean: mostlyclean-recursive
422 555  
423 556 mostlyclean-am: mostlyclean-generic mostlyclean-libtool
424 557  
  558 +pdf: pdf-recursive
  559 +
  560 +pdf-am:
  561 +
  562 +ps: ps-recursive
  563 +
  564 +ps-am:
  565 +
425 566 uninstall-am: uninstall-info-am
426 567  
427 568 uninstall-info: uninstall-info-recursive
428 569  
429   -.PHONY: $(RECURSIVE_TARGETS) GTAGS all all-am check check-am clean \
430   - clean-generic clean-libtool clean-recursive dist dist-all \
431   - dist-gzip distcheck distclean distclean-generic distclean-hdr \
432   - distclean-libtool distclean-recursive distclean-tags \
433   - distcleancheck distdir dvi dvi-am dvi-recursive info info-am \
434   - info-recursive install install-am install-data install-data-am \
435   - install-data-recursive install-exec install-exec-am \
436   - install-exec-recursive install-info install-info-am \
437   - install-info-recursive install-man install-recursive \
  570 +.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
  571 + check-am clean clean-generic clean-libtool clean-recursive \
  572 + ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
  573 + dist-shar dist-tarZ dist-zip distcheck distclean \
  574 + distclean-generic distclean-hdr distclean-libtool \
  575 + distclean-recursive distclean-tags distcleancheck distdir \
  576 + distuninstallcheck dvi dvi-am html html-am info info-am \
  577 + install install-am install-data install-data-am install-exec \
  578 + install-exec-am install-info install-info-am install-man \
438 579 install-strip installcheck installcheck-am installdirs \
439   - installdirs-am installdirs-recursive maintainer-clean \
440   - maintainer-clean-generic maintainer-clean-recursive mostlyclean \
441   - mostlyclean-generic mostlyclean-libtool mostlyclean-recursive \
442   - tags tags-recursive uninstall uninstall-am uninstall-info-am \
443   - uninstall-info-recursive uninstall-recursive
  580 + installdirs-am maintainer-clean maintainer-clean-generic \
  581 + maintainer-clean-recursive mostlyclean mostlyclean-generic \
  582 + mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \
  583 + tags tags-recursive uninstall uninstall-am uninstall-info-am
444 584  
445 585 # Tell versions [3.59,3.63) of GNU make to not export all variables.
446 586 # Otherwise a system limit (for SysV at least) may be exceeded.
... ...
configure
1 1 #! /bin/sh
2 2 # Guess values for system-dependent variables and create Makefiles.
3   -# Generated by GNU Autoconf 2.59 for gamma 0.1.
  3 +# Generated by GNU Autoconf 2.59 for GammaLib 0.1pre.
4 4 #
5 5 # Report bugs to <knodlseder@cesr.fr>.
6 6 #
... ... @@ -421,13 +421,13 @@ SHELL=${CONFIG_SHELL-/bin/sh}
421 421 : ${ac_max_here_lines=38}
422 422  
423 423 # Identity of this package.
424   -PACKAGE_NAME='gamma'
425   -PACKAGE_TARNAME='gamma'
426   -PACKAGE_VERSION='0.1'
427   -PACKAGE_STRING='gamma 0.1'
  424 +PACKAGE_NAME='GammaLib'
  425 +PACKAGE_TARNAME='gammalib'
  426 +PACKAGE_VERSION='0.1pre'
  427 +PACKAGE_STRING='GammaLib 0.1pre'
428 428 PACKAGE_BUGREPORT='knodlseder@cesr.fr'
429 429  
430   -ac_unique_file="src/GException.hpp"
  430 +ac_unique_file="src/GammaLib.hpp"
431 431 # Factoring default headers for most tests.
432 432 ac_includes_default="\
433 433 #include <stdio.h>
... ... @@ -465,7 +465,7 @@ ac_includes_default=&quot;\
465 465 # include <unistd.h>
466 466 #endif"
467 467  
468   -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS ac_ct_CC EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBTOOL_DEPS LIBOBJS LTLIBOBJS'
  468 +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT GAMMALIB_LT_VERSION build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS ac_ct_CC EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBOBJS LTLIBOBJS'
469 469 ac_subst_files=''
470 470  
471 471 # Initialize some variables set by options.
... ... @@ -954,7 +954,7 @@ if test &quot;$ac_init_help&quot; = &quot;long&quot;; then
954 954 # Omit some internal or obsolete options to make the list less imposing.
955 955 # This message is too long to be a string in the A/UX 3.1 sh.
956 956 cat <<_ACEOF
957   -\`configure' configures gamma 0.1 to adapt to many kinds of systems.
  957 +\`configure' configures GammaLib 0.1pre to adapt to many kinds of systems.
958 958  
959 959 Usage: $0 [OPTION]... [VAR=VALUE]...
960 960  
... ... @@ -1020,15 +1020,13 @@ fi
1020 1020  
1021 1021 if test -n "$ac_init_help"; then
1022 1022 case $ac_init_help in
1023   - short | recursive ) echo "Configuration of gamma 0.1:";;
  1023 + short | recursive ) echo "Configuration of GammaLib 0.1pre:";;
1024 1024 esac
1025 1025 cat <<\_ACEOF
1026 1026  
1027 1027 Optional Features:
1028 1028 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1029 1029 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1030   - --enable-maintainer-mode enable make rules and dependencies not useful
1031   - (and sometimes confusing) to the casual installer
1032 1030 --enable-shared[=PKGS]
1033 1031 build shared libraries [default=yes]
1034 1032 --enable-static[=PKGS]
... ... @@ -1159,7 +1157,7 @@ fi
1159 1157 test -n "$ac_init_help" && exit 0
1160 1158 if $ac_init_version; then
1161 1159 cat <<\_ACEOF
1162   -gamma configure 0.1
  1160 +GammaLib configure 0.1pre
1163 1161 generated by GNU Autoconf 2.59
1164 1162  
1165 1163 Copyright (C) 2003 Free Software Foundation, Inc.
... ... @@ -1173,7 +1171,7 @@ cat &gt;&amp;5 &lt;&lt;_ACEOF
1173 1171 This file contains any messages produced by compilers while
1174 1172 running configure, to aid debugging if configure makes a mistake.
1175 1173  
1176   -It was created by gamma $as_me 0.1, which was
  1174 +It was created by GammaLib $as_me 0.1pre, which was
1177 1175 generated by GNU Autoconf 2.59. Invocation command line was
1178 1176  
1179 1177 $ $0 $@
... ... @@ -1509,7 +1507,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
1509 1507  
1510 1508  
1511 1509  
1512   -# AC_CONFIG_SRCDIR(src/gammalib.hpp)
1513 1510  
1514 1511  
1515 1512 am__api_version="1.9"
... ... @@ -1818,8 +1815,8 @@ fi
1818 1815  
1819 1816  
1820 1817 # Define the identity of the package.
1821   - PACKAGE='gamma'
1822   - VERSION='0.1'
  1818 + PACKAGE='gammalib'
  1819 + VERSION='0.1pre'
1823 1820  
1824 1821  
1825 1822 cat >>confdefs.h <<_ACEOF
... ... @@ -1951,30 +1948,7 @@ am__tar=&#39;${AMTAR} chof - &quot;$$tardir&quot;&#39;; am__untar=&#39;${AMTAR} xf -&#39;
1951 1948  
1952 1949 ac_config_headers="$ac_config_headers config.h"
1953 1950  
1954   -echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
1955   -echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
1956   - # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
1957   -if test "${enable_maintainer_mode+set}" = set; then
1958   - enableval="$enable_maintainer_mode"
1959   - USE_MAINTAINER_MODE=$enableval
1960   -else
1961   - USE_MAINTAINER_MODE=no
1962   -fi;
1963   - echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
1964   -echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6
1965   -
1966   -
1967   -if test $USE_MAINTAINER_MODE = yes; then
1968   - MAINTAINER_MODE_TRUE=
1969   - MAINTAINER_MODE_FALSE='#'
1970   -else
1971   - MAINTAINER_MODE_TRUE='#'
1972   - MAINTAINER_MODE_FALSE=
1973   -fi
1974   -
1975   - MAINT=$MAINTAINER_MODE_TRUE
1976   -
1977   -
  1951 +#AM_MAINTAINER_MODE
1978 1952  
1979 1953 # things required by automake
1980 1954 # AC_ARG_PROGRAM
... ... @@ -2568,6 +2542,98 @@ ac_compile=&#39;$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext &gt;&amp;5&#39;
2568 2542 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2569 2543 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2570 2544  
  2545 +# AC_LANG(C)
  2546 +# AC_PROG_CC
  2547 +# AC_PROG_CPP
  2548 +# Find a good install program. We prefer a C program (faster),
  2549 +# so one script is as good as another. But avoid the broken or
  2550 +# incompatible versions:
  2551 +# SysV /etc/install, /usr/sbin/install
  2552 +# SunOS /usr/etc/install
  2553 +# IRIX /sbin/install
  2554 +# AIX /bin/install
  2555 +# AmigaOS /C/install, which installs bootblocks on floppy discs
  2556 +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
  2557 +# AFS /usr/afsws/bin/install, which mishandles nonexistent args
  2558 +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  2559 +# OS/2's system install, which has a completely different semantic
  2560 +# ./install, which can be erroneously created by make from ./install.sh.
  2561 +echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
  2562 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
  2563 +if test -z "$INSTALL"; then
  2564 +if test "${ac_cv_path_install+set}" = set; then
  2565 + echo $ECHO_N "(cached) $ECHO_C" >&6
  2566 +else
  2567 + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  2568 +for as_dir in $PATH
  2569 +do
  2570 + IFS=$as_save_IFS
  2571 + test -z "$as_dir" && as_dir=.
  2572 + # Account for people who put trailing slashes in PATH elements.
  2573 +case $as_dir/ in
  2574 + ./ | .// | /cC/* | \
  2575 + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
  2576 + ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
  2577 + /usr/ucb/* ) ;;
  2578 + *)
  2579 + # OSF1 and SCO ODT 3.0 have their own names for install.
  2580 + # Don't use installbsd from OSF since it installs stuff as root
  2581 + # by default.
  2582 + for ac_prog in ginstall scoinst install; do
  2583 + for ac_exec_ext in '' $ac_executable_extensions; do
  2584 + if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
  2585 + if test $ac_prog = install &&
  2586 + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
  2587 + # AIX install. It has an incompatible calling convention.
  2588 + :
  2589 + elif test $ac_prog = install &&
  2590 + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
  2591 + # program-specific install script used by HP pwplus--don't use.
  2592 + :
  2593 + else
  2594 + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
  2595 + break 3
  2596 + fi
  2597 + fi
  2598 + done
  2599 + done
  2600 + ;;
  2601 +esac
  2602 +done
  2603 +
  2604 +
  2605 +fi
  2606 + if test "${ac_cv_path_install+set}" = set; then
  2607 + INSTALL=$ac_cv_path_install
  2608 + else
  2609 + # As a last resort, use the slow shell script. We don't cache a
  2610 + # path for INSTALL within a source directory, because that will
  2611 + # break other packages using the cache if that directory is
  2612 + # removed, or if the path is relative.
  2613 + INSTALL=$ac_install_sh
  2614 + fi
  2615 +fi
  2616 +echo "$as_me:$LINENO: result: $INSTALL" >&5
  2617 +echo "${ECHO_T}$INSTALL" >&6
  2618 +
  2619 +# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
  2620 +# It thinks the first close brace ends the variable substitution.
  2621 +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  2622 +
  2623 +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
  2624 +
  2625 +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  2626 +
  2627 +# AC_PROG_LN_S
  2628 +
  2629 +# Library versioning (current:revision:age)
  2630 +# See the libtool manual for an explanation
  2631 +#
  2632 +# gammalib-0.1 libgamma 0:0:0
  2633 +GAMMALIB_LT_VERSION="0:0:0"
  2634 +
  2635 +
  2636 +# libtool test.
2571 2637 # Check whether --enable-shared or --disable-shared was given.
2572 2638 if test "${enable_shared+set}" = set; then
2573 2639 enableval="$enable_shared"
... ... @@ -3905,7 +3971,7 @@ ia64-*-hpux*)
3905 3971 ;;
3906 3972 *-*-irix6*)
3907 3973 # Find out which ABI we are using.
3908   - echo '#line 3908 "configure"' > conftest.$ac_ext
  3974 + echo '#line 3974 "configure"' > conftest.$ac_ext
3909 3975 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3910 3976 (eval $ac_compile) 2>&5
3911 3977 ac_status=$?
... ... @@ -5013,7 +5079,7 @@ fi
5013 5079  
5014 5080  
5015 5081 # Provide some information about the compiler.
5016   -echo "$as_me:5016:" \
  5082 +echo "$as_me:5082:" \
5017 5083 "checking for Fortran 77 compiler version" >&5
5018 5084 ac_compiler=`set X $ac_compile; echo $2`
5019 5085 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
... ... @@ -6047,11 +6113,11 @@ else
6047 6113 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
6048 6114 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
6049 6115 -e 's:$: $lt_compiler_flag:'`
6050   - (eval echo "\"\$as_me:6050: $lt_compile\"" >&5)
  6116 + (eval echo "\"\$as_me:6116: $lt_compile\"" >&5)
6051 6117 (eval "$lt_compile" 2>conftest.err)
6052 6118 ac_status=$?
6053 6119 cat conftest.err >&5
6054   - echo "$as_me:6054: \$? = $ac_status" >&5
  6120 + echo "$as_me:6120: \$? = $ac_status" >&5
6055 6121 if (exit $ac_status) && test -s "$ac_outfile"; then
6056 6122 # The compiler can only warn and ignore the option if not recognized
6057 6123 # So say no if there are warnings
... ... @@ -6280,11 +6346,11 @@ else
6280 6346 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
6281 6347 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
6282 6348 -e 's:$: $lt_compiler_flag:'`
6283   - (eval echo "\"\$as_me:6283: $lt_compile\"" >&5)
  6349 + (eval echo "\"\$as_me:6349: $lt_compile\"" >&5)
6284 6350 (eval "$lt_compile" 2>conftest.err)
6285 6351 ac_status=$?
6286 6352 cat conftest.err >&5
6287   - echo "$as_me:6287: \$? = $ac_status" >&5
  6353 + echo "$as_me:6353: \$? = $ac_status" >&5
6288 6354 if (exit $ac_status) && test -s "$ac_outfile"; then
6289 6355 # The compiler can only warn and ignore the option if not recognized
6290 6356 # So say no if there are warnings
... ... @@ -6340,11 +6406,11 @@ else
6340 6406 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
6341 6407 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
6342 6408 -e 's:$: $lt_compiler_flag:'`
6343   - (eval echo "\"\$as_me:6343: $lt_compile\"" >&5)
  6409 + (eval echo "\"\$as_me:6409: $lt_compile\"" >&5)
6344 6410 (eval "$lt_compile" 2>out/conftest.err)
6345 6411 ac_status=$?
6346 6412 cat out/conftest.err >&5
6347   - echo "$as_me:6347: \$? = $ac_status" >&5
  6413 + echo "$as_me:6413: \$? = $ac_status" >&5
6348 6414 if (exit $ac_status) && test -s out/conftest2.$ac_objext
6349 6415 then
6350 6416 # The compiler can only warn and ignore the option if not recognized
... ... @@ -7674,7 +7740,7 @@ linux*)
7674 7740 libsuff=
7675 7741 case "$host_cpu" in
7676 7742 x86_64*|s390x*|powerpc64*)
7677   - echo '#line 7677 "configure"' > conftest.$ac_ext
  7743 + echo '#line 7743 "configure"' > conftest.$ac_ext
7678 7744 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7679 7745 (eval $ac_compile) 2>&5
7680 7746 ac_status=$?
... ... @@ -8545,7 +8611,7 @@ else
8545 8611 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
8546 8612 lt_status=$lt_dlunknown
8547 8613 cat > conftest.$ac_ext <<EOF
8548   -#line 8548 "configure"
  8614 +#line 8614 "configure"
8549 8615 #include "confdefs.h"
8550 8616  
8551 8617 #if HAVE_DLFCN_H
... ... @@ -8643,7 +8709,7 @@ else
8643 8709 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
8644 8710 lt_status=$lt_dlunknown
8645 8711 cat > conftest.$ac_ext <<EOF
8646   -#line 8646 "configure"
  8712 +#line 8712 "configure"
8647 8713 #include "confdefs.h"
8648 8714  
8649 8715 #if HAVE_DLFCN_H
... ... @@ -10822,11 +10888,11 @@ else
10822 10888 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
10823 10889 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
10824 10890 -e 's:$: $lt_compiler_flag:'`
10825   - (eval echo "\"\$as_me:10825: $lt_compile\"" >&5)
  10891 + (eval echo "\"\$as_me:10891: $lt_compile\"" >&5)
10826 10892 (eval "$lt_compile" 2>conftest.err)
10827 10893 ac_status=$?
10828 10894 cat conftest.err >&5
10829   - echo "$as_me:10829: \$? = $ac_status" >&5
  10895 + echo "$as_me:10895: \$? = $ac_status" >&5
10830 10896 if (exit $ac_status) && test -s "$ac_outfile"; then
10831 10897 # The compiler can only warn and ignore the option if not recognized
10832 10898 # So say no if there are warnings
... ... @@ -10882,11 +10948,11 @@ else
10882 10948 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
10883 10949 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
10884 10950 -e 's:$: $lt_compiler_flag:'`
10885   - (eval echo "\"\$as_me:10885: $lt_compile\"" >&5)
  10951 + (eval echo "\"\$as_me:10951: $lt_compile\"" >&5)
10886 10952 (eval "$lt_compile" 2>out/conftest.err)
10887 10953 ac_status=$?
10888 10954 cat out/conftest.err >&5
10889   - echo "$as_me:10889: \$? = $ac_status" >&5
  10955 + echo "$as_me:10955: \$? = $ac_status" >&5
10890 10956 if (exit $ac_status) && test -s out/conftest2.$ac_objext
10891 10957 then
10892 10958 # The compiler can only warn and ignore the option if not recognized
... ... @@ -11393,7 +11459,7 @@ linux*)
11393 11459 libsuff=
11394 11460 case "$host_cpu" in
11395 11461 x86_64*|s390x*|powerpc64*)
11396   - echo '#line 11396 "configure"' > conftest.$ac_ext
  11462 + echo '#line 11462 "configure"' > conftest.$ac_ext
11397 11463 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11398 11464 (eval $ac_compile) 2>&5
11399 11465 ac_status=$?
... ... @@ -12264,7 +12330,7 @@ else
12264 12330 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
12265 12331 lt_status=$lt_dlunknown
12266 12332 cat > conftest.$ac_ext <<EOF
12267   -#line 12267 "configure"
  12333 +#line 12333 "configure"
12268 12334 #include "confdefs.h"
12269 12335  
12270 12336 #if HAVE_DLFCN_H
... ... @@ -12362,7 +12428,7 @@ else
12362 12428 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
12363 12429 lt_status=$lt_dlunknown
12364 12430 cat > conftest.$ac_ext <<EOF
12365   -#line 12365 "configure"
  12431 +#line 12431 "configure"
12366 12432 #include "confdefs.h"
12367 12433  
12368 12434 #if HAVE_DLFCN_H
... ... @@ -13189,11 +13255,11 @@ else
13189 13255 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
13190 13256 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
13191 13257 -e 's:$: $lt_compiler_flag:'`
13192   - (eval echo "\"\$as_me:13192: $lt_compile\"" >&5)
  13258 + (eval echo "\"\$as_me:13258: $lt_compile\"" >&5)
13193 13259 (eval "$lt_compile" 2>conftest.err)
13194 13260 ac_status=$?
13195 13261 cat conftest.err >&5
13196   - echo "$as_me:13196: \$? = $ac_status" >&5
  13262 + echo "$as_me:13262: \$? = $ac_status" >&5
13197 13263 if (exit $ac_status) && test -s "$ac_outfile"; then
13198 13264 # The compiler can only warn and ignore the option if not recognized
13199 13265 # So say no if there are warnings
... ... @@ -13249,11 +13315,11 @@ else
13249 13315 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
13250 13316 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
13251 13317 -e 's:$: $lt_compiler_flag:'`
13252   - (eval echo "\"\$as_me:13252: $lt_compile\"" >&5)
  13318 + (eval echo "\"\$as_me:13318: $lt_compile\"" >&5)
13253 13319 (eval "$lt_compile" 2>out/conftest.err)
13254 13320 ac_status=$?
13255 13321 cat out/conftest.err >&5
13256   - echo "$as_me:13256: \$? = $ac_status" >&5
  13322 + echo "$as_me:13322: \$? = $ac_status" >&5
13257 13323 if (exit $ac_status) && test -s out/conftest2.$ac_objext
13258 13324 then
13259 13325 # The compiler can only warn and ignore the option if not recognized
... ... @@ -14563,7 +14629,7 @@ linux*)
14563 14629 libsuff=
14564 14630 case "$host_cpu" in
14565 14631 x86_64*|s390x*|powerpc64*)
14566   - echo '#line 14566 "configure"' > conftest.$ac_ext
  14632 + echo '#line 14632 "configure"' > conftest.$ac_ext
14567 14633 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14568 14634 (eval $ac_compile) 2>&5
14569 14635 ac_status=$?
... ... @@ -15304,11 +15370,11 @@ else
15304 15370 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
15305 15371 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
15306 15372 -e 's:$: $lt_compiler_flag:'`
15307   - (eval echo "\"\$as_me:15307: $lt_compile\"" >&5)
  15373 + (eval echo "\"\$as_me:15373: $lt_compile\"" >&5)
15308 15374 (eval "$lt_compile" 2>conftest.err)
15309 15375 ac_status=$?
15310 15376 cat conftest.err >&5
15311   - echo "$as_me:15311: \$? = $ac_status" >&5
  15377 + echo "$as_me:15377: \$? = $ac_status" >&5
15312 15378 if (exit $ac_status) && test -s "$ac_outfile"; then
15313 15379 # The compiler can only warn and ignore the option if not recognized
15314 15380 # So say no if there are warnings
... ... @@ -15537,11 +15603,11 @@ else
15537 15603 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
15538 15604 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
15539 15605 -e 's:$: $lt_compiler_flag:'`
15540   - (eval echo "\"\$as_me:15540: $lt_compile\"" >&5)
  15606 + (eval echo "\"\$as_me:15606: $lt_compile\"" >&5)
15541 15607 (eval "$lt_compile" 2>conftest.err)
15542 15608 ac_status=$?
15543 15609 cat conftest.err >&5
15544   - echo "$as_me:15544: \$? = $ac_status" >&5
  15610 + echo "$as_me:15610: \$? = $ac_status" >&5
15545 15611 if (exit $ac_status) && test -s "$ac_outfile"; then
15546 15612 # The compiler can only warn and ignore the option if not recognized
15547 15613 # So say no if there are warnings
... ... @@ -15597,11 +15663,11 @@ else
15597 15663 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
15598 15664 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
15599 15665 -e 's:$: $lt_compiler_flag:'`
15600   - (eval echo "\"\$as_me:15600: $lt_compile\"" >&5)
  15666 + (eval echo "\"\$as_me:15666: $lt_compile\"" >&5)
15601 15667 (eval "$lt_compile" 2>out/conftest.err)
15602 15668 ac_status=$?
15603 15669 cat out/conftest.err >&5
15604   - echo "$as_me:15604: \$? = $ac_status" >&5
  15670 + echo "$as_me:15670: \$? = $ac_status" >&5
15605 15671 if (exit $ac_status) && test -s out/conftest2.$ac_objext
15606 15672 then
15607 15673 # The compiler can only warn and ignore the option if not recognized
... ... @@ -16931,7 +16997,7 @@ linux*)
16931 16997 libsuff=
16932 16998 case "$host_cpu" in
16933 16999 x86_64*|s390x*|powerpc64*)
16934   - echo '#line 16934 "configure"' > conftest.$ac_ext
  17000 + echo '#line 17000 "configure"' > conftest.$ac_ext
16935 17001 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16936 17002 (eval $ac_compile) 2>&5
16937 17003 ac_status=$?
... ... @@ -17802,7 +17868,7 @@ else
17802 17868 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
17803 17869 lt_status=$lt_dlunknown
17804 17870 cat > conftest.$ac_ext <<EOF
17805   -#line 17805 "configure"
  17871 +#line 17871 "configure"
17806 17872 #include "confdefs.h"
17807 17873  
17808 17874 #if HAVE_DLFCN_H
... ... @@ -17900,7 +17966,7 @@ else
17900 17966 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
17901 17967 lt_status=$lt_dlunknown
17902 17968 cat > conftest.$ac_ext <<EOF
17903   -#line 17903 "configure"
  17969 +#line 17969 "configure"
17904 17970 #include "confdefs.h"
17905 17971  
17906 17972 #if HAVE_DLFCN_H
... ... @@ -18915,23 +18981,30 @@ LIBTOOL=&#39;$(SHELL) $(top_builddir)/libtool&#39;
18915 18981  
18916 18982  
18917 18983  
18918   -# AC_LANG(C)
18919   -# AC_PROG_CC
18920   -# AC_PROG_CPP
18921   -# AC_PROG_INSTALL
18922   -# AC_PROG_LN_S
18923   -
18924   -# Checks for libraries.
18925   -
18926   -# Checks for header files.
18927   -
18928   -# Checks for typedefs, structures, and compiler characteristics.
  18984 +# Check compiler features
18929 18985 # AC_TYPE_SIZE_T
18930 18986 # AC_C_CONST
18931 18987 # AC_C_VOLATILE
18932 18988 # AC_C_INLINE
18933 18989  
  18990 +# Checks for header files.
  18991 +
  18992 +# Checks for typedefs, structures, and compiler characteristics.
  18993 +
  18994 +# Checks for library functions.
  18995 +
  18996 +# Check for range cheking option.
  18997 +#RANGE_CHECK="no"
  18998 +#AC_ARG_ENABLE(range_check,
  18999 +# [ --enable-range-check performs index range checking],
  19000 +# [ RANGE_CHECK="$enableval"
  19001 +# ])
  19002 +#if test "x$RANGE_CHECK" = "xyes"; then
  19003 +# AC_DEFINE([G_RANGE_CHECK], [1],
  19004 +# [Define if range checking should be performed])
  19005 +#fi
18934 19006  
  19007 +#
18935 19008 ac_config_files="$ac_config_files Makefile src/Makefile test/Makefile"
18936 19009  
18937 19010 cat >confcache <<\_ACEOF
... ... @@ -19025,13 +19098,6 @@ LIBOBJS=$ac_libobjs
19025 19098 LTLIBOBJS=$ac_ltlibobjs
19026 19099  
19027 19100  
19028   -if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
19029   - { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined.
19030   -Usually this means the macro was only invoked conditionally." >&5
19031   -echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined.
19032   -Usually this means the macro was only invoked conditionally." >&2;}
19033   - { (exit 1); exit 1; }; }
19034   -fi
19035 19101  
19036 19102 : ${CONFIG_STATUS=./config.status}
19037 19103 ac_clean_files_save=$ac_clean_files
... ... @@ -19303,7 +19369,7 @@ _ASBOX
19303 19369 } >&5
19304 19370 cat >&5 <<_CSEOF
19305 19371  
19306   -This file was extended by gamma $as_me 0.1, which was
  19372 +This file was extended by GammaLib $as_me 0.1pre, which was
19307 19373 generated by GNU Autoconf 2.59. Invocation command line was
19308 19374  
19309 19375 CONFIG_FILES = $CONFIG_FILES
... ... @@ -19363,7 +19429,7 @@ _ACEOF
19363 19429  
19364 19430 cat >>$CONFIG_STATUS <<_ACEOF
19365 19431 ac_cs_version="\\
19366   -gamma config.status 0.1
  19432 +GammaLib config.status 0.1pre
19367 19433 configured by $0, generated by GNU Autoconf 2.59,
19368 19434 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
19369 19435  
... ... @@ -19576,9 +19642,6 @@ s,@am__leading_dot@,$am__leading_dot,;t t
19576 19642 s,@AMTAR@,$AMTAR,;t t
19577 19643 s,@am__tar@,$am__tar,;t t
19578 19644 s,@am__untar@,$am__untar,;t t
19579   -s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t
19580   -s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t
19581   -s,@MAINT@,$MAINT,;t t
19582 19645 s,@CXX@,$CXX,;t t
19583 19646 s,@CXXFLAGS@,$CXXFLAGS,;t t
19584 19647 s,@LDFLAGS@,$LDFLAGS,;t t
... ... @@ -19586,6 +19649,7 @@ s,@CPPFLAGS@,$CPPFLAGS,;t t
19586 19649 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
19587 19650 s,@EXEEXT@,$EXEEXT,;t t
19588 19651 s,@OBJEXT@,$OBJEXT,;t t
  19652 +s,@GAMMALIB_LT_VERSION@,$GAMMALIB_LT_VERSION,;t t
19589 19653 s,@build@,$build,;t t
19590 19654 s,@build_cpu@,$build_cpu,;t t
19591 19655 s,@build_vendor@,$build_vendor,;t t
... ... @@ -19610,7 +19674,6 @@ s,@F77@,$F77,;t t
19610 19674 s,@FFLAGS@,$FFLAGS,;t t
19611 19675 s,@ac_ct_F77@,$ac_ct_F77,;t t
19612 19676 s,@LIBTOOL@,$LIBTOOL,;t t
19613   -s,@LIBTOOL_DEPS@,$LIBTOOL_DEPS,;t t
19614 19677 s,@LIBOBJS@,$LIBOBJS,;t t
19615 19678 s,@LTLIBOBJS@,$LTLIBOBJS,;t t
19616 19679 CEOF
... ...
configure.ac
  1 +#
1 2 # Process this file with autoconf to produce a configure script.
2   -
3   -AC_INIT([gamma], [0.1], [knodlseder@cesr.fr])
4   -# AC_CONFIG_SRCDIR(src/gammalib.hpp)
5   -AC_CONFIG_SRCDIR(src/GException.hpp)
  3 +#
  4 +AC_INIT([GammaLib], [0.1pre], [knodlseder@cesr.fr])
  5 +AC_CONFIG_SRCDIR(src/GammaLib.hpp)
6 6  
7 7 AM_INIT_AUTOMAKE([gnu no-dependencies])
8 8 AM_CONFIG_HEADER([config.h])
9   -AM_MAINTAINER_MODE
  9 +#AM_MAINTAINER_MODE
10 10  
11 11 # things required by automake
12 12 # AC_ARG_PROGRAM
... ... @@ -17,24 +17,45 @@ AC_PROG_MAKE_SET
17 17  
18 18 # Checks for programs.
19 19 AC_PROG_CXX
20   -AC_PROG_LIBTOOL
21   -AC_SUBST(LIBTOOL_DEPS)
22 20 # AC_LANG(C)
23 21 # AC_PROG_CC
24 22 # AC_PROG_CPP
25   -# AC_PROG_INSTALL
  23 +AC_PROG_INSTALL
26 24 # AC_PROG_LN_S
27 25  
28   -# Checks for libraries.
  26 +# Library versioning (current:revision:age)
  27 +# See the libtool manual for an explanation
  28 +#
  29 +# gammalib-0.1 libgamma 0:0:0
  30 +GAMMALIB_LT_VERSION="0:0:0"
  31 +AC_SUBST(GAMMALIB_LT_VERSION)
29 32  
30   -# Checks for header files.
  33 +# libtool test.
  34 +AC_PROG_LIBTOOL
31 35  
32   -# Checks for typedefs, structures, and compiler characteristics.
  36 +# Check compiler features
33 37 # AC_TYPE_SIZE_T
34 38 # AC_C_CONST
35 39 # AC_C_VOLATILE
36 40 # AC_C_INLINE
37 41  
  42 +# Checks for header files.
  43 +
  44 +# Checks for typedefs, structures, and compiler characteristics.
  45 +
  46 +# Checks for library functions.
  47 +
  48 +# Check for range cheking option.
  49 +#RANGE_CHECK="no"
  50 +#AC_ARG_ENABLE(range_check,
  51 +# [ --enable-range-check performs index range checking],
  52 +# [ RANGE_CHECK="$enableval"
  53 +# ])
  54 +#if test "x$RANGE_CHECK" = "xyes"; then
  55 +# AC_DEFINE([G_RANGE_CHECK], [1],
  56 +# [Define if range checking should be performed])
  57 +#fi
38 58  
  59 +#
39 60 AC_CONFIG_FILES([Makefile src/Makefile test/Makefile])
40 61 AC_OUTPUT
... ...
src/GSparseMatrix.cpp
... ... @@ -30,6 +30,7 @@ using namespace std;
30 30 /* __ Debug definitions __________________________________________________ */
31 31 //#define G_DEBUG_SPARSE_PENDING // Analyse pending values
32 32 //#define G_DEBUG_SPARSE_INSERTION // Analyse value insertion
  33 +//#define G_DEBUG_SPARSE_ADDITION // Analyse value addition
33 34 //#define G_DEBUG_SPARSE_COMPRESSION // Analyse zero row/column compression
34 35 //#define G_DEBUG_SPARSE_MALLOC // Analyse memory management
35 36 //#define G_DEBUG_SPARSE_STACK_PUSH // Analyse stack column pushing
... ... @@ -650,6 +651,10 @@ GVector GSparseMatrix::extract_col(int col) const
650 651  
651 652 /***************************************************************************
652 653 * Insert vector column into matrix *
  654 + * ----------------------------------------------------------------------- *
  655 + * This is the main driver routine to insert data into a matrix. Note that *
  656 + * there is another instance of this function that takes a compressed *
  657 + * array. *
653 658 ***************************************************************************/
654 659 void GSparseMatrix::insert_col(const GVector& v, int col)
655 660 {
... ... @@ -712,7 +717,7 @@ void GSparseMatrix::insert_col(const GVector&amp; v, int col)
712 717 // increase the matrix size).
713 718 int n_diff = n_vector - n_exist;
714 719  
715   - // If we need space then allocate it, if we have to much space the free it
  720 + // If we need space then allocate it, if we have to much space then free it
716 721 if (n_diff > 0) {
717 722 alloc_elements(i_start, n_diff);
718 723 #if defined(G_DEBUG_SPARSE_INSERTION)
... ... @@ -761,14 +766,154 @@ void GSparseMatrix::insert_col(const GVector&amp; v, int col)
761 766  
762 767  
763 768 /***************************************************************************
  769 + * Insert compressed array into matrix *
  770 + * ----------------------------------------------------------------------- *
  771 + * This is the main driver routine to insert data into a matrix. Note that *
  772 + * there is another instance of this function that takes a vector. *
  773 + ***************************************************************************/
  774 +void GSparseMatrix::insert_col(const double* values, const int* rows,
  775 + int number, int col)
  776 +{
  777 + // Debug header
  778 + #if defined(G_DEBUG_SPARSE_INSERTION)
  779 + cout << "GSparseMatrix::insert_col(v, i, n, " << col << "):" << endl;
  780 + cout << " Matrix Data : ";
  781 + for (int i = 0; i < m_elements; ++i)
  782 + cout << m_data[i] << " ";
  783 + cout << endl << " Matrix Row .: ";
  784 + for (int i = 0; i < m_elements; ++i)
  785 + cout << m_rowinx[i] << " ";
  786 + cout << endl << " Matrix Col .: ";
  787 + for (int i = 0; i < m_cols+1; ++i)
  788 + cout << m_colstart[i] << " ";
  789 + cout << endl;
  790 + cout << " Array Data .: ";
  791 + for (int i = 0; i < number; ++i)
  792 + cout << values[i] << " ";
  793 + cout << endl << " Array Row ..: ";
  794 + for (int i = 0; i < number; ++i)
  795 + cout << rows[i] << " ";
  796 + cout << endl;
  797 + #endif
  798 +
  799 + // Raise an exception if the column index is invalid
  800 + #if defined(G_RANGE_CHECK)
  801 + if (col >= m_cols)
  802 + throw out_of_range("GSparseMatrix::insert_col(const double*, const int*, int, int)",
  803 + 0, col, m_rows, m_cols);
  804 + #endif
  805 +
  806 + // Raise an exception if the index array seems incompatible with matrix
  807 + // dimensions
  808 + if (rows[number-1] >= m_rows)
  809 + throw matrix_vector_mismatch("GSparseMatrix::insert_col(const GVector&, int)",
  810 + rows[number-1], m_rows, m_cols);
  811 +
  812 + // If there is a pending element for this column then delete it since
  813 + // the vector overwrites this element
  814 + if (m_fill_val != 0.0 && m_fill_col == col) {
  815 + #if defined(G_DEBUG_SPARSE_PENDING)
  816 + cout << "GSparseMatrix::insert_col(const GVector&, int): pending value " <<
  817 + m_fill_val << " for location (" << m_fill_row << "," << m_fill_col <<
  818 + ") became obsolete" << endl;
  819 + #endif
  820 + m_fill_val = 0.0;
  821 + m_fill_row = 0;
  822 + m_fill_col = 0;
  823 + }
  824 +
  825 + // Get the start and stop indices of the actual column and compute
  826 + // the number of exisiting elements in the column
  827 + int i_start = m_colstart[col];
  828 + int i_stop = m_colstart[col+1];
  829 + int n_exist = i_stop - i_start;
  830 +
  831 + // If the array is empty then make sure that the number of elements is 0
  832 + // (we then just delete the existing column)
  833 + if (!values || !rows)
  834 + number = 0;
  835 +
  836 + // Compute the size difference for the new matrix. It is positive if
  837 + // the number of non-zero entries in the array is larger than the
  838 + // number of non-zero entries in the matrix (in this case we have to
  839 + // increase the matrix size).
  840 + int n_diff = number - n_exist;
  841 +
  842 + // If we need space then allocate it, if we have to much space then free it
  843 + if (n_diff > 0) {
  844 + alloc_elements(i_start, n_diff);
  845 + #if defined(G_DEBUG_SPARSE_INSERTION)
  846 + cout << " Insert .: " << n_diff << " elements at index " << i_start << endl;
  847 + #endif
  848 + }
  849 + else if (n_diff < 0) {
  850 + free_elements(i_start, -n_diff);
  851 + #if defined(G_DEBUG_SPARSE_INSERTION)
  852 + cout << " Remove .: " << -n_diff << " elements at index " << i_start << endl;
  853 + #endif
  854 + }
  855 +
  856 + // Insert the array elements into the matrix
  857 + if (number > 0) {
  858 + for (int row = 0, i = i_start; row < number; ++row, ++i) {
  859 + m_data[i] = values[row];
  860 + m_rowinx[i] = rows[row];
  861 + }
  862 + }
  863 +
  864 + // Update column start indices
  865 + for (int i = col+1; i <= m_cols; ++i)
  866 + m_colstart[i] += n_diff;
  867 +
  868 + // Debugging: show sparse matrix after insertion
  869 + #if defined(G_DEBUG_SPARSE_INSERTION)
  870 + cout << " Out Data: ";
  871 + for (int i = 0; i < m_elements; ++i)
  872 + cout << m_data[i] << " ";
  873 + cout << endl << " Out Row : ";
  874 + for (int i = 0; i < m_elements; ++i)
  875 + cout << m_rowinx[i] << " ";
  876 + cout << endl << " Out Col : ";
  877 + for (int i = 0; i < m_cols+1; ++i)
  878 + cout << m_colstart[i] << " ";
  879 + cout << endl;
  880 + #endif
  881 +
  882 + // Return
  883 + return;
  884 +}
  885 +
  886 +
  887 +/***************************************************************************
764 888 * Add vector to matrix column *
  889 + * ----------------------------------------------------------------------- *
  890 + * This is the main driver routine to add data to a matrix. It handles *
  891 + * both normal and stack-based filled. Note that there is another instance *
  892 + * of this function that takes a compressed array. *
765 893 ***************************************************************************/
766 894 void GSparseMatrix::add_col(const GVector& v, int col)
767 895 {
  896 + // Debug header
  897 + #if defined(G_DEBUG_SPARSE_ADDITION)
  898 + cout << "GSparseMatrix::add_col([" << v << "], " << col << "):" << endl;
  899 + cout << " In Data : ";
  900 + for (int i = 0; i < m_elements; ++i)
  901 + cout << m_data[i] << " ";
  902 + cout << endl << " In Row .: ";
  903 + for (int i = 0; i < m_elements; ++i)
  904 + cout << m_rowinx[i] << " ";
  905 + cout << endl << " In Col .: ";
  906 + for (int i = 0; i < m_cols+1; ++i)
  907 + cout << m_colstart[i] << " ";
  908 + cout << endl;
  909 + #endif
  910 +
768 911 // Initialise number of non-zero elements to 0
769 912 int non_zero = 0;
770 913  
771   - // If we have a stack then try to push elements on stack first ...
  914 + // If we have a stack then try to push vector on stack first. Note that
  915 + // stack_push_column does its own argument verifications, so to avoid
  916 + // double checking we don't do anything before this call ...
772 917 if (m_stack_data != NULL) {
773 918 non_zero = stack_push_column(v, col);
774 919 if (non_zero == 0)
... ... @@ -812,9 +957,22 @@ void GSparseMatrix::add_col(const GVector&amp; v, int col)
812 957  
813 958 // Insert vector into matrix
814 959 insert_col(column, col);
815   -
816   -
  960 +
817 961 }
  962 +
  963 + // Debugging: show sparse matrix after addition
  964 + #if defined(G_DEBUG_SPARSE_ADDITION)
  965 + cout << " Out Data: ";
  966 + for (int i = 0; i < m_elements; ++i)
  967 + cout << m_data[i] << " ";
  968 + cout << endl << " Out Row : ";
  969 + for (int i = 0; i < m_elements; ++i)
  970 + cout << m_rowinx[i] << " ";
  971 + cout << endl << " Out Col : ";
  972 + for (int i = 0; i < m_cols+1; ++i)
  973 + cout << m_colstart[i] << " ";
  974 + cout << endl;
  975 + #endif
818 976  
819 977 // Return
820 978 return;
... ... @@ -822,6 +980,152 @@ void GSparseMatrix::add_col(const GVector&amp; v, int col)
822 980  
823 981  
824 982 /***************************************************************************
  983 + * Add compressed array to matrix column *
  984 + * ----------------------------------------------------------------------- *
  985 + * This is the main driver routine to add data to a matrix. It handles *
  986 + * both normal and stack-based filled. Note that there is another instance *
  987 + * of this function that takes a vector. *
  988 + ***************************************************************************/
  989 +void GSparseMatrix::add_col(const double* values, const int* rows,
  990 + int number, int col)
  991 +{
  992 + // Debug header
  993 + #if defined(G_DEBUG_SPARSE_ADDITION)
  994 + cout << "GSparseMatrix::add_col(v, i, n, " << col << "):" << endl;
  995 + cout << " Matrix Data : ";
  996 + for (int i = 0; i < m_elements; ++i)
  997 + cout << m_data[i] << " ";
  998 + cout << endl << " Matrix Row .: ";
  999 + for (int i = 0; i < m_elements; ++i)
  1000 + cout << m_rowinx[i] << " ";
  1001 + cout << endl << " Matrix Col .: ";
  1002 + for (int i = 0; i < m_cols+1; ++i)
  1003 + cout << m_colstart[i] << " ";
  1004 + cout << endl;
  1005 + cout << " Array Data .: ";
  1006 + for (int i = 0; i < number; ++i)
  1007 + cout << values[i] << " ";
  1008 + cout << endl << " Array Row ..: ";
  1009 + for (int i = 0; i < number; ++i)
  1010 + cout << rows[i] << " ";
  1011 + cout << endl;
  1012 + #endif
  1013 +
  1014 + // If we have a stack then try to push elements on stack first. Note that
  1015 + // stack_push_column does its own argument verifications, so to avoid
  1016 + // double checking we don't do anything before this call ...
  1017 + if (m_stack_data != NULL) {
  1018 + number = stack_push_column(values, rows, number, col);
  1019 + if (number == 0)
  1020 + return;
  1021 + }
  1022 +
  1023 + // ... otherwise check the arguments
  1024 + else {
  1025 + // If the array is empty there is nothing to do
  1026 + if (!values || !rows || (number < 1))
  1027 + return;
  1028 +
  1029 + // Raise an exception if the column index is invalid
  1030 + #if defined(G_RANGE_CHECK)
  1031 + if (col >= m_cols)
  1032 + throw out_of_range("GSparseMatrix::add_col(const double*, const int*, int, int)",
  1033 + 0, col, m_rows, m_cols);
  1034 + #endif
  1035 +
  1036 + // Raise an exception if the index array seems incompatible with matrix
  1037 + // dimensions
  1038 + if (rows[number-1] >= m_rows)
  1039 + throw matrix_vector_mismatch("GSparseMatrix::add_col(const double*, const int*, int, int)",
  1040 + rows[number-1], m_rows, m_cols);
  1041 + } // endelse: there was no stack
  1042 +
  1043 + // Get indices of column in matrix
  1044 + int i_start = m_colstart[col];
  1045 + int i_stop = m_colstart[col+1];
  1046 +
  1047 + // Case A: the column exists in the matrix, so mix new elements with existing
  1048 + // data
  1049 + if (i_start < i_stop) {
  1050 +
  1051 + // Allocate workspace to hold combined column
  1052 + int wrk_size = number + i_stop - i_start;
  1053 + double* wrk_double = new double[wrk_size];
  1054 + int* wrk_int = new int[wrk_size];
  1055 + if (wrk_double == NULL || wrk_int == NULL)
  1056 + throw mem_alloc("GSparseMatrix::add_col(const double*, const int*, int, int)",
  1057 + wrk_size);
  1058 +
  1059 + // Mix values while both are alive
  1060 + int k = 0;
  1061 + int index = 0;
  1062 + int row_m = m_rowinx[i_start];
  1063 + int row_s = rows[k];
  1064 + while (i_start < i_stop && k < number) {
  1065 + if (row_m == row_s) { // Case A: element in matrix and array
  1066 + wrk_double[index] = m_data[i_start] + values[k];
  1067 + wrk_int[index] = row_m;
  1068 + row_m = m_rowinx[++i_start];
  1069 + row_s = rows[++k];
  1070 + }
  1071 + else if (row_m < row_s) { // Case B: element in matrix only
  1072 + wrk_double[index] = m_data[i_start];
  1073 + wrk_int[index] = row_m;
  1074 + row_m = m_rowinx[++i_start];
  1075 + }
  1076 + else { // Case C: element in array only
  1077 + wrk_double[index] = values[k];
  1078 + wrk_int[index] = row_s;
  1079 + row_s = rows[++k];
  1080 + }
  1081 + index++;
  1082 + } // endwhile: mixing
  1083 +
  1084 + // Add remaining matrix elements if still alive
  1085 + for (int i = i_start; i < i_stop; ++i) {
  1086 + wrk_double[index] = m_data[i];
  1087 + wrk_int[index++] = m_rowinx[i];
  1088 + }
  1089 +
  1090 + // Add remaining array elements if still alive
  1091 + for (int k2 = k; k2 < number; ++k2) {
  1092 + wrk_double[index] = values[k2];
  1093 + wrk_int[index++] = rows[k2];
  1094 + }
  1095 +
  1096 + // Insert mixed column
  1097 + insert_col(wrk_double, wrk_int, index, col);
  1098 +
  1099 + // Free workspace
  1100 + delete [] wrk_int;
  1101 + delete [] wrk_double;
  1102 +
  1103 + } // endif: Case A
  1104 +
  1105 + // Case B: the column does not yet exist in the matrix, so just insert it
  1106 + else
  1107 + insert_col(values, rows, number, col);
  1108 +
  1109 + // Debugging: show sparse matrix after insertion
  1110 + #if defined(G_DEBUG_SPARSE_ADDITION)
  1111 + cout << " Out Data: ";
  1112 + for (int i = 0; i < m_elements; ++i)
  1113 + cout << m_data[i] << " ";
  1114 + cout << endl << " Out Row : ";
  1115 + for (int i = 0; i < m_elements; ++i)
  1116 + cout << m_rowinx[i] << " ";
  1117 + cout << endl << " Out Col : ";
  1118 + for (int i = 0; i < m_cols+1; ++i)
  1119 + cout << m_colstart[i] << " ";
  1120 + cout << endl;
  1121 + #endif
  1122 +
  1123 + // Return
  1124 + return;
  1125 +}
  1126 +
  1127 +
  1128 +/***************************************************************************
825 1129 * Convert matrix into full matrix *
826 1130 ***************************************************************************/
827 1131 GMatrix GSparseMatrix::convert_to_full() const
... ... @@ -1228,7 +1532,7 @@ int GSparseMatrix::stack_push_column(const GVector&amp; v, int col)
1228 1532 throw matrix_vector_mismatch("GSparseMatrix::stack_push_column(const GVector&, int)",
1229 1533 v.m_num, m_rows, m_cols);
1230 1534  
1231   - // Determines how many elements should be stored in stack
  1535 + // Determine how many elements should be stored in stack
1232 1536 int elements = 0;
1233 1537 for (int i = 0; i < v.m_num; ++i) {
1234 1538 if (v.m_data[i] != 0.0)
... ... @@ -1301,6 +1605,91 @@ int GSparseMatrix::stack_push_column(const GVector&amp; v, int col)
1301 1605  
1302 1606  
1303 1607 /***************************************************************************
  1608 + * Push a compressed array on the matrix stack *
  1609 + * ----------------------------------------------------------------------- *
  1610 + * The return value indicates if the vector was successfully pushed onto *
  1611 + * the stack (=0) or if the elements need to be added directly (in this *
  1612 + * case the return value equals to the number of non-zero elements in the *
  1613 + * vector. *
  1614 + ***************************************************************************/
  1615 +int GSparseMatrix::stack_push_column(const double* values, const int* rows,
  1616 + int number, int col)
  1617 +{
  1618 + // If the array is empty there is nothing to do
  1619 + if (!values || !rows || (number < 1))
  1620 + return 0;
  1621 +
  1622 + // If there is no stack or the stack can not hold the requested number of
  1623 + // elements then report number of array elements to the caller
  1624 + if (m_stack_data == NULL || number > m_stack_size)
  1625 + return number;
  1626 +
  1627 + // Raise an exception if the column index is invalid
  1628 + #if defined(G_RANGE_CHECK)
  1629 + if (col >= m_cols)
  1630 + throw out_of_range("GSparseMatrix::stack_push_column(const double*, const int*, int, int)", 0, col, m_rows, m_cols);
  1631 + #endif
  1632 +
  1633 + // Raise an exception if the index array seems incompatible with matrix
  1634 + // dimensions
  1635 + if (rows[number-1] >= m_rows)
  1636 + throw matrix_vector_mismatch("GSparseMatrix::stack_push_column(const double*, const int*, int, int)", rows[number-1], m_rows, m_cols);
  1637 +
  1638 + // If the specified column is already in the stack then flush stack (we don't
  1639 + // allow the same column twice)
  1640 + for (int i = 0; i < m_stack_entries; ++i) {
  1641 + if (col == m_stack_colinx[i]) {
  1642 + stack_flush();
  1643 + break;
  1644 + }
  1645 + }
  1646 +
  1647 + // If the stack is full then flush it before pushing the array onto it
  1648 + if ((m_stack_entries >= m_stack_max_entries) ||
  1649 + (number >= (m_stack_size - m_stack_start[m_stack_entries])))
  1650 + stack_flush();
  1651 +
  1652 + // Push the array on the stack
  1653 + int inx = m_stack_start[m_stack_entries];
  1654 + for (int i = 0; i < number; ++i) {
  1655 + m_stack_data[inx] = values[i];
  1656 + m_stack_rowinx[inx] = rows[i];
  1657 + inx++;
  1658 + }
  1659 +
  1660 + // Store entry information and initialise start of next entry
  1661 + m_stack_colinx[m_stack_entries] = col; // Store column index for entry
  1662 + m_stack_entries++; // Increase the # of entries
  1663 + m_stack_start[m_stack_entries] = inx; // Set start pointer for next entry
  1664 +
  1665 + // Debug: show stack information
  1666 + #if defined(G_DEBUG_SPARSE_STACK_PUSH)
  1667 + cout << "GSparseMatrix::stack_push_column(v, i, n, col=" << col << ")" << endl;
  1668 + cout << " Number of entries: " << m_stack_entries << endl;
  1669 + cout << " Entry columns ...:";
  1670 + for (int i = 0; i < m_stack_entries; ++i)
  1671 + cout << " " << m_stack_colinx[i];
  1672 + cout << endl;
  1673 + cout << " Entry starts ....:";
  1674 + for (int i = 0; i < m_stack_entries; ++i)
  1675 + cout << " " << m_stack_start[i];
  1676 + cout << " (next at " << m_stack_start[m_stack_entries] << ")" << endl;
  1677 + cout << " Stack data ......:";
  1678 + for (int i = 0; i < m_stack_start[m_stack_entries]; ++i)
  1679 + cout << " " << m_stack_data[i];
  1680 + cout << endl;
  1681 + cout << " Stack rows ......:";
  1682 + for (int i = 0; i < m_stack_start[m_stack_entries]; ++i)
  1683 + cout << " " << m_stack_rowinx[i];
  1684 + cout << endl;
  1685 + #endif
  1686 +
  1687 + // Return success
  1688 + return 0;
  1689 +}
  1690 +
  1691 +
  1692 +/***************************************************************************
1304 1693 * Flush matrix stack *
1305 1694 * ----------------------------------------------------------------------- *
1306 1695 * Adds the stack to the actual matrix. First, the total number of matrix *
... ... @@ -1363,29 +1752,32 @@ void GSparseMatrix::stack_flush(void)
1363 1752 int k_stop = m_stack_start[entry+1];
1364 1753 int row_m = m_rowinx[i_start];
1365 1754 int row_s = m_stack_rowinx[k_start];
1366   - if (k_start < k_stop && i_start < i_stop) {
1367   - wrk_int[col] = -(entry+2); // Flag that we have to mix
1368   - while (i_start < i_stop || k_start < k_stop) {
1369   - if (row_m == row_s) { // Case A: element in matrix and stack
1370   - i_start++;
1371   - k_start++;
1372   - row_m = (i_start < i_stop) ? m_rowinx[i_start] : m_rows+1;
1373   - row_s = (k_start < k_stop) ? m_stack_rowinx[k_start] : m_rows+1;
1374   - }
1375   - else if (row_m < row_s) { // Case B: element in matrix only
1376   - i_start++;
1377   - row_m = (i_start < i_stop) ? m_rowinx[i_start] : m_rows+1;
1378   - }
1379   - else { // Case C: element in stack only
1380   - k_start++;
1381   - row_s = (k_start < k_stop) ? m_stack_rowinx[k_start] : m_rows+1;
1382   - new_elements++;
1383   - }
1384   - } // endwhile: mixing
1385   - } // endif: there were elements in stack
  1755 +
  1756 + // Flag that this is a mixed column
  1757 + wrk_int[col] = -(entry+2);
  1758 +
  1759 + // Mix while both are alive
  1760 + while (i_start < i_stop && k_start < k_stop) {
  1761 + if (row_m == row_s) { // Case A: element in matrix and stack
  1762 + row_m = m_rowinx[++i_start]; // Get next matrix row number
  1763 + row_s = m_stack_rowinx[++k_start]; // Get next stack row number
  1764 + }
  1765 + else if (row_m < row_s) { // Case B: element in matrix only
  1766 + row_m = m_rowinx[++i_start]; // Get next matrix row number
  1767 + }
  1768 + else { // Case C: element in stack only
  1769 + row_s = m_stack_rowinx[++k_start]; // Get next stack row number
  1770 + new_elements++; // Count the new element
  1771 + }
  1772 + } // endwhile: mixing while both are alive
  1773 +
  1774 + // Add remaining stack elements if still alive
  1775 + if (k_start < k_stop)
  1776 + new_elements += (k_stop - k_start);
  1777 +
1386 1778 } // endif: column existed in the matrix
1387 1779  
1388   - // Column did not exists in the matrix, so it's newand we add all elements
  1780 + // Column did not exists in the matrix, so it's new and we add all elements
1389 1781 else {
1390 1782 wrk_int[col] = (entry+2);
1391 1783 new_elements += (m_stack_start[entry+1] - m_stack_start[entry]);
... ... @@ -1458,35 +1850,49 @@ void GSparseMatrix::stack_flush(void)
1458 1850 int k_stop = m_stack_start[entry+1];
1459 1851 int row_m = m_rowinx[i_start];
1460 1852 int row_s = m_stack_rowinx[k_start];
1461   - if (k_start < k_stop && i_start < i_stop) {
1462   - while (i_start < i_stop || k_start < k_stop) {
1463   - if (row_m == row_s) { // Case A: element in matrix and stack
1464   - new_data[index] = m_data[i_start] + m_stack_data[k_start];
1465   - new_rowinx[index] = row_m;
1466   - i_start++;
1467   - k_start++;
1468   - row_m = (i_start < i_stop) ? m_rowinx[i_start] : m_rows+1;
1469   - row_s = (k_start < k_stop) ? m_stack_rowinx[k_start] : m_rows+1;
1470   - }
1471   - else if (row_m < row_s) { // Case B: element in matrix only
1472   - new_data[index] = m_data[i_start];
1473   - new_rowinx[index] = row_m;
1474   - i_start++;
1475   - row_m = (i_start < i_stop) ? m_rowinx[i_start] : m_rows+1;
1476   - }
1477   - else { // Case C: element in stack only
1478   - new_data[index] = m_stack_data[k_start];
1479   - new_rowinx[index] = row_s;
1480   - k_start++;
1481   - row_s = (k_start < k_stop) ? m_stack_rowinx[k_start] : m_rows+1;
1482   - }
1483   - index++;
1484   - #if defined(G_DEBUG_SPARSE_STACK_FLUSH)
1485   - num_mix++;
1486   - #endif
1487   - } // endwhile: mixing
1488   - } // endif: there were elements in stack
1489   -
  1853 +
  1854 + // Mix while both are alive
  1855 + while (i_start < i_stop && k_start < k_stop) {
  1856 + if (row_m == row_s) { // Case A: element in matrix and stack
  1857 + new_data[index] = m_data[i_start] + m_stack_data[k_start];
  1858 + new_rowinx[index] = row_m;
  1859 + row_m = m_rowinx[++i_start];
  1860 + row_s = m_stack_rowinx[++k_start];
  1861 + }
  1862 + else if (row_m < row_s) { // Case B: element in matrix only
  1863 + new_data[index] = m_data[i_start];
  1864 + new_rowinx[index] = row_m;
  1865 + row_m = m_rowinx[++i_start];
  1866 + }
  1867 + else { // Case C: element in stack only
  1868 + new_data[index] = m_stack_data[k_start];
  1869 + new_rowinx[index] = row_s;
  1870 + row_s = m_stack_rowinx[++k_start];
  1871 + }
  1872 + index++;
  1873 + #if defined(G_DEBUG_SPARSE_STACK_FLUSH)
  1874 + num_mix++;
  1875 + #endif
  1876 + } // endwhile: mixing
  1877 +
  1878 + // Add remaining matrix elements if still alive
  1879 + for (int i = i_start; i < i_stop; ++i) {
  1880 + new_data[index] = m_data[i];
  1881 + new_rowinx[index++] = m_rowinx[i];
  1882 + #if defined(G_DEBUG_SPARSE_STACK_FLUSH)
  1883 + num_mix++;
  1884 + #endif
  1885 + }
  1886 +
  1887 + // Add remaining stack elements if still alive
  1888 + for (int k = k_start; k < k_stop; ++k) {
  1889 + new_data[index] = m_stack_data[k];
  1890 + new_rowinx[index++] = m_stack_rowinx[k];
  1891 + #if defined(G_DEBUG_SPARSE_STACK_FLUSH)
  1892 + num_mix++;
  1893 + #endif
  1894 + }
  1895 +
1490 1896 } // endelse: we had to mix the entries
1491 1897  
1492 1898 // Store actual index in column start array
... ... @@ -1496,7 +1902,7 @@ void GSparseMatrix::stack_flush(void)
1496 1902  
1497 1903 // Dump number of elements in new matrix after addition
1498 1904 #if defined(G_DEBUG_SPARSE_STACK_FLUSH)
1499   - cout << " Added elements ..: " << index << " (sould be " << elements << ")" << endl;
  1905 + cout << " Added elements ..: " << index << " (should be " << elements << ")" << endl;
1500 1906 cout << " - Matrix only ...: " << num_orig << endl;
1501 1907 cout << " - Stack only ....: " << num_stack << endl;
1502 1908 cout << " - Matrix & Stack : " << num_mix << endl;
... ...
src/GSparseMatrix.hpp
... ... @@ -98,7 +98,9 @@ public:
98 98 virtual GVector extract_row(int row) const;
99 99 virtual GVector extract_col(int col) const;
100 100 virtual void insert_col(const GVector& v, int col);
  101 + virtual void insert_col(const double* values, const int* rows, int number, int col);
101 102 virtual void add_col(const GVector& v, int col);
  103 + virtual void add_col(const double* values, const int* rows, int number, int col);
102 104 virtual void set_mem_block(int block);
103 105 virtual GMatrix convert_to_full() const;
104 106 //TBD virtual GMatrix extract_lower_triangle() const;
... ... @@ -110,6 +112,7 @@ public:
110 112 // Stack functions
111 113 virtual void stack_init(int size = 0, int entries = 0);
112 114 virtual int stack_push_column(const GVector& v, int col);
  115 + virtual int stack_push_column(const double* values, const int* rows, int number, int col);
113 116 virtual void stack_flush(void);
114 117 virtual void stack_destroy(void);
115 118  
... ...
src/Makefile.am
1 1 ## Process this file with automake to produce Makefile.in
2 2  
3   -SUBDIRS = src test
  3 +files = GammaLib.hpp \
  4 + GException.hpp GException.cpp \
  5 + GVector.hpp GVector.cpp \
  6 + GMatrix.hpp GMatrix.cpp \
  7 + GSymMatrix.hpp GSymMatrix.cpp \
  8 + GSparseMatrix.hpp GSparseMatrix.cpp \
  9 + GSparseSymbolic.hpp GSparseSymbolic.cpp \
  10 + GSparseNumeric.hpp GSparseNumeric.cpp
4 11  
  12 +# Define package included headers (to be installed)
  13 +pkginclude_HEADERS = GammaLib.hpp \
  14 + GException.hpp \
  15 + GVector.hpp \
  16 + GMatrix.hpp \
  17 + GSymMatrix.hpp \
  18 + GSparseMatrix.hpp \
  19 + GSparseSymbolic.hpp \
  20 + GSparseNumeric.hpp
  21 +
  22 +# Build dynamic library
  23 +lib_LTLIBRARIES = libgamma.la
  24 +libgamma_la_SOURCES = $(files)
  25 +libgamma_la_LDFLAGS = -version-info $(GAMMALIB_LT_VERSION)
... ...
src/Makefile.in
... ... @@ -14,7 +14,8 @@
14 14  
15 15 @SET_MAKE@
16 16  
17   -SOURCES = $(libgamma_a_SOURCES)
  17 +
  18 +SOURCES = $(libgamma_la_SOURCES)
18 19  
19 20 srcdir = @srcdir@
20 21 top_srcdir = @top_srcdir@
... ... @@ -39,7 +40,8 @@ POST_UNINSTALL = :
39 40 build_triplet = @build@
40 41 host_triplet = @host@
41 42 subdir = src
42   -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
  43 +DIST_COMMON = $(pkginclude_HEADERS) $(srcdir)/Makefile.am \
  44 + $(srcdir)/Makefile.in
43 45 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
44 46 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
45 47 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
... ... @@ -47,15 +49,20 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
47 49 mkinstalldirs = $(install_sh) -d
48 50 CONFIG_HEADER = $(top_builddir)/config.h
49 51 CONFIG_CLEAN_FILES =
50   -LIBRARIES = $(noinst_LIBRARIES)
51   -ARFLAGS = cru
52   -libgamma_a_AR = $(AR) $(ARFLAGS)
53   -libgamma_a_LIBADD =
54   -am__objects_1 = GException.$(OBJEXT) GVector.$(OBJEXT) \
55   - GMatrix.$(OBJEXT) GSymMatrix.$(OBJEXT) GSparseMatrix.$(OBJEXT) \
56   - GSparseSymbolic.$(OBJEXT) GSparseNumeric.$(OBJEXT)
57   -am_libgamma_a_OBJECTS = $(am__objects_1)
58   -libgamma_a_OBJECTS = $(am_libgamma_a_OBJECTS)
  52 +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
  53 +am__vpath_adj = case $$p in \
  54 + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
  55 + *) f=$$p;; \
  56 + esac;
  57 +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
  58 +am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgincludedir)"
  59 +libLTLIBRARIES_INSTALL = $(INSTALL)
  60 +LTLIBRARIES = $(lib_LTLIBRARIES)
  61 +libgamma_la_LIBADD =
  62 +am__objects_1 = GException.lo GVector.lo GMatrix.lo GSymMatrix.lo \
  63 + GSparseMatrix.lo GSparseSymbolic.lo GSparseNumeric.lo
  64 +am_libgamma_la_OBJECTS = $(am__objects_1)
  65 +libgamma_la_OBJECTS = $(am_libgamma_la_OBJECTS)
59 66 DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
60 67 depcomp =
61 68 am__depfiles_maybe =
... ... @@ -75,8 +82,10 @@ LTCOMPILE = $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) \
75 82 CCLD = $(CC)
76 83 LINK = $(LIBTOOL) --mode=link --tag=CC $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
77 84 $(AM_LDFLAGS) $(LDFLAGS) -o $@
78   -SOURCES = $(libgamma_a_SOURCES)
79   -DIST_SOURCES = $(libgamma_a_SOURCES)
  85 +SOURCES = $(libgamma_la_SOURCES)
  86 +DIST_SOURCES = $(libgamma_la_SOURCES)
  87 +pkgincludeHEADERS_INSTALL = $(INSTALL_HEADER)
  88 +HEADERS = $(pkginclude_HEADERS)
80 89 ETAGS = etags
81 90 CTAGS = ctags
82 91 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
... ... @@ -104,6 +113,7 @@ EGREP = @EGREP@
104 113 EXEEXT = @EXEEXT@
105 114 F77 = @F77@
106 115 FFLAGS = @FFLAGS@
  116 +GAMMALIB_LT_VERSION = @GAMMALIB_LT_VERSION@
107 117 INSTALL_DATA = @INSTALL_DATA@
108 118 INSTALL_PROGRAM = @INSTALL_PROGRAM@
109 119 INSTALL_SCRIPT = @INSTALL_SCRIPT@
... ... @@ -112,12 +122,8 @@ LDFLAGS = @LDFLAGS@
112 122 LIBOBJS = @LIBOBJS@
113 123 LIBS = @LIBS@
114 124 LIBTOOL = @LIBTOOL@
115   -LIBTOOL_DEPS = @LIBTOOL_DEPS@
116 125 LN_S = @LN_S@
117 126 LTLIBOBJS = @LTLIBOBJS@
118   -MAINT = @MAINT@
119   -MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
120   -MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
121 127 MAKEINFO = @MAKEINFO@
122 128 OBJEXT = @OBJEXT@
123 129 PACKAGE = @PACKAGE@
... ... @@ -169,7 +175,8 @@ sbindir = @sbindir@
169 175 sharedstatedir = @sharedstatedir@
170 176 sysconfdir = @sysconfdir@
171 177 target_alias = @target_alias@
172   -files = GException.hpp GException.cpp \
  178 +files = GammaLib.hpp \
  179 + GException.hpp GException.cpp \
173 180 GVector.hpp GVector.cpp \
174 181 GMatrix.hpp GMatrix.cpp \
175 182 GSymMatrix.hpp GSymMatrix.cpp \
... ... @@ -178,19 +185,26 @@ files = GException.hpp GException.cpp \
178 185 GSparseNumeric.hpp GSparseNumeric.cpp
179 186  
180 187  
181   -# Build dynamic library
182   -#lib_LTLIBRARIES = libgamma.la
183   -#libgamma_la_SOURCES = $(files)
184   -#libgamma_la_LDFLAGS =
  188 +# Define package included headers (to be installed)
  189 +pkginclude_HEADERS = GammaLib.hpp \
  190 + GException.hpp \
  191 + GVector.hpp \
  192 + GMatrix.hpp \
  193 + GSymMatrix.hpp \
  194 + GSparseMatrix.hpp \
  195 + GSparseSymbolic.hpp \
  196 + GSparseNumeric.hpp
  197 +
185 198  
186   -# Build static library
187   -noinst_LIBRARIES = libgamma.a
188   -libgamma_a_SOURCES = $(files)
  199 +# Build dynamic library
  200 +lib_LTLIBRARIES = libgamma.la
  201 +libgamma_la_SOURCES = $(files)
  202 +libgamma_la_LDFLAGS = -version-info $(GAMMALIB_LT_VERSION)
189 203 all: all-am
190 204  
191 205 .SUFFIXES:
192 206 .SUFFIXES: .cpp .lo .o .obj
193   -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
  207 +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
194 208 @for dep in $?; do \
195 209 case '$(am__configure_deps)' in \
196 210 *$$dep*) \
... ... @@ -215,17 +229,39 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
215 229 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
216 230 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
217 231  
218   -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
  232 +$(top_srcdir)/configure: $(am__configure_deps)
219 233 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
220   -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
  234 +$(ACLOCAL_M4): $(am__aclocal_m4_deps)
221 235 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
  236 +install-libLTLIBRARIES: $(lib_LTLIBRARIES)
  237 + @$(NORMAL_INSTALL)
  238 + test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
  239 + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
  240 + if test -f $$p; then \
  241 + f=$(am__strip_dir) \
  242 + echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
  243 + $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
  244 + else :; fi; \
  245 + done
  246 +
  247 +uninstall-libLTLIBRARIES:
  248 + @$(NORMAL_UNINSTALL)
  249 + @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \
  250 + p=$(am__strip_dir) \
  251 + echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
  252 + $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
  253 + done
222 254  
223   -clean-noinstLIBRARIES:
224   - -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
225   -libgamma.a: $(libgamma_a_OBJECTS) $(libgamma_a_DEPENDENCIES)
226   - -rm -f libgamma.a
227   - $(libgamma_a_AR) libgamma.a $(libgamma_a_OBJECTS) $(libgamma_a_LIBADD)
228   - $(RANLIB) libgamma.a
  255 +clean-libLTLIBRARIES:
  256 + -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
  257 + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
  258 + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
  259 + test "$$dir" != "$$p" || dir=.; \
  260 + echo "rm -f \"$${dir}/so_locations\""; \
  261 + rm -f "$${dir}/so_locations"; \
  262 + done
  263 +libgamma.la: $(libgamma_la_OBJECTS) $(libgamma_la_DEPENDENCIES)
  264 + $(CXXLINK) -rpath $(libdir) $(libgamma_la_LDFLAGS) $(libgamma_la_OBJECTS) $(libgamma_la_LIBADD) $(LIBS)
229 265  
230 266 mostlyclean-compile:
231 267 -rm -f *.$(OBJEXT)
... ... @@ -251,6 +287,23 @@ clean-libtool:
251 287 distclean-libtool:
252 288 -rm -f libtool
253 289 uninstall-info-am:
  290 +install-pkgincludeHEADERS: $(pkginclude_HEADERS)
  291 + @$(NORMAL_INSTALL)
  292 + test -z "$(pkgincludedir)" || $(mkdir_p) "$(DESTDIR)$(pkgincludedir)"
  293 + @list='$(pkginclude_HEADERS)'; for p in $$list; do \
  294 + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
  295 + f=$(am__strip_dir) \
  296 + echo " $(pkgincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgincludedir)/$$f'"; \
  297 + $(pkgincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgincludedir)/$$f"; \
  298 + done
  299 +
  300 +uninstall-pkgincludeHEADERS:
  301 + @$(NORMAL_UNINSTALL)
  302 + @list='$(pkginclude_HEADERS)'; for p in $$list; do \
  303 + f=$(am__strip_dir) \
  304 + echo " rm -f '$(DESTDIR)$(pkgincludedir)/$$f'"; \
  305 + rm -f "$(DESTDIR)$(pkgincludedir)/$$f"; \
  306 + done
254 307  
255 308 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
256 309 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
... ... @@ -329,8 +382,11 @@ distdir: $(DISTFILES)
329 382 done
330 383 check-am: all-am
331 384 check: check-am
332   -all-am: Makefile $(LIBRARIES)
  385 +all-am: Makefile $(LTLIBRARIES) $(HEADERS)
333 386 installdirs:
  387 + for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgincludedir)"; do \
  388 + test -z "$$dir" || $(mkdir_p) "$$dir"; \
  389 + done
334 390 install: install-am
335 391 install-exec: install-exec-am
336 392 install-data: install-data-am
... ... @@ -357,7 +413,7 @@ maintainer-clean-generic:
357 413 @echo "it deletes files that may require special tools to rebuild."
358 414 clean: clean-am
359 415  
360   -clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \
  416 +clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
361 417 mostlyclean-am
362 418  
363 419 distclean: distclean-am
... ... @@ -375,9 +431,9 @@ info: info-am
375 431  
376 432 info-am:
377 433  
378   -install-data-am:
  434 +install-data-am: install-pkgincludeHEADERS
379 435  
380   -install-exec-am:
  436 +install-exec-am: install-libLTLIBRARIES
381 437  
382 438 install-info: install-info-am
383 439  
... ... @@ -402,21 +458,23 @@ ps: ps-am
402 458  
403 459 ps-am:
404 460  
405   -uninstall-am: uninstall-info-am
  461 +uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES \
  462 + uninstall-pkgincludeHEADERS
406 463  
407 464 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
408   - clean-libtool clean-noinstLIBRARIES ctags distclean \
  465 + clean-libLTLIBRARIES clean-libtool ctags distclean \
409 466 distclean-compile distclean-generic distclean-libtool \
410 467 distclean-tags distdir dvi dvi-am html html-am info info-am \
411 468 install install-am install-data install-data-am install-exec \
412   - install-exec-am install-info install-info-am install-man \
  469 + install-exec-am install-info install-info-am \
  470 + install-libLTLIBRARIES install-man install-pkgincludeHEADERS \
413 471 install-strip installcheck installcheck-am installdirs \
414 472 maintainer-clean maintainer-clean-generic mostlyclean \
415 473 mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
416 474 pdf pdf-am ps ps-am tags uninstall uninstall-am \
417   - uninstall-info-am
  475 + uninstall-info-am uninstall-libLTLIBRARIES \
  476 + uninstall-pkgincludeHEADERS
418 477  
419   -#libgamma_a_LDFLAGS =
420 478 # Tell versions [3.59,3.63) of GNU make to not export all variables.
421 479 # Otherwise a system limit (for SysV at least) may be exceeded.
422 480 .NOEXPORT:
... ...
test/Makefile.am
1 1 ## Process this file with automake to produce Makefile.in
2 2  
3   -SUBDIRS = src test
4   -
  3 +check_PROGRAMS = test_GVector \
  4 + test_GMatrix \
  5 + test_GSymMatrix \
  6 + test_GSparseMatrix
  7 +TESTS = test_GVector \
  8 + test_GMatrix \
  9 + test_GSymMatrix \
  10 + test_GSparseMatrix
  11 +test_GVector_SOURCES = test_GVector.cpp
  12 +test_GVector_LDADD = ../src/libgamma.a
  13 +test_GMatrix_SOURCES = test_GMatrix.cpp
  14 +test_GMatrix_LDADD = ../src/libgamma.a
  15 +test_GSymMatrix_SOURCES = test_GSymMatrix.cpp
  16 +test_GSymMatrix_LDADD = ../src/libgamma.a
  17 +test_GSparseMatrix_SOURCES = test_GSparseMatrix.cpp
  18 +test_GSparseMatrix_LDADD = ../src/libgamma.a
... ...
test/Makefile.in
... ... @@ -102,6 +102,7 @@ EGREP = @EGREP@
102 102 EXEEXT = @EXEEXT@
103 103 F77 = @F77@
104 104 FFLAGS = @FFLAGS@
  105 +GAMMALIB_LT_VERSION = @GAMMALIB_LT_VERSION@
105 106 INSTALL_DATA = @INSTALL_DATA@
106 107 INSTALL_PROGRAM = @INSTALL_PROGRAM@
107 108 INSTALL_SCRIPT = @INSTALL_SCRIPT@
... ... @@ -110,12 +111,8 @@ LDFLAGS = @LDFLAGS@
110 111 LIBOBJS = @LIBOBJS@
111 112 LIBS = @LIBS@
112 113 LIBTOOL = @LIBTOOL@
113   -LIBTOOL_DEPS = @LIBTOOL_DEPS@
114 114 LN_S = @LN_S@
115 115 LTLIBOBJS = @LTLIBOBJS@
116   -MAINT = @MAINT@
117   -MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
118   -MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
119 116 MAKEINFO = @MAKEINFO@
120 117 OBJEXT = @OBJEXT@
121 118 PACKAGE = @PACKAGE@
... ... @@ -173,22 +170,18 @@ TESTS = test_GVector \
173 170 test_GSparseMatrix
174 171  
175 172 test_GVector_SOURCES = test_GVector.cpp
176   -#test_GVector_LDADD = ../src/libgamma.la
177 173 test_GVector_LDADD = ../src/libgamma.a
178 174 test_GMatrix_SOURCES = test_GMatrix.cpp
179   -#test_GMatrix_LDADD = ../src/libgamma.la
180 175 test_GMatrix_LDADD = ../src/libgamma.a
181 176 test_GSymMatrix_SOURCES = test_GSymMatrix.cpp
182   -#test_GSymMatrix_LDADD = ../src/libgamma.la
183 177 test_GSymMatrix_LDADD = ../src/libgamma.a
184 178 test_GSparseMatrix_SOURCES = test_GSparseMatrix.cpp
185   -#test_GSparseMatrix_LDADD = ../src/libgamma.la
186   -test_GSparseMatrix_LDADD = ../src/libgamma.a -lc_p
  179 +test_GSparseMatrix_LDADD = ../src/libgamma.a
187 180 all: all-am
188 181  
189 182 .SUFFIXES:
190 183 .SUFFIXES: .cpp .lo .o .obj
191   -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
  184 +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
192 185 @for dep in $?; do \
193 186 case '$(am__configure_deps)' in \
194 187 *$$dep*) \
... ... @@ -213,9 +206,9 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
213 206 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
214 207 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
215 208  
216   -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
  209 +$(top_srcdir)/configure: $(am__configure_deps)
217 210 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
218   -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
  211 +$(ACLOCAL_M4): $(am__aclocal_m4_deps)
219 212 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
220 213  
221 214 clean-checkPROGRAMS:
... ...
test/test_GMatrix.hpp
... ... @@ -15,8 +15,7 @@
15 15 #define TEST_GMATRIX_HPP
16 16  
17 17 /* __ Includes ___________________________________________________________ */
18   -#include "../src/GVector.hpp"
19   -#include "../src/GMatrix.hpp"
  18 +#include "../src/GammaLib.hpp"
20 19 #include <iostream> // cout, cerr
21 20 #include <stdexcept> // std::exception
22 21 #include <math.h>
... ...
test/test_GSparseMatrix.cpp
... ... @@ -22,13 +22,13 @@ using namespace std;
22 22 #define DUMP_TIMING // Dump timing
23 23  
24 24 /* __ Globals ____________________________________________________________ */
25   -double g_matrix[] = {1.0, 7.0, 3.0, 2.0, 4.0, 8.0, 5.0, 6.0, 9.0};
26   -int g_row[] = { 0, 0, 1, 2, 2, 2, 3, 3, 3};
27   -int g_col[] = { 0, 4, 1, 0, 2, 4, 2, 3, 4};
28   -double g_vector[] = {1.0, 2.0, 3.0, 4.0, 5.0};
29   -int g_elements = 9;
30   -int g_rows = 4;
31   -int g_cols = 5;
  25 +double g_matrix[] = {1.0, 7.0, 3.0, 2.0, 4.0, 8.0, 5.0, 6.0, 9.0};
  26 +int g_row[] = { 0, 0, 1, 2, 2, 2, 3, 3, 3};
  27 +int g_col[] = { 0, 4, 1, 0, 2, 4, 2, 3, 4};
  28 +double g_vector[] = {1.0, 2.0, 3.0, 4.0, 5.0};
  29 +int g_elements = 9;
  30 +int g_rows = 4;
  31 +int g_cols = 5;
32 32  
33 33  
34 34 /***************************************************************************
... ... @@ -761,6 +761,34 @@ void test_arithmetics(const GSparseMatrix&amp; m_test)
761 761 throw;
762 762 }
763 763 cout << ".";
  764 + //
  765 + // GSparseMatrix.add_col() using a compressed array
  766 + GSparseMatrix compare = m_test;
  767 + GVector v_sparse(g_rows);
  768 + for (int i = 0; i < g_rows; i += 2) // Build vector for comparison
  769 + v_sparse(i) = 7.0;
  770 + for (int col = 0; col < g_cols; ++col)
  771 + compare.add_col(v_sparse, col);
  772 + result = m_test;
  773 + double* values = new double[g_rows];
  774 + int* rows = new int[g_rows];
  775 + int number = 0;
  776 + for (int i = 0; i < g_rows; i += 2, ++number) {
  777 + values[number] = 7.0;
  778 + rows[number] = i;
  779 + }
  780 + for (int col = 0; col < g_cols; ++col)
  781 + result.add_col(values, rows, number, col);
  782 + delete [] values;
  783 + delete [] rows;
  784 + if (result != compare) {
  785 + cout << endl << "TEST ERROR: Corrupt GSparseMatrix.add_col(compressed array)." << endl;
  786 + cout << "m_test " << m_test << endl;
  787 + cout << "result " << result << endl;
  788 + cout << "compare " << compare << endl;
  789 + throw;
  790 + }
  791 + cout << ".";
764 792 }
765 793 catch (exception &e) {
766 794 cout << e.what() << endl;
... ... @@ -1402,11 +1430,12 @@ void test_heavy(int block = 512)
1402 1430 //
1403 1431 // Insert columns into 10000 x 10000 matrix
1404 1432 number = 10000;
1405   - num_cols = 1000;
1406   - large.clear();
  1433 + num_cols = 10000;
  1434 + GSparseMatrix diag(number,number);
  1435 + for (int j = 10; j < number-10; ++j)
  1436 + diag(j,j) = 3.14;
  1437 + large = diag;
1407 1438 large.set_mem_block(block);
1408   - for (int j = 200; j < 400; ++j)
1409   - large(j,j) = 3.14;
1410 1439 GVector column(number);
1411 1440 t_start = clock();
1412 1441 for (int j = 0; j < num_cols; ++j) {
... ... @@ -1420,18 +1449,18 @@ void test_heavy(int block = 512)
1420 1449 t_elapse = double(clock() - t_start)/double(CLOCKS_PER_SEC);
1421 1450 #if defined(DUMP_TIMING)
1422 1451 cout << endl << " - " << num_cols << " columns adding needed " << t_elapse <<
1423   - " sec (reference ~ 0.4 sec)";
  1452 + " sec (reference ~ 4.8 sec)";
1424 1453 #endif
1425 1454 //
1426 1455 // Insert columns into 10000 x 10000 matrix using matrix stack
1427 1456 GSparseMatrix stack(number,number);
1428   - stack.clear();
  1457 + stack = diag;
1429 1458 stack.set_mem_block(block);
1430 1459 for (int j = 200; j < 400; ++j)
1431 1460 stack(j,j) = 3.14;
1432 1461 t_start = clock();
1433 1462 column = GVector(number);
1434   - stack.stack_init(20000,100);
  1463 + stack.stack_init(10000,10000);
1435 1464 for (int j = 0; j < num_cols; ++j) {
1436 1465 i_min = (j < 2) ? 0 : j-2;
1437 1466 i_max = (j > num_cols-2) ? num_cols : j+2;
... ... @@ -1444,7 +1473,7 @@ void test_heavy(int block = 512)
1444 1473 t_elapse = double(clock() - t_start)/double(CLOCKS_PER_SEC);
1445 1474 #if defined(DUMP_TIMING)
1446 1475 cout << endl << " - " << num_cols << " columns stack-adding needed " << t_elapse <<
1447   - " sec (reference ~ 0.1 sec)";
  1476 + " sec (reference ~ 1.3 sec)";
1448 1477 #endif
1449 1478 //
1450 1479 // Check that both are identical
... ...
test/test_GSparseMatrix.hpp
... ... @@ -15,7 +15,7 @@
15 15 #define TEST_GSPARSEMATRIX_HPP
16 16  
17 17 /* __ Includes ___________________________________________________________ */
18   -#include "../src/GSparseMatrix.hpp"
  18 +#include "../src/GammaLib.hpp"
19 19 #include <iostream> // cout, cerr
20 20 #include <stdexcept> // std::exception
21 21 #include <math.h>
... ...
test/test_GSymMatrix.hpp
... ... @@ -15,7 +15,7 @@
15 15 #define TEST_GSYMMATRIX_HPP
16 16  
17 17 /* __ Includes ___________________________________________________________ */
18   -#include "../src/GSymMatrix.hpp"
  18 +#include "../src/GammaLib.hpp"
19 19 #include <iostream> // cout, cerr
20 20 #include <stdexcept> // std::exception
21 21 #include <math.h>
... ...
test/test_GVector.hpp
... ... @@ -15,8 +15,7 @@
15 15 #define TEST_VECTOR_HPP
16 16  
17 17 /* __ Includes ___________________________________________________________ */
18   -//#include "../src/gammalib.hpp"
19   -#include "../src/GVector.hpp"
  18 +#include "../src/GammaLib.hpp"
20 19 #include <iostream> // cout, cerr
21 20 #include <stdexcept> // std::exception
22 21 #include <math.h>
... ...